[Spice-devel] QEMU hangs when shutdown windows7 guest with virtio-serial drivers installed

Dunrong Huang riegamaths at gmail.com
Fri Nov 16 02:02:33 PST 2012


Hi all:

I meet a weird problem:
If I I boot QEMU with virtio-serial being enabled and assign only one
cpu to windows VM, when I shutdown VM, QEMU hangs with using 100% cpu.

the command line I use is:
~/usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -smp 1 -device
virtio-serial-pci -chardev spicevmc,id=charchannel1,name=vdagent
-device virtserialport,chardev=charchannel1,id=channel1,name=com.redhat.spice.0
-spice port=5900,addr=0.0.0.0,disable-ticketing -vga qxl -global
qxl-vga.vram_size=67108864 win7.qcow2 -usb -device usb-ehci
-readconfig ich9-ehci-uhci.cfg -chardev
spicevmc,name=usbredir,id=usbredirchardev1 -device
usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3 -chardev
pty,id=charconsole0 -device
virtconsole,chardev=charconsole0,id=console0 -snapshot

I have installed virtio-serial drivers using virtio-win-0.1-30.iso in
windows guest. QEMU is installed using latest git tree.

I am rather surprised that in the following case, guest will not hang.
1) If I assign more than one cpu to guest, e.g. "-smp 2", guest will not hang.

2) If I do not use usbredir, i.e. delete thest parameters from command line:
       "-usb -device usb-ehci -readconfig ich9-ehci-uhci.cfg -chardev
spicevmc,name=usbredir,id=usbredirchardev1 -device
usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3"
    guest will not hang too.

3) If I dont use pty, i.e. delete these parameters,
        " -chardev pty,id=charconsole0 -device
virtconsole,chardev=charconsole0,id=console0",
     guest will not hang too.


I don't know what make QEMU hang, windows virtio-serial driver, QEMU
virtio-serial or usb redirection?

Any help is appreciated.
--
Best Regards,

Dunrong Huang


More information about the Spice-devel mailing list