mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
xenapi: Update ID after starting a domain
This commit is contained in:
parent
6139b27477
commit
2f5097f38d
@ -1459,6 +1459,7 @@ xenapiDomainCreateWithFlags (virDomainPtr dom, unsigned int flags)
|
|||||||
xen_vm_set *vms;
|
xen_vm_set *vms;
|
||||||
xen_vm vm;
|
xen_vm vm;
|
||||||
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
||||||
|
int64_t domid = -1;
|
||||||
|
|
||||||
virCheckFlags(0, -1);
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
@ -1475,6 +1476,10 @@ xenapiDomainCreateWithFlags (virDomainPtr dom, unsigned int flags)
|
|||||||
xen_vm_set_free(vms);
|
xen_vm_set_free(vms);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xen_vm_get_domid(session, &domid, vm);
|
||||||
|
dom->id = domid;
|
||||||
|
|
||||||
xen_vm_set_free(vms);
|
xen_vm_set_free(vms);
|
||||||
} else {
|
} else {
|
||||||
if (vms) xen_vm_set_free(vms);
|
if (vms) xen_vm_set_free(vms);
|
||||||
|
Loading…
Reference in New Issue
Block a user