Bug 617432

Summary: migration via unix protocol failed
Product: Red Hat Enterprise Linux 6 Reporter: Mike Cao <bcao>
Component: qemu-kvmAssignee: Alex Williamson <alex.williamson>
Status: CLOSED WORKSFORME QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: amit.shah, lihuang, michen, mkenneth, ndai, quintela, szhou, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-23 18:36:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Mike Cao 2010-07-23 02:55:15 UTC
Description of problem:
Do migrate via unix protocol ,2 times faild ,I don't know how to reproduce it.

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

How reproducible:
ramdom

Steps to Reproduce:
1.Start VM in the host:
eg :/usr/libexec/qemu-kvm -M rhel6.0.0 -enable-kvm -m 4096 -smp 8,sockets=1,cores=8,threads=1 -name Win7 -uuid `uuidgen` -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/Win2k8.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=localtime -boot c -drive file=/home/win7_64.raw,if=none,id=drive-ide0-0-0,boot=on,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,downscript=no -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:e8:f2:73,bus=pci.0,addr=0x4 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc :4 -k en-us -vga std -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

2.start migration-listen mode in the same host:
eg :/usr/libexec/qemu-kvm -M rhel6.0.0 -enable-kvm -m 4096 -smp 8,sockets=1,cores=8,threads=1 -name Win7 -uuid `uuidgen` -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/Win2k8_unix.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=localtime -boot c -drive file=/home/win7_64.raw,if=none,id=drive-ide0-0-0,boot=on,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,downscript=no -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:e8:f2:73,bus=pci.0,addr=0x4 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc :5 -k en-us -vga std -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -incoming unix:/tmp/mike

3.{"execute":"migrate","arguments":{"uri":"unix:/tmp/mike"}}
  
Actual results:
Migration failed .
it prompts "qemu:waring :error while loading state for instance 0x0 of device `ram`"

Expected results:


Additional info:

Tried more than 20 times , only 2 times hit this issue.

Comment 3 RHEL Product and Program Management 2010-07-23 03:17:46 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 4 Shirley Zhou 2010-07-23 10:02:16 UTC
This bug can be reproduced by following steps:

1.Run windows guest as :
/usr/libexec/qemu-kvm -m 2G -smp 2 -cpu qemu64,+x2apic -usbdevice tablet -drive file=/mnt/win08r2-s1.qcow2,if=none,id=drive-virtio0,boot=on,werror=stop,rerror=stop,cache=none,format=qcow2 -device virtio-blk-pci,drive=drive-virtio0,id=virtio-blk-pci0 -netdev tap,id=hostnet0,script=/etc/qemu-ifup,vhost=on,ifname=virtio_nic_1 -device virtio-net-pci,netdev=hostnet0,mac=02:00:78:3F:20:1f,bus=pci.0,id=virtio1 -netdev tap,id=hostnet1,script=/etc/qemu-ifup,ifname=rtl_1_1 -device rtl8139,netdev=hostnet1,mac=01:00:78:3F:20:1f,bus=pci.0,id=rtl-1 -uuid 1234127c-8765-4e67-95da-8dd0a8891cc4 -name win08r2 -qmp tcp:0:4445,server,nowait -boot c -monitor stdio -spice port=5931,disable-ticketing -vga qxl
2.do virtio network card hotplug
{"execute":"netdev_add","arguments":{"type":"tap","id":"virtio-p1","script":"/etc/qemu-ifup","ifname":"virtio_p1"}}
{"return": {}}
{"execute":"device_add","arguments":{"driver":"virtio-net-pci","netdev":"virtio-p1","mac":"00:12:32:12:13:12","bus":"pci.0","id":"virtio-p1"}}
{"return": {}}
3.do live migration 
This issue happens after step3.

Comment 5 Amit Shah 2010-07-23 11:29:20 UTC
Please try with qemu-kvm-0.12.1.2-2.99.el6.x86_64, migration and hot-plug/unplug issues were fixed in that version. Please try with vnc as spice may not work with that version.

Comment 6 Alex Williamson 2010-07-23 15:15:03 UTC
(In reply to comment #4)
> This bug can be reproduced by following steps:
> 
> 1.Run windows guest as :
> /usr/libexec/qemu-kvm -m 2G -smp 2 -cpu qemu64,+x2apic -usbdevice tablet -drive
> file=/mnt/win08r2-s1.qcow2,if=none,id=drive-virtio0,boot=on,werror=stop,rerror=stop,cache=none,format=qcow2
> -device virtio-blk-pci,drive=drive-virtio0,id=virtio-blk-pci0 -netdev
> tap,id=hostnet0,script=/etc/qemu-ifup,vhost=on,ifname=virtio_nic_1 -device
> virtio-net-pci,netdev=hostnet0,mac=02:00:78:3F:20:1f,bus=pci.0,id=virtio1
> -netdev tap,id=hostnet1,script=/etc/qemu-ifup,ifname=rtl_1_1 -device
> rtl8139,netdev=hostnet1,mac=01:00:78:3F:20:1f,bus=pci.0,id=rtl-1 -uuid
> 1234127c-8765-4e67-95da-8dd0a8891cc4 -name win08r2 -qmp
> tcp:0:4445,server,nowait -boot c -monitor stdio -spice
> port=5931,disable-ticketing -vga qxl
> 2.do virtio network card hotplug
> {"execute":"netdev_add","arguments":{"type":"tap","id":"virtio-p1","script":"/etc/qemu-ifup","ifname":"virtio_p1"}}
> {"return": {}}
> {"execute":"device_add","arguments":{"driver":"virtio-net-pci","netdev":"virtio-p1","mac":"00:12:32:12:13:12","bus":"pci.0","id":"virtio-p1"}}
> {"return": {}}
> 3.do live migration 
> This issue happens after step3.    

There was no mention of hotplug in the original post, why are we changing the problem?  There are known issues with hotplug and migration prior to qemu-kvm-0.12.1.2-2.98.el6.  Please don't do this.

Comment 7 Alex Williamson 2010-07-23 18:36:40 UTC
I've completed over 100 unix migrations in a row on qemu-kvm-0.12.1.2-2.99.el6.x86_64 using a command similar to comment0 (only difference is running the monitor on a tcp socket and initiating the unix migration via that).  Migration underwent a big overhaul in qemu-kvm-0.12.1.2-2.98.el6.  Please retest and reopen if it can be reproduced.

btw - you probably want a static uuid when doing migrations rather than doing a new uuidgen on both ends, but that doesn't seem to be causing me any trouble.