From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juan Quintela Subject: Re: Qemu-KVM Livate Migration 0.12.2 -> 0.12.3/4 broken? Date: Sun, 16 May 2010 16:42:24 +0200 Message-ID: References: <4BE93882.8050105@dlh.net> <4BEFDEE1.5070906@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Peter Lieven , kvm@vger.kernel.org, qemu-devel@nongnu.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:20897 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732Ab0EPOma (ORCPT ); Sun, 16 May 2010 10:42:30 -0400 In-Reply-To: <4BEFDEE1.5070906@redhat.com> (Avi Kivity's message of "Sun, 16 May 2010 15:02:41 +0300") Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > On 05/12/2010 02:11 AM, Juan Quintela wrote: >> Peter Lieven wrote: >> >>> Hi Qemu/KVM Devel Team, >>> >>> Live Migration from a 0.12.2 qemu-kvm to a 0.12.3 (and 0.12.4) >>> does not work: "load of migration failed" >>> >>> Is there any way to find out, why exactly it fails? I have >>> a lot of VMs running on 0.12.2 and would like to migrate >>> them to 0.12.4 >>> >>> cmdline: >>> -net tap,vlan=6,script=no,downscript=no,ifname=tap7 -net >>> nic,vlan=6,model=e1000,macaddr=52:54:00:fe:00:88 -net >>> tap,vlan=651,script=no,downscript=no,ifname=tap8 -net >>> nic,vlan=651,model=e1000,macaddr=52:54:00:ff:00:69 -drive >>> file=/dev/mapper/iqn.2001-05.com.equallogic:0-8a0906-b6eca7604-6280020bc4b4bde8-quagga,if=ide,boot=on,cache=none,aio=native >>> -m 256 -monitor tcp:0:4090,server,nowait -vnc :90 -name 'Quagga' -boot >>> order=dc,menu=on -k de -incoming tcp:172.21.59.132:5090 -pidfile >>> /var/run/qemu/vm-148.pid -rtc base=utc,clock=vm -usb -usbdevice >>> tablet -no-kvm-irqchip -vga cirrus >>> >>> Any hints would be appreciated! >>> >> Can you try reverting this patch? >> >> commit 3fa017e24b0a0f0e68619a689b9b02fe486dae9e >> Author: Marcelo Tosatti >> Date: Thu Feb 11 18:19:44 2010 -0200 >> >> ide save/restore pio/atapi cmd transfer fields and io buffer >> >> and told me if it works? >> >> > > Any idea why it fails? And how to fix it? Lack of "proper" subsections. IDE is something like: const VMStateDescription vmstate_ide_drive = { .version_id = 4, .... } static const VMStateDescription vmstate_bmdma = { .name = "ide bmdma", .version_id = 4, ... } const VMStateDescription vmstate_ide_pci = { .name = "ide", .version_id = 4, .... VMSTATE_STRUCT_ARRAY(bmdma, PCIIDEState, 2, 0, vmstate_bmdma, BMDMAState), VMSTATE_IDE_DRIVES(bus[0].ifs, PCIIDEState), VMSTATE_IDE_DRIVES(bus[1].ifs, PCIIDEState), .... } Notice that everything is at version 4. It used to be everything at version 3. Now the problem is that when migrating from v3 -> v4. We put in one place v3, But we only have a version number at the toplevel, rest of "subsections" don't sent a version number. There is no way to fix it in the general case. We can hack something around for ide, but that will just be a hack, or we can backport marcelo change and port it as a proper subsection (that is my plan). I expect to have time at the end of next time to work on this. So, to make the story short: I know what is happening, and I know how to fix it, just that fix is not trivial. I just need time. Later, Juan. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51306 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODf32-0002vD-5w for qemu-devel@nongnu.org; Sun, 16 May 2010 10:42:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODf30-0003Sy-1k for qemu-devel@nongnu.org; Sun, 16 May 2010 10:42:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37183) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODf2z-0003Sn-Pi for qemu-devel@nongnu.org; Sun, 16 May 2010 10:42:30 -0400 From: Juan Quintela In-Reply-To: <4BEFDEE1.5070906@redhat.com> (Avi Kivity's message of "Sun, 16 May 2010 15:02:41 +0300") References: <4BE93882.8050105@dlh.net> <4BEFDEE1.5070906@redhat.com> Date: Sun, 16 May 2010 16:42:24 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: Qemu-KVM Livate Migration 0.12.2 -> 0.12.3/4 broken? List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Peter Lieven , qemu-devel@nongnu.org, kvm@vger.kernel.org Avi Kivity wrote: > On 05/12/2010 02:11 AM, Juan Quintela wrote: >> Peter Lieven wrote: >> >>> Hi Qemu/KVM Devel Team, >>> >>> Live Migration from a 0.12.2 qemu-kvm to a 0.12.3 (and 0.12.4) >>> does not work: "load of migration failed" >>> >>> Is there any way to find out, why exactly it fails? I have >>> a lot of VMs running on 0.12.2 and would like to migrate >>> them to 0.12.4 >>> >>> cmdline: >>> -net tap,vlan=6,script=no,downscript=no,ifname=tap7 -net >>> nic,vlan=6,model=e1000,macaddr=52:54:00:fe:00:88 -net >>> tap,vlan=651,script=no,downscript=no,ifname=tap8 -net >>> nic,vlan=651,model=e1000,macaddr=52:54:00:ff:00:69 -drive >>> file=/dev/mapper/iqn.2001-05.com.equallogic:0-8a0906-b6eca7604-6280020bc4b4bde8-quagga,if=ide,boot=on,cache=none,aio=native >>> -m 256 -monitor tcp:0:4090,server,nowait -vnc :90 -name 'Quagga' -boot >>> order=dc,menu=on -k de -incoming tcp:172.21.59.132:5090 -pidfile >>> /var/run/qemu/vm-148.pid -rtc base=utc,clock=vm -usb -usbdevice >>> tablet -no-kvm-irqchip -vga cirrus >>> >>> Any hints would be appreciated! >>> >> Can you try reverting this patch? >> >> commit 3fa017e24b0a0f0e68619a689b9b02fe486dae9e >> Author: Marcelo Tosatti >> Date: Thu Feb 11 18:19:44 2010 -0200 >> >> ide save/restore pio/atapi cmd transfer fields and io buffer >> >> and told me if it works? >> >> > > Any idea why it fails? And how to fix it? Lack of "proper" subsections. IDE is something like: const VMStateDescription vmstate_ide_drive = { .version_id = 4, .... } static const VMStateDescription vmstate_bmdma = { .name = "ide bmdma", .version_id = 4, ... } const VMStateDescription vmstate_ide_pci = { .name = "ide", .version_id = 4, .... VMSTATE_STRUCT_ARRAY(bmdma, PCIIDEState, 2, 0, vmstate_bmdma, BMDMAState), VMSTATE_IDE_DRIVES(bus[0].ifs, PCIIDEState), VMSTATE_IDE_DRIVES(bus[1].ifs, PCIIDEState), .... } Notice that everything is at version 4. It used to be everything at version 3. Now the problem is that when migrating from v3 -> v4. We put in one place v3, But we only have a version number at the toplevel, rest of "subsections" don't sent a version number. There is no way to fix it in the general case. We can hack something around for ide, but that will just be a hack, or we can backport marcelo change and port it as a proper subsection (that is my plan). I expect to have time at the end of next time to work on this. So, to make the story short: I know what is happening, and I know how to fix it, just that fix is not trivial. I just need time. Later, Juan.