mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Allow adding VIF devices to a VM when in halted state. Do not attempt to create the VIF device if VM is in halted state.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
This commit is contained in:
1 parent
0a85a374e0
commit
379e2ea7a9
1 file changed
+1
-1
@@ -2045,7 +2045,7 @@ class XendDomainInfo:
|
||||
if not dev_uuid:
|
||||
raise XendError('Failed to create device')
|
||||
|
||||
if self.state in (DOM_STATE_HALTED,):
|
||||
if self.state in (XEN_API_VM_POWER_STATE_RUNNING,):
|
||||
sxpr = self.info.device_sxpr(dev_uuid)
|
||||
devid = self.getDeviceController('vif').createDevice(sxpr)
|
||||
raise XendError("Device creation failed")
|
||||
|
||||