VM creates with IMG format of RAW
But VM deploy fails with QCOW2:
Fri Dec 28 17:24:21 2018 [Z0][VM][I]: New state is ACTIVE
Fri Dec 28 17:24:21 2018 [Z0][VM][I]: New LCM state is PROLOG
Fri Dec 28 17:24:22 2018 [Z0][VM][I]: New LCM state is BOOT
Fri Dec 28 17:24:22 2018 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/10/deployment.0
Fri Dec 28 17:24:22 2018 [Z0][VM][I]: Virtual Machine has no context
Fri Dec 28 17:24:22 2018 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Fri Dec 28 17:24:23 2018 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy '/var/lib/one//datastores/101/10/deployment.0' 'd10-mpv2' 10 d10-mpv2
Fri Dec 28 17:24:23 2018 [Z0][VMM][I]: error: Failed to create domain from /var/lib/one//datastores/101/10/deployment.0
Fri Dec 28 17:24:23 2018 [Z0][VMM][I]: error: internal error: process exited while connecting to monitor: 2018-12-28T14:24:23.820033Z qemu-system-x86_64: -drive file=rbd:one/one- 8:id=oneadmin:auth_supported=cephx\;none:mon_host=10.1.101.142\:6789\;10.1.101.140\:6789\; 10.1.101.123\:6789,file.password-secret=virtio-disk0-secret0,format=qcow2,if=none,id=drive- virtio-disk0,cache=none: Image is not in qcow2 format
Fri Dec 28 17:24:23 2018 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/101/10/deployment.0
Fri Dec 28 17:24:23 2018 [Z0][VMM][I]: ExitCode: 255
Fri Dec 28 17:24:23 2018 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Fri Dec 28 17:24:23 2018 [Z0][VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/101/10/deployment.0
Fri Dec 28 17:24:23 2018 [Z0][VM][I]: New LCM state is BOOT_FAILURE
When attaching disk in your VM or Template, select Advanced options and set attribute Image mapping driver to “raw”. Deployment file should than change from qcow2 disk format to raw. If this fails, please post your recent / newest version of deployment file.
Inside vmimage it shows qcow2.
Inside deployment.0 it is marked as raw.
And it works but I don’t know what to think, I need encrypted qcow2 disk.
How to check from inside of VM ?
oneimage show 10
IMAGE 10 INFORMATION
ID : 10
NAME : anon-disk
USER : oneadmin
GROUP : oneadmin
LOCK : None
DATASTORE : cephds
TYPE : DATABLOCK
REGISTER TIME : 12/29 10:36:50
PERSISTENT : Yes
SOURCE : one/one-10
FSTYPE : qcow2
SIZE : 6G
STATE : used
RUNNING_VMS : 1
PERMISSIONS
OWNER : um-
GROUP : —
OTHER : —
IMAGE TEMPLATE
DEV_PREFIX=“vd”
DRIVER=“qcow2”
We also noticed the same problem with nebula 5.6.x and ceph qcow2 images. It’s a blocking issue for us to upgrade from 5.4 to 5.6.
It seems like nebula automatically converts qcow2 images into raw format during image upload into ceph datastore.
There is notice in the ceph docs (both luminous 12.2.x and mimic 13.2.x releases) about VM images formats:
Important
The raw data format is really the only sensible format option to use with RBD. Technically, you could use other QEMU-supported formats (such as qcow2 or vmdk ), but doing so would add additional overhead, and would also render the volume unsafe for virtual machine live migration when caching (see below) is enabled.
So it seems even it doesn’t make a sense to use qcow2 VM images with Ceph DS it should work as it is i.e. without converting into raw format. I wonder if such conversion is nebula-specific.
Use command qemu-img info vmdiskfile and check what file type is in datastore. Then you can play around with <driver name='qemu' type='raw' cache='none'/> so it will be qcow2 as you requested. You can find/change driver options as i written in post above.
not so informative about encryption
probably it was coverted in a style of next command
qemu-img convert -f qcow2 -O rbd debian_squeeze.qcow2 rbd:data/squeeze
is it still protected?
forgive my annoying, 100% shield is needed