core: ignore error when PCI device already "detached"
This can be the case at startup, when all network devices are connected to pciback module by initramfs.
This commit is contained in:
parent
5b0b62ee5b
commit
7e355c5dad
@ -1597,7 +1597,14 @@ class QubesVm(object):
|
||||
# Bind pci devices to pciback driver
|
||||
for pci in self.pcidevs:
|
||||
nd = vmm.libvirt_conn.nodeDeviceLookupByName('pci_0000_' + pci.replace(':','_').replace('.','_'))
|
||||
nd.dettach()
|
||||
try:
|
||||
nd.dettach()
|
||||
except libvirt.libvirtError:
|
||||
if libvirt.virGetLastError()[0] == libvirt.VIR_ERR_INTERNAL_ERROR:
|
||||
# allready detached
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
||||
self.libvirt_domain.createWithFlags(libvirt.VIR_DOMAIN_START_PAUSED)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user