Allow adding VIF devices to VM in halted state
PATCH 1/1 Allow adding VIF devices to VM in halted state
This patch permits VIF devices to be added to a VM in the halted state. With this patch I am finally able to build up and activate a new VM using the XenAPI c-bindings, e.g.
xen_vm_create()
xen_vbd_create()
xen_vif_create()
xen_vm_start()
Regards,
Jim
# HG changeset patch
# User [email protected]
# Date 1165962503 25200
# Node ID f9d831a1f09789e565d245598f652410bfb39cce
# Parent 37141c3a3d39956ad5faf2d4e2a91276eaca557b
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.
tools/python/xen/xend/XendDomainInfo.py +1 -1
@@ -2031,7 +2031,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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Ewan Mellor
AppliedQuoted 12 lines · Jim Fehlig
This patch permits VIF devices to be added to a VM in the halted state. With this patch I am finally able to build up and activate a new VM using the XenAPI c-bindings, e.g.
xen_vm_create()
xen_vbd_create()
xen_vif_create()
xen_vm_start()Regards,
Jim
Quoted 8 lines
# HG changeset patch
# User [email protected]
# Date 1165962503 25200
# Node IDf9d831a1f09789e565d245598f652410bfb39cce
# Parent37141c3a3d39956ad5faf2d4e2a91276eaca557b
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 <[email protected]>
Applied, thanks Jim.
Ewan.