How to create focal-server-cloudimg-amd64-vnx.qcow2 image - Download base image: wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img Although the extension is .img it is a qcow2 image: # file focal-server-cloudimg-amd64.img focal-server-cloudimg-amd64.img: QEMU QCOW Image (v2), 2361393152 bytes - Mount the image: sudo modprobe nbd sudo qemu-nbd --connect=/dev/nbd0 focal-server-cloudimg-amd64.img sudo mount /dev/nbd0p1 /mnt - Allow root login: sudo sed -i 's/disable_root:.*/disable_root: false/' /mnt//etc/cloud/cloud.cfg - Allow ssh with user/passwd and root login sed -i 's/^PasswordAuthentication.*/PasswordAuthentication yes/' /mnt//etc/ssh/sshd_config sed -i 's/.*PermitRootLogin .*/PermitRootLogin yes/' /mnt//etc/ssh/sshd_config - Create vnx account and set root password (xxxx password for both) chroot /mnt passwd root adduser vnx usermod -aG sudo vnx ... - Exit chroot and unmount the image: exit sudo umount /mnt sudo qemu-nbd --disconnect /dev/nbd0p1 - Rename the image: mv focal-server-cloudimg-amd64.img focal-server-cloudimg-amd64-vnx.qcow2