VMware {code} Community
tanmay11112222
Contributor
Contributor

Way to check guest customisation status

Hi,

Is there any way to figure out that guest customisation (specific sysprep) execution is complete in a VM? Any flag in pyVmomi API?

Thanks in advance.

Reply
0 Kudos
2 Replies
daphnissov
Immortal
Immortal

Usually not as guest customization status isn't called back. You can use other checks to ensure that VMtools are running or it has an IP address if you know that variable. Entering a loop to check status on this is really the only reliable way to know if it's complete and, more importantly, was successful.

Reply
0 Kudos
0x7C0
Contributor
Contributor

This is not true, the vmware customization does indeed call back to vmware. VMware deploys a custom executable together with it's sysprep xml file. This executable is called in 4 different stages. And the status is exposed through this API: vSphere Web Services API - VMware API Explorer - VMware {code}

You get three events:

- Customization started, as the vmware customization does not take place instantly after the vm is cloned and powered on, but instead takes a few seconds to come up.

- Customization succeeded, called in the final state of the sysprep, if you receive this event, the sysprep is complete.

- Customization failed, if you receive this event, the customization failed. You should check the logs and/or retry deploying the vm.

Reply
0 Kudos