Ubuntu cloud image - set root password

Moki Lv6
1
sudo apt install libguestfs-tools
1
wget -nc https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img -O ubuntu-22.04-server.qcow2
1
virt-customize -a ubuntu-22.04-server.qcow2 --root-password password:myPassword
On this page
Ubuntu cloud image - set root password