VMware Communities
djurgens
Contributor
Contributor

Customization of Windows 2016 server sometimes fails to customize the Network adapters.

We run a cloud management service responsible for provisioning VMs at a customer's request. Our orchestration uses the Java vSphere Web Services API with VI Java. Our flow is as follows:

We Clone the VM from a VM Template,
We Configure the Network adapters from a VirtualMachineConfigSpec adding the Network Adapters that we need.

We Create a VIrtualMachineCustomizationSpec to set the Static IPs and other things required.

We power up the VM and expect the IPs to be set, on some occasions they are not.

I've looked at the guestCust.log in C:\Windows\Temp\vmware-imc. It seems that on the occasions when it fails I see the following lines:

[2019-04-10T08:01:21:                              :  DEBUG] select * from win32_networkadapter where Manufacturer != 'Microsoft' and ServiceName != 'VMnetAdapter' and  manufacturer is not null and MACAddress is not null

[2019-04-10T08:01:21:                              :  DEBUG] Found 0 objects. Pointer 0. return code 1(0x1)

I suspect this is doing a WMI query and not finding any adapter, is this correct?

When its successful I see this instead:

[2019-04-12T14:16:58:                              :  DEBUG] select * from win32_networkadapter where Manufacturer != 'Microsoft' and ServiceName != 'VMnetAdapter' and  manufacturer is not null and MACAddress is not null

[2019-04-12T14:17:07:                              :  DEBUG] Found 1 objects. Pointer 14f3e20. return code 0(0x0)

[2019-04-12T14:17:07:                              :  DEBUG] Found 1 objects. Pointer 14f4378. return code 0(0x0)

[2019-04-12T14:17:07:                              :  DEBUG] Found 1 objects. Pointer 14f4878. return code 0(0x0)

[2019-04-12T14:17:07:                              :  DEBUG] Found 0 objects. Pointer 0. return code 1(0x1)

So this happens infrequently, but when it does it requires intervention by support personnel, so we would like a fix if possible. We have a case with Microsoft but they are claiming that someone from VMware needs to be involved since its happening with the guestcustutil tool. Microsoft is willing to talk to someone from VMware to help resolve this.

So first of all, is my theory correct, that the adapters are not showing up in WMI in time for the guestCustUtil tool to see them?

Any help would be greatly appreciated.

I'll start by attaching a zip file of \Windows\Temp

Thanks

0 Kudos
1 Reply
djurgens
Contributor
Contributor

Here is a zip of the Windows\Temp folder:

0 Kudos