When using virt-install --host-device, the device XML looks like this: <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0' bus='0' slot='25' function='0'/> </source> </hostdev> With managed='yes', libvirt doesn't detach or reset the device before starting the guest, nor does it it re-attach it when the guest is shut down. AFAICS, this is just a typo and we actually want "managed='no'"
Okay, it turns out "managed='yes'" is supposed to detach/reset/reattach the device, not "managed='no'" The fix should be as simple as: @@ -1215,7 +1215,7 @@ static int qemuPrepareHostDevices(virConnectPtr conn, if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) continue; - if (!hostdev->managed) { + if (hostdev->managed) { pciDevice *dev = pciGetDevice(conn, hostdev->source.subsys.u.pci.domain, hostdev->source.subsys.u.pci.bus,
Patch posted to libvir-list: http://www.redhat.com/archives/libvir-list/2009-May/msg00111.html
Being built into libvirt-0.6.2-6.fc11 atm.
Tag request: https://fedorahosted.org/rel-eng/ticket/1748 * Wed May 6 2009 Mark McLoughlin <markmc> - 0.6.2-5.fc11 - Fix handling of <hostdev managed='yes'> (bug #499386)
Tagged now