I have Opennebula 4.12 on CentOS 7.1. I have installed from the Marketplace
CentOS 7 - KVM.
I am able to instantiate it and it runs fine. However, when I click on the running VM --> Snapshots --> Take snapshot, It doesn’t get created and in the log there is this:
Mon Apr 13 14:55:14 2015 [Z0][VMM][I]: Command execution fail: 'if [ -x "/var/tmp/one/vmm/kvm/snapshot_create" ]; then /var/tmp/one/vmm/kvm/snapshot_create one-13 0 13 localhost; else exit 42; fi'
Mon Apr 13 14:55:14 2015 [Z0][VMM][I]: Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Mon Apr 13 14:55:14 2015 [Z0][VMM][I]: error: unsupported configuration: internal snapshot for disk hdb unsupported for storage type raw
Mon Apr 13 14:55:14 2015 [Z0][VMM][E]: Could not create snapshot for domain one-13.
Mon Apr 13 14:55:14 2015 [Z0][VMM][I]: ExitCode: 255
Mon Apr 13 14:55:14 2015 [Z0][VMM][E]: Error creating new VM Snapshot: Could not create snapshot for domain one-13.
Please, note that the image is from the Marketplace and is supposed to be qcow2, e.g. to support snapshots.
I tried both with the image set to “Persistent: no” and “Persistent: yes”.
And last but not least, modify yout machine template (point to the new image file), make sure the template uses the qcow2 driver for the image, and after that you should be able to have a running VM again (but this time with snapshot capabilities).
$ onedatastore list
ID NAME SIZE AVAIL CLUSTER IMAGES TYPE DS TM STAT
0 system 100G 97% - 0 sys - shared on
1 default 100G 97% - 0 img fs shared on
2 files 100G 97% system-ssh-c 0 fil fs ssh on
By default the ‘img’ datastore is with id 1 and name ‘default’:
$ onedatastore show 1
DATASTORE 1 INFORMATION
ID : 1
NAME : default
USER : oneadmin
GROUP : oneadmin
CLUSTER : -
TYPE : IMAGE
DS_MAD : fs
TM_MAD : shared
BASE PATH : /var/lib/one//datastores/1
DISK_TYPE : FILE
STATE : READY
Is the VM using anyother disk, (e.g. swap)? The original log refers to hdb. Probably hdb is not the main disk and it refers to other device? Note that all devices needs to be qcow2.
Then that’s the problem, AFAIK swap cannot be qcow2, and all the images
needs to be qcow2 for the snapshot to work. Try to use a swap file within
the main disk.