QEMU cannot find device nor node_name

When I do

virsh list

I get ubuntu14.10 and ubuntu15.10 running but when I run this command to take a snapshot.

virsh qemu-monitor-command ubuntu15.10 '{ "execute": "transaction", "arguments":{"actions": [{ "type": "blockdev-snapshot-sync", "data" :{ "device": "ubuntu15.10", "snapshot-file": "hd0-snap.qcow2"} } ] } }'

I get an error saying "Cannot find device=ubuntu15.10 nor node_name="


Solution 1:

Device needs to be the actual block device, not the name of the node/machine. (see: http://wiki.qemu.org/Features/Snapshots#QMP_command)

Try:

virsh qemu-monitor-command ubuntu15.10 '{"execute":"query-block"}'

to find out the Target of the block device you want to snapshot.