mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
esx: Update ID after starting a domain
This commit is contained in:
parent
435fa6d709
commit
6139b27477
@ -2483,6 +2483,7 @@ esxDomainCreateWithFlags(virDomainPtr domain, unsigned int flags)
|
|||||||
esxVI_ObjectContent *virtualMachine = NULL;
|
esxVI_ObjectContent *virtualMachine = NULL;
|
||||||
esxVI_String *propertyNameList = NULL;
|
esxVI_String *propertyNameList = NULL;
|
||||||
esxVI_VirtualMachinePowerState powerState;
|
esxVI_VirtualMachinePowerState powerState;
|
||||||
|
int id = -1;
|
||||||
esxVI_ManagedObjectReference *task = NULL;
|
esxVI_ManagedObjectReference *task = NULL;
|
||||||
esxVI_TaskInfoState taskInfoState;
|
esxVI_TaskInfoState taskInfoState;
|
||||||
|
|
||||||
@ -2497,8 +2498,8 @@ esxDomainCreateWithFlags(virDomainPtr domain, unsigned int flags)
|
|||||||
esxVI_LookupVirtualMachineByUuidAndPrepareForTask
|
esxVI_LookupVirtualMachineByUuidAndPrepareForTask
|
||||||
(priv->primary, domain->uuid, propertyNameList, &virtualMachine,
|
(priv->primary, domain->uuid, propertyNameList, &virtualMachine,
|
||||||
priv->autoAnswer) < 0 ||
|
priv->autoAnswer) < 0 ||
|
||||||
esxVI_GetVirtualMachinePowerState(virtualMachine,
|
esxVI_GetVirtualMachinePowerState(virtualMachine, &powerState) < 0 ||
|
||||||
&powerState) < 0) {
|
esxVI_GetVirtualMachineIdentity(virtualMachine, &id, NULL, NULL) < 0) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2521,6 +2522,7 @@ esxDomainCreateWithFlags(virDomainPtr domain, unsigned int flags)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
domain->id = id;
|
||||||
result = 0;
|
result = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
Reference in New Issue
Block a user