qubes/vm: fix PCI device detach

This commit is contained in:
Marek Marczykowski-Górecki 2016-06-02 03:18:03 +02:00 committed by Wojtek Porczyk
parent 485e75091b
commit 7e0af81ecc

View File

@ -771,7 +771,8 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
# timeouts on forcible detach at domain destroy; if that fails, too bad
for pci in self.devices['pci']:
try:
self.libvirt_domain.detachDevice(self.lvxml_pci_dev(pci))
self.libvirt_domain.detachDevice(
lxml.etree.tostring(self.lvxml_pci_dev(pci)))
except libvirt.libvirtError as e:
self.log.warning(
'error while gracefully detaching PCI device ({!r}) during'