Hi All,
After taking bits of code from here and other (LucD + Mr Epping amongst many others - cheers!) I'm nearly done with a script to deploy a template with 3 NICs and addresses, masks and GW from a CSV.
Everything seems to work nicely, but I keep getting the error 'Fault.NicSettingMismatch.summary' when the customization of a the temporary non persistent spec takes place.
The code is here
Original custom spec is got here:
Get-OSCustomizationSpec -Name $Spec | New-OSCustomizationSpec -Name TempSp -Type NonPersistent
The we work on a nonpersistent copy to make the amendments to the IP, Mask and GW:
# Setup the IP addresses
New-VM -Name $vm.Name -OSCustomizationSpec $osCust -Template $Template -VMHost $NewHost -Datastore $NewDatastore
to do the clone from template.
I get output that suggests the customisation is OK .... i.e. right IPs in the right positions but still it fails.
The template deploys with 3 NICs on the right portgroups, and when I boot it manually it has not received any customisation at all (name not changed etc.)
Any ideas? I can put the full script up if it helps. Guest is RHEL 6.
All help gratefully received 🙂
Quick update. Applying the Customisation spec directly to the template seems to work as intended, so the problem is occurring when I copy it up to
a non persistent spec to edit the NIC parameters. I got this from these forums so hopefully it might narrow it down a bit.
You might want to have a look in the vpxd log on your vCenter, normally that log shows some extra information when there is a fault.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc - sorted it in the end. I had an extra line at the top of the script that effectively meant I was copying the spec into the temp spec twice .. for some reason this equated to a temp spec that was blank. Anyway, once this was sorted I was deploying 100 VMs in about 1/2 an hour ... got to love PowerCLI 🙂
Indeed
Glad you found the source of the problem
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference