I'm trying to migrate between a pc-1.0 machine on qemu 1.0 and a pc-1.0 machine on qemu-2.0. This appears not to work.
It looks to me as if at some point along the line the definition of pc-1.0 has changed (eek). The machine was booted with the command line [1] below, then migrated (for the sake of ease including a full block device dump) to a file. I'm happy to provide this (it's a blank cirros image but on a 20GB disk so quite large). Restoring the machine with the command line [2] (merely adding -machine pc-1.0 which is not the default for qemu-2.0) produces the error: Length mismatch: vga.vram: 1000000 in != 800000 qemu: warning: error while loading state for instance 0x0 of device 'ram' load of migration failed This can be fixed using command line [3] (adding an additional -global cirrus-vga.vgamem_mb=10) in which case it gets a little further. Length mismatch: 0000:00:03.0/virtio-net-pci.rom: 10000 in != 20000 qemu: warning: error while loading state for instance 0x0 of device 'ram' load of migration failed I don't know how to get around that on the command line. This Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1291321 suggests that the root cause is a change in the definition of pc-1.0 between qemu 1.0 and 1.7. That's annoying, but obviously we can't change the definition of pc-1.0 now because users of later versions of qemu may be using the (newer) pc-1.0. Assuming I can't find this on the command line (which I would be ok with I suppose), I propose to define a new machine type (e.g. pc-1.0-qemu-1.0) which would look like the original qemu 1.0 pc-1.0 machine type. I think I can see how to do this for the video ram, but I'm puzzled about how to do this for the virtio-net-pci.rom (and indeed anything else that I might come across). Is this a profitable route of investigation, or should I just give up now and assume live migration between 1.0 and 2.0 is impossible? -- Alex Bligh [1] Use to start the VM on qemu 1.0 /usr/bin/kvm -name vm -uuid 33372d76-6d65-6e74-3132-333435363738 -m 512 -smp 1,cores=1,threads=1,sockets=1 -vga cirrus -usbdevice tablet -k en-gb -vnc 0.0.0.0:6313,password -monitor telnet:127.0.0.1:12345,server,nowait -drive file=/storage/img.qcow2,if=virtio,index=0,format=qcow2,media=disk,cache=writeback -boot order=cd -net nic,macaddr=00:16:3e:28:04:51,model=virtio,vlan=0 -net tap,ifname=tap13.0,script=no,downscript=no,vlan=0 -qmp unix:/var/run/vm.monitor,server,nowait -pidfile /var/run/vm.pid HMP then used to save the device out with migrate -b. [2] First attempt to start the VM on qemu 2.0 - just add -machine pc-1.0 /usr/bin/kvm -name testimport -machine pc-1.0 -uuid 33372d76-6d65-6e74-3132-333435363738 -m 512 -smp 1,cores=1,threads=1,sockets=1 -vga cirrus -usbdevice tablet -k en-gb -vnc 0.0.0.0:6314,password -monitor telnet:127.0.0.1:12345,server,nowait -drive file=/storage/img2.qcow2,if=virtio,index=0,format=qcow2,media=disk,cache=writeback -boot order=cd -net nic,macaddr=00:16:3e:28:04:51,model=virtio,vlan=0 -net socket,mcast=230.0.0.1:1234,vlan=0 -qmp unix:/var/run/testimport.monitor,server,nowait -pidfile /var/run/testimport.pid -incoming fd:</storage/vm.out Result: Length mismatch: vga.vram: 1000000 in != 800000 qemu: warning: error while loading state for instance 0x0 of device 'ram' load of migration failed [3] Second attempt to start the VM on qemu 2.0 - also add -global cirrus-vga.vgamem_mb=10 /usr/bin/kvm -name testimport -machine pc-1.0 -global cirrus-vga.vgamem_mb=10 -uuid 33372d76-6d65-6e74-3132-333435363738 -m 512 -smp 1,cores=1,threads=1,sockets=1 -vga cirrus -usbdevice tablet -k en-gb -vnc 0.0.0.0:6314,password -monitor telnet:127.0.0.1:12345,server,nowait -drive file=/storage/img2.qcow2,if=virtio,index=0,format=qcow2,media=disk,cache=writeback -boot order=cd -net nic,macaddr=00:16:3e:28:04:51,model=virtio,vlan=0 -net socket,mcast=230.0.0.1:1234,vlan=0 -qmp unix:/var/run/testimport.monitor,server,nowait -pidfile /var/run/testimport.pid -incoming fd:</storage/vm.out Result: Length mismatch: 0000:00:03.0/virtio-net-pci.rom: 10000 in != 20000 qemu: warning: error while loading state for instance 0x0 of device 'ram' load of migration failed