Bug 1036537

Summary: Cross version migration from RHEL6.5 host to RHEL7.0 host with sound device failed.
Product: Red Hat Enterprise Linux 7 Reporter: Qunfang Zhang <qzhang>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: acathrow, areis, hhuang, juzhang, michen, qzhang, virt-maint, zpeng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-22.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:40:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Qunfang Zhang 2013-12-02 09:22:38 UTC
Description of problem:
Boot a guest with sound device on RHEL6.5 host, and then migrate to RHEL7.0 host. The migration status is "completed", however migration fails to load on RHEL7.0 host.

Version-Release number of selected component (if applicable):
RHEL6.5:
2.6.32-431.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.415.el6_5.3.x86_64

RHEL7.0:
kernel-3.10.0-57.el7.x86_64
qemu-kvm-1.5.3-20.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Boot up a guest on RHEL6.5 host with sound device.
#  /usr/libexec/qemu-kvm -cpu SandyBridge -M rhel6.5.0 -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -name rhel7.0-64 -uuid 9a0e67ec-f286-d8e7-0548-0c1c9ec93009 -nodefconfig -nodefaults -monitor stdio -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -drive file=gluster://10.66.**.**/gv0//rhel6.5-64-qzhang.qcow2,if=none,id=drive-disk0,format=qcow2,cache=none,id=disk0 -device scsi-hd,drive=drive-disk0,bus=scsi0.0,id=scsi-disk0  -drive file=gluster://10.66.**.**/gv0/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device scsi-cd,drive=drive-ide0-1-0,bus=scsi0.0,id=scsi-cdrom,bootindex=1 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:d5:51:8a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=port1,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=port2,bus=virtio-serial0.0,id=port2 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=3,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.vram_size=67108864 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6  -drive if=none,id=drive-fdc0-0-0,format=raw,cache=none -global isa-fdc.driveA=drive-fdc0-0-0 -qmp tcp:0:5555,server,nowait -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0

2. Boot guest on destination host with same command line and append "-incoming tcp:0:5800".

3. Migrate guest to 7.0 host.
(qemu) migrate -d tcp:$des_host_ip:5800


Actual results:
On des host:

QEMU 1.5.3 monitor - type 'help' for more information
(qemu) qemu: warning: error while loading state for instance 0x0 of device '0000:00:05.0/intel-hda'
load of migration failed


Expected results:
Migration should finish successfully.

Additional info:

Comment 2 Gerd Hoffmann 2013-12-03 14:50:30 UTC
Command line looks wrong, there is no sound device at all.
Error message looks like a intel-hda device (+codec) should be there.

Comment 3 Qunfang Zhang 2013-12-04 02:37:13 UTC
(In reply to Gerd Hoffmann from comment #2)
> Command line looks wrong, there is no sound device at all.
> Error message looks like a intel-hda device (+codec) should be there.

Yes, sorry I pasted the command line when I wanted to remove the intel-hda device to check whether the problem was gone.  The correct command line to trigger the problem is to append the following parameters based on the cli in comment 0:

-device intel-hda,id=sound0,bus=pci.0,addr=0x5 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0

A complete command line:

#  /usr/libexec/qemu-kvm -cpu SandyBridge -M rhel6.5.0 -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -name rhel7.0-64 -uuid 9a0e67ec-f286-d8e7-0548-0c1c9ec93009 -nodefconfig -nodefaults -monitor stdio -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -drive file=gluster://10.66.**.**/gv0//rhel6.5-64-qzhang.qcow2,if=none,id=drive-disk0,format=qcow2,cache=none,id=disk0 -device scsi-hd,drive=drive-disk0,bus=scsi0.0,id=scsi-disk0  -drive file=gluster://10.66.**.**/gv0/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device scsi-cd,drive=drive-ide0-1-0,bus=scsi0.0,id=scsi-cdrom,bootindex=1 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:d5:51:8a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=port1,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=port2,bus=virtio-serial0.0,id=port2 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=3,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0,addr=0x5 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6  -drive if=none,id=drive-fdc0-0-0,format=raw,cache=none -global isa-fdc.driveA=drive-fdc0-0-0 -qmp tcp:0:5555,server,nowait -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0

Comment 4 Gerd Hoffmann 2013-12-09 13:57:55 UTC
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6695036

Need turn off MSI for intel-hda, rhel6 doesn't support that.

Comment 5 Gerd Hoffmann 2013-12-09 13:58:28 UTC
patches posted.

Comment 10 Qunfang Zhang 2013-12-18 03:02:16 UTC
Reproduced this bug on qemu-kvm-1.5.3-21.el7.x86_64 and verified pass on qemu-kvm-1.5.3-24.el7.x86_64. 

Steps:
Same as comment 0. 

On qemu-kvm-1.5.3-21.el7.x86_64:
After migration, on dst host:

QEMU 1.5.3 monitor - type 'help' for more information
(qemu) qemu: warning: error while loading state for instance 0x0 of device '0000:00:05.0/intel-hda'
load of migration failed
[root@localhost ~]# 

On qemu-kvm-1.5.3-24.el7.x86_64:

After migration, guest work well on dst host:

(1) (qemu) info status 
VM status: running

(2) Check guest network, mouse/keyboard and then shutdown guest, all work as expected. 

So this bug is fixed.

Comment 11 Ludek Smid 2014-06-13 09:40:01 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.