[libvirt] FYI: Upgrade from pc-0.12 / pc-014 vs. savevm section "kvmclock"

Philipp Hahn hahn at univention.de
Fri Nov 23 08:17:18 UTC 2012


Hello,

I'm using libvirt to manage my KVM instances. I created a VM with 
qemu-kvm-0.12, later upgraded to qemu-kvm-0.14 and took a snapshot using 
libvirt. As the original VM was created with qemu-kvm-0.12, libvirt 
stored "pc-0.12" with its XML data. Now I upgraded to qemu-kvm-1.1.2, where 
reverting to that snapshot fails with a the message
>   Unknown savevm section or instance 'kvmclock' 0
>   load of migration failed

I tracked that down to hw/pc_piix.c:590 where 
> static QEMUMachine pc_machine_v0_12 = {
>     .name = "pc-0.12",
>     .desc = "Standard PC",
>     .init = pc_init_pci_no_kvmclock,
is defined. If I change .init to pc_init_pci, I'm able to load the old 
snapshot.

I think this is because kvm-0.14 always created the kvmclock device, while 
that was only later changed (0ec329da) to be created "on demand" for pc-0.14s 
onward. So the snapshot is no longer a pure pc-0.12, but some 
pc-0.12+something, which qemu-kvm-1.1.2 refuses to load.

Now that I know what the problem is I just want to inform others, who might 
experience the same problem. My workaround is a patched qemu-kvm, where I 
changed that .init mentioned above, since an additional enabled kvmclock does 
not seem to do any harm.
If someone has a better fix, I'm open to suggestions.

Sincerely
Philipp
-- 
Philipp Hahn           Open Source Software Engineer      hahn at univention.de
Univention GmbH        be open.                       fon: +49 421 22 232- 0
Mary-Somerville-Str.1  D-28359 Bremen                 fax: +49 421 22 232-99
                                                   http://www.univention.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121123/07e4bdf9/attachment-0001.sig>


More information about the libvir-list mailing list