VMware Cloud Community
AndrewEa
Contributor
Contributor

Nested ESXi guest customization fails intermittently

Hi all,

I am trying to get Guest customization working reliably between vCenter 7.0.3 and ESXi 8.0U2 guest OS.

I've followed all the advice from William Lam and 7/10 times, identical attempts at cloning with guest customizations will work as expected with the new VM getting a new host name, IP and connecting to the network.

3/10 times the guest customization fails, I've attached the entire /var/log/vmware-imc/toolsDeployPkg.txt from a failed attempt, but I believe the pertinent part is:

DEBUG:imc.nested_esx_utils:['esxcli', 'network', 'ip', 'interface', 'list']
ERROR:root:(b'Connection failed: 503 Service Unavailable\n', 1)

So when the guest customization script tries to run the "esxi network ip interface list" command, the esxi service is responding with a 503. 

If I run the command manually afterwards it works fine, this leads me to believe that the most likely scenario is that the ESX services haven't finished initializing by the time the guest customization is being started?

Has anyone else experienced this?

Is there anyway to run commands on the guest os before the guest customization that I could leverage to fix this (sleep etc!)?

Labels (2)
Tags (1)
0 Kudos
3 Replies
xuyenphungngoc
Contributor
Contributor

Pls notice me when this is addressed

0 Kudos
xiaofengw
VMware Employee
VMware Employee

You are right, if esxcli network is not ready when running guest customization, it issue will occur. I have opened an internal PR to address this issue and plan to fix it in our incoming release.

0 Kudos
xiaofengw
VMware Employee
VMware Employee

This issue is fixed and will be available on next release.

0 Kudos