qubes/vm: fix network attach/detach
This commit is contained in:
parent
3b407eb79e
commit
b24ab45d00
@ -202,8 +202,9 @@ class NetVMMixin(qubes.events.Emitter):
|
|||||||
self.log.info('Starting NetVM ({0})'.format(self.netvm.name))
|
self.log.info('Starting NetVM ({0})'.format(self.netvm.name))
|
||||||
self.netvm.start()
|
self.netvm.start()
|
||||||
|
|
||||||
self.libvirt_domain.attachDevice(lxml.etree.ElementTree(
|
self.libvirt_domain.attachDevice(
|
||||||
self.lvxml_net_dev(self.ip, self.mac, self.netvm)).tostring())
|
lxml.etree.tostring(lxml.etree.ElementTree(
|
||||||
|
self.lvxml_net_dev(self.ip, self.mac, self.netvm))))
|
||||||
|
|
||||||
|
|
||||||
def detach_network(self):
|
def detach_network(self):
|
||||||
@ -213,8 +214,9 @@ class NetVMMixin(qubes.events.Emitter):
|
|||||||
raise qubes.exc.QubesVMNotRunningError(self)
|
raise qubes.exc.QubesVMNotRunningError(self)
|
||||||
assert self.netvm is not None
|
assert self.netvm is not None
|
||||||
|
|
||||||
self.libvirt_domain.detachDevice(lxml.etree.ElementTree(
|
self.libvirt_domain.detachDevice(
|
||||||
self.lvxml_net_dev(self.ip, self.mac, self.netvm)).tostring())
|
lxml.etree.tostring(lxml.etree.ElementTree(
|
||||||
|
self.lvxml_net_dev(self.ip, self.mac, self.netvm))))
|
||||||
|
|
||||||
|
|
||||||
def is_networked(self):
|
def is_networked(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user