aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Bolte <matthias.bolte@googlemail.com>2010-07-30 17:13:38 +0200
committerMatthias Bolte <matthias.bolte@googlemail.com>2010-07-30 17:14:02 +0200
commit2f5097f38d7f886db41682ed2837736cb4cc8e7b (patch)
tree546a26613816144f4eac2629e4766b9682c5f1fc
parentesx: Update ID after starting a domain (diff)
downloadlibvirt-2f5097f38d7f886db41682ed2837736cb4cc8e7b.tar.gz
libvirt-2f5097f38d7f886db41682ed2837736cb4cc8e7b.tar.bz2
libvirt-2f5097f38d7f886db41682ed2837736cb4cc8e7b.zip
xenapi: Update ID after starting a domain
-rw-r--r--src/xenapi/xenapi_driver.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index e38564863..2262cef09 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1459,6 +1459,7 @@ xenapiDomainCreateWithFlags (virDomainPtr dom, unsigned int flags)
xen_vm_set *vms;
xen_vm vm;
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
+ int64_t domid = -1;
virCheckFlags(0, -1);
@@ -1475,6 +1476,10 @@ xenapiDomainCreateWithFlags (virDomainPtr dom, unsigned int flags)
xen_vm_set_free(vms);
return -1;
}
+
+ xen_vm_get_domid(session, &domid, vm);
+ dom->id = domid;
+
xen_vm_set_free(vms);
} else {
if (vms) xen_vm_set_free(vms);