[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] 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.



# HG changeset patch
# User jfehlig@xxxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 10f51535cc840aa5e82d661e3e17d19f9ee3eaf2
# Parent  87f220709073ea356eac71447d81bfb7814179b8
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@xxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 87f220709073 -r 10f51535cc84 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Dec 13 11:23:01 2006 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Dec 12 15:28:23 2006 -0700
@@ -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")

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.