USB hot attach does not work (hostdev functionality only partially implemented)
Bug #640993 reported by
Serge Hallyn
This bug affects 5 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
Medium
|
Jamie Strandboge | ||
Lucid |
Won't Fix
|
Undecided
|
Unassigned | ||
Maverick |
Won't Fix
|
Medium
|
Unassigned | ||
Natty |
Fix Released
|
Medium
|
Jamie Strandboge |
Bug Description
1. fired up a pre-existing vm
virsh start mav-serv1
2. plugged in a usb drive
3. found the usb address using lsusb, which gave me
Bus 002 Device 006: ID 1058:1023 Western Digital Technologies, Inc.
4. defined a xml file with the device info:
<hostdev mode='subsystem' type='usb'>
<source>
<vendor id='0x1058'/>
<product id='0x1023'/>
</source>
</hostdev>
5. passed the usb drive to the vm
sudo virsh attach-device mav-serv1 /tmp/a.xml
Expected results:
lsusb in the VM shows the device
Actual results:
lsusb in the VM does not show the device until I stop apparmor using
sudo /etc/init.
sudo /etc/init.
As soon as I do that, it shows up in the guest.
tags: | added: apparmor |
Changed in libvirt (Ubuntu): | |
milestone: | none → maverick-updates |
Changed in libvirt (Ubuntu Lucid): | |
status: | New → Triaged |
milestone: | none → lucid-updates |
tags: | added: patch |
To post a comment you must log in.
I see a lot of messages in syslog looking like:
Sep 16 19:14:46 sergelap kernel: [41633.228810] type=1400 audit(128468248 6.737:309) : apparmor="DENIED" operation="open" parent=1 profile= "libvirt- 27f9f30c- 5632-2504- 5006-e329fcf24d 32" name="/dev/bus/
usb/002/009" pid=20410 comm="kvm" requested_mask="rw" denied_mask="rw" fsuid=117 ouid=117
I'll append the profile contents after I re-rerun the test.