Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 624396 - migration failed after hot-unplug virtserialport - Unknown savevm section or instance '0000:00:07.0/virtio-console' 0
migration failed after hot-unplug virtserialport - Unknown savevm section or ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.1
All Linux
low Severity medium
: rc
: ---
Assigned To: Amit Shah
Virtualization Bugs
:
Depends On:
Blocks: 580954
  Show dependency treegraph
 
Reported: 2010-08-16 06:11 EDT by lihuang
Modified: 2018-01-22 05:41 EST (History)
10 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.114.el6
Doc Type: Bug Fix
Doc Text:
Migrating a VM after a virtio-serial device was hot-unplugged resulted in migration failure. This was due to not removing the device's state from migration data from the source machine. The source then sent the device data to the destination, which did not expect that device, resulting in a failed migration condition. The fix is to unregister the device state from the migration state to ensure the removed device is not considered for migration.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 07:31:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 07:20:36 EDT

  None (edit)
Description lihuang 2010-08-16 06:11:16 EDT
Description of problem:
dst's qemu-kvm process quit with : 

(qemu) Unknown savevm section or instance '0000:00:07.0/virtio-console' 0
load of migration failed


start src qemu-kvm with : 
-chardev socket,id=channel0,path=/tmp/port2,server,nowait 
-chardev socket,id=channel1,path=/tmp/port3,server,nowait 
-device virtio-serial-pci,id=virtio-serial0 
-device virtio-serial-pci,id=virtio-serial1 
-device  virtserialport,bus=virtio-serial0.0,chardev=channel0,name=org.linux-kvm.port.0,nr=0,id=org.linux-kvm.port.0 
-device virtserialport,bus=virtio-serial1.0,chardev=channel1,name=org.linux-kvm.port.1,nr=0,id=org.linux-kvm.port.1

start dst qemu-kvm with :
-chardev socket,id=channel0,path=/tmp/port2,server,nowait 
-chardev socket,id=channel1,path=/tmp/port3,server,nowait 

also tested without "-chardev" on dst. same result.



Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.109.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Full command line 
src - [root@t70 qemu]# QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -M rhel6.0.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name s0811.2 -uuid 4667028b-49fa-aba8-a5a4-868a82094f2f -nodefconfig -nodefaults -monitor stdio -rtc base=utc -boot c -drive file=/home/images/s0811.2.img,if=none,id=drive-virtio-disk0,boot=on,format=qcow2,cache=none -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:bc:b0:c6,bus=pci.0,addr=0x3 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc :12 -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -chardev socket,id=channel0,path=/tmp/port2,server,nowait -chardev socket,id=channel1,path=/tmp/port3,server,nowait -device virtio-serial-pci,id=virtio-serial0 -device virtio-serial-pci,id=virtio-serial1 -device  virtserialport,bus=virtio-serial0.0,chardev=channel0,name=org.linux-kvm.port.0,nr=0,id=org.linux-kvm.port.0 -device virtserialport,bus=virtio-serial1.0,chardev=channel1,name=org.linux-kvm.port.1,nr=0,id=org.linux-kvm.port.1 

dst - [root@t70 qemu]# QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -M rhel6.0.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name s0811.2 -uuid 4667028b-49fa-aba8-a5a4-868a82094f2f -nodefconfig -nodefaults -monitor stdio -rtc base=utc -boot c -drive file=/home/images/s0811.2.img,if=none,id=drive-virtio-disk0,boot=on,format=qcow2,cache=none -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:bc:b0:c6,bus=pci.0,addr=0x3 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc :11 -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6  -incoming tcp:0:5678
Comment 2 Amit Shah 2010-08-18 03:48:28 EDT
That's expected.

You start src with two virtio-serial devices with 1 port each.

Then hot-unplug one port.

And then migrate, but specify two devices with one port each on the dst host.

So the load is going to fail as the source now only knows of two devices and one port on one of the devices, but the destination expects two devices with one port each.

libvirt is supposed to take care of making sure it spawns qemu on the destination host considering all the hot-plug/unplug operations that have been performed since the src host start.

This doesn't look like a bug, unless you're doing something different from what I described.
Comment 3 lihuang 2010-08-18 14:41:09 EDT
Hi Amit
My steps is :
1. start src with two virtio-serial devices with 1 port each.
2. remove all ports and virtio-serial devices from qemu monitor
   (qemu) device_del org.linux-kvm.port.0
   (qemu) device_del org.linux-kvm.port.1
   (qemu) device_del virtio-serial0
   (qemu) device_del virtio-serial1
3. start dst without virtserialport and virtio-serial devices
   A. with chardev
   B. without chardev

==> both failed
Comment 4 Amit Shah 2010-08-18 18:42:30 EDT
Can you try just removing the ports and not the devices?

It's possible that device hot-unplug doesn't go through.
Comment 5 Amit Shah 2010-08-18 21:25:49 EDT
OK, I found the culprit. We don't unregister the savevm section on device hot-unplug.

Can you try the build in http://brewweb.devel.redhat.com/brew/taskinfo?taskID=2691710

Give it some time to build, though.

With that change, it works for me.
Comment 6 lihuang 2010-08-19 07:14:18 EDT
yes. it also works for me
Comment 7 Amit Shah 2010-08-19 20:56:56 EDT
(In reply to comment #6)
> yes. it also works for me

Great. Patch is sent upstream, will target 6.1:

http://article.gmane.org/gmane.comp.emulators.qemu/78336
Comment 12 Golita Yue 2011-01-18 05:49:32 EST
Verified in qemu-kvm-0.12.1.2-2.129.el6.x86_64

The steps as #Description and the guest running normally after migration. 

cmd:
/usr/libexec/qemu-kvm -m 2G -smp 2  -uuid `uuidgen` -rtc base=utc,clock=host,driftfix=slew -boot c -drive file=/home/image/rhel6.qcow2,index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,format=qcow2 -device virtio-blk-pci,bus=pci.0,drive=drive-virtio-disk1,id=virtio-disk0 -netdev tap,id=hostnet0,script=/etc/qemu-ifup-switch -device virtio-net-pci,netdev=hostnet0,mac=00:10:12:20:77:0c,bus=pci.0,addr=0x7,id=hostnet0 -monitor stdio -vnc :1 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -chardev socket,id=channel0,path=/home/rhel6.channel0,server,nowait -device virtserialport,chardev=channel0,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port1
Comment 13 Amit Shah 2011-05-04 07:07:49 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Migrating a VM after a virtio-serial device was hot-unplugged resulted in migration failure.  This was due to not removing the device's state from migration data from the source machine.  The source then sent the device data to the destination, which did not expect that device, resulting in a failed migration condition.  The fix is to unregister the device state from the migration state to ensure the removed device is not considered for migration.
Comment 14 errata-xmlrpc 2011-05-19 07:31:16 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html
Comment 15 errata-xmlrpc 2011-05-19 08:47:05 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html
Comment 16 dnahrblock 2018-01-22 05:41:14 EST
My BK Experience Welcome Bk 2018 - News Channel 3
Dec 12, 2017 - Welcome to the My BURGER KING Experience Survey We value your candid feedback and appreciate you taking the time to complete our survey When younbspThis website uses cookies to automatically collect information about your visit and your systems All of your information is used solely to provide ...

http://www.mybk-experience.xyz/

Note You need to log in before you can comment on or make changes to this bug.