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:
jfehlig@jfehlig2.provo.novell.com committed 2006-12-12 15:28:23 -07:00
1 parent 0a85a374e0
commit 379e2ea7a9
1 file changed
+1 -1
+1 -1
View File
@@ -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")
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.