Many "Safely remove" icons on virtualized XPs

Bug #804593 reported by Horacio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu-kvm (Ubuntu)
Fix Released
Medium
Serge Hallyn

Bug Description

I've installed three XPs on an Ubuntu 11.04 server, to virtualize desktops on top of Linux+KVM. There are running ok, with storage and network virtio drivers. The problem is that I got many "Safely remove" icons for:
- PCI Intel 82371B
- PCI RAM
- VirtIO SCSI controller
- VirtIO Ethernet
- VGA

If the user unplug some of this devices, the virtual machine crashes!

I've found some references like, without luck...
- https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=579737
- https://bugzilla.redhat.com/show_bug.cgi?id=498774 (PRIVATE, couldn't look for solutions there)
- https://bugzilla.redhat.com/show_bug.cgi?id=671544 (PRIVATE, couldn't look for solutions there)
- https://launchpad.net/ubuntu/+source/qemu-kvm/0.12.3+noroms-0ubuntu9.9 (Mark certain devices as non-hotpluggable)

I've searched for a way to disable pci hot-unplugging in the docs of libvirt, but couldn't found any way to disable that.

I'm using virsh 0.8.8 and qemu-kvm-0.14.0. I've searched Ubuntu's bugs, and haven't found anything related to this problem...

CVE References

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for submitting this bug and helping to make Ubuntu better

Can you describe in detail how you created these virtual machines? I.e.
which exact virtinst command, or which steps in virt-manager?

Can you, for one of the VMs, do

   virsh dumpxml vmname > vmname.xml

(substituting the name for 'vmname') and attach the resulting file
vmname.xml?

Changed in qemu-kvm (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Horacio (hgdeoro) wrote :

On my pc, for testing purpouses, I've installed using:

~$ virt-install -n winxp -r 512 --cpu host -c /mnt/kvm/winxp.iso --os-type=windows --os-variant=winxp --boot=cdrom --disk path=/mnt/kvm/winxp.qcow2,device=disk --nonetworks --graphics vnc,port=5910 -v --accelerate --noreboot --noautoconsole

The attached file is from this installation, on my pc.

On the server I used:

~$ virt-install -n winxp01 -r 320 \
        -c /.../win-xp-professional.iso --os-type=windows --os-variant=winxp \
        --boot cdrom --disk path=/dev/vg_default/lv_winxp01_disk1 --network bridge=br0 \
        --graphics=vnc,listen=0.0.0.0,password=......... --virt-type=kvm \
        --autostart --noreboot --noautoconsole

On the server I've configured virtio for storage and network. On my pc I'm not using virtio. In both cases, I've the same problem.

Changed in qemu-kvm (Ubuntu):
status: Incomplete → New
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(Commits like "0965f12da61cbfe62252d21a8e6fa309753760e8: piix: tag as not hotpluggable", which are in natty, are supposed to prevent this)

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(Still waiting for download to complete so I can reproduce, but)

perhaps commit "505597e4476a6bc219d0ec1362b760d71cb4fdca: Ignore pci unplug requests for unpluggable devices (CVE-2011-1751)" will help.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Horacio,

The bug report does not list your precise qemu version. A somewhat recent update to natty's qemu added the commit "505597e4476a6bc219d0ec1362b760d71cb4fdca: Ignore pci unplug requests for unpluggable devices (CVE-2011-1751)".

Can you retry with qemu-kvm 0.14.0+noroms-0ubuntu4.3 and let us know if you can still reproduce?

Note, I tried to reproduce, but I only was able to hot-unplug the 'PCI ram controller', and unplugging it did not affect qemu-kvm.

Changed in qemu-kvm (Ubuntu):
status: New → Incomplete
importance: Low → High
importance: High → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(Changing to medium priority - there's not really a way to prevent this, but OTOH it only crashes the guest)

Revision history for this message
Horacio (hgdeoro) wrote :

Before upgrading:
- qemu-kvm: 0.14.0+noroms-0ubuntu4 -> Removing VGA device crashes the guest

After upgrading, I'm running with:
- qemu-kvm: 0.14.0+noroms-0ubuntu4.1
- qemu-common: 0.14.0+noroms-0ubuntu4.1
- libvirt-bin: 0.8.8-1ubuntu6.2
- libvirt0: 0.8.8-1ubuntu6.2

Now the guest doesn't crashes any more.

But if the user selects 'Safely remove' on the 'Red Hat VirtIO Ethernet Adapter', the virtual machine loses network connection... This could be a mayor problem, since they are accessed using RDP by non-technical users. I don't know if this is a bug... But can cause problems if the user selects this option accidentally. Should I report this as another bug?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for the confirmation, Horacio.

Yes, please open a separate bug for this. I'm not sure how that should be viewed or handled, but the underlying issue is different so a different bug will help us reason through it.

Changed in qemu-kvm (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.