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="


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


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

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

  • The file is /var/lib/libvirt/images/ubuntu15.10.qcow2 and when I replace it's path, the error remains the same. Cannot find device="path of file". Aug 9 '16 at 18:04
  • I'm sorry, I didn't mean the file backing the device, but the name of the device as is known to qemu. In the documentation I pasted you can see it being referred to as virtio0, so, something like that, maybe vda, hd0, disk0. It should be under the Target heading in domblklist.
    – madeddie
    Aug 9 '16 at 18:10
  • Okay. Below the target, I see vda but upon entering it in the command. I see the same error again. Cannot find device vda. Aug 9 '16 at 18:15
  • Ok, it might still be virtio0, but, could you try: virsh qemu-monitor-command ubuntu15.10 '{"execute":"query-block"}' that should show the block devices as known to qemu. What do you see as "device": line(s)?
    – madeddie
    Aug 9 '16 at 18:29
  • Oh Yes. Got it. It now shows another error "Permission denied" although I tried running it with sudo. Aug 9 '16 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.