How to replace QEMU binary with newer version for libvirt live snapshots
You need to restart your VM for it to use the new version of qemu.
Related videos on Youtube
billyw
Updated on September 18, 2022Comments
-
billyw almost 2 years
This is my first post, so please be gentle. :)
My CentOS 6.5 box has a QEMU binary that does not support live external snapshots. This is the command I attempt on the virsh CLI, and its output:
virsh # snapshot-create-as myvm snapshot1 "snapshot1 test" --disk-only --atomic error: Operation not supported: live disk snapshot not supported with this QEMU binary
First Question: Which QEMU binary is this error referring to?
I assumed that the QEMU binary referenced was
/usr/libexec/qemu-kvm
.Second Question: How should the QEMU binary be updated when it isn't available in the operating system's package management system?
I attempted to download the source of a newer version at http://sourceforge.net/projects/kvm/files/qemu-kvm/1.2.0/, compile it, and create a symbolic link that points to the appropriate binary. A listing of the link looks like so:
/usr/local/bin # ls -lah /usr/libexec/qemu-kvm lrwxrwxrwx 1 root root 33 Jan 14 11:20 /usr/libexec/qemu-kvm -> /usr/local/bin/qemu-system-x86_64
I then restarted libvirtd, but I'm getting the same error.
Any help is much appreciated!
-
sciurus over 10 yearsIf you run
virsh qemu-monitor-command myvm '{"execute":"query-commands"}'
does the output include "snapshot_blkdev"? -
sciurus over 10 yearsAlso, did you restart your VM after creating the qemu symlink?
-
billyw over 10 years@sciurus Ah, restarting the VM was the issue! The process from the old binary was still running. I also had to run
virsh edit myvm
and change the 'machine' setting from 'rhel6.5.0' to 'pc-1.2', then the VM restarted like a charm. Thank you! -
sciurus over 10 yearsOkay, I'll add restarting as an answer then.
-