I need some help with my deployment script. The script runs and does not throw any errors, but the deployed VM's take the name of the VM I converted to template to use for deployment and they each get IP's assigned through DHCP instead of static. I have my Customization Spec set to take the name of the VM and to use static IP 's and after the script runs I see the IP's im trying to assign in there but they are not assigned to the new servers. my script is attached if anyone could please help, I have to demo this on thursday and its getting close. Thank you in advance for your help!!
I think there only was an ESX 4.1 Update 2.
See KB2002337 for all the patches in Update 2.
You can also download from here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
What did you define in your OSCustomizationSpec for the Computer Name ?
And is the Network part set to Custom Settings ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I assume your using PowerCLI 5.0.1 by now ?
From a 32-bit PowerCLI session ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes sir, PowerCLi 5 via the 32Bit console. It seems there is something wrong with the name array and IP array. I'm not yet good enough to find out why. I am supposed to demo this on Thursday afternoon, it's getting close.
Perhaps an obvious question, but did you poweron the VMs and let the sysprep do it's work ?
After the first poweron, sysprep will run and make the changes (as you requested in the OSCustomizationSpec) to the new VM.
Btw, there is nothing wrong with the arrays as far as I can see.
Tried the code, and it works flawlessly.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I have deployed many times and I'm sure I've waited for them to sysprep. I deployed two last night, and just powered them to see. This environment is in an isolated lab without a data connection; because of this, the activation period has expired on the template OS even though I gave a product key.
I'm redeploying a fresh server from our standard template, will install the apps, then convert it to template today before the activation expires. I guess I should stand up a licensing server in the lab to avoid this in the future. It's very good to hear that the script does work, thank you for your time Luc!! I'm sure you’re a busy guy and for you to take time and help out is very generous of you.
No problem, glad to help.
You were on vSphere 4.1 if I'm not mistaken ?
If yes, have a look at vCenter 4 Update 1 doesn’t support Windows 2008 guest customization?
Perhaps the VMware Tools in your template were old as well ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, I'm on VSphere 4.1.
The Hosts details says - VSphere 4.1.0, 348481 I'm assuming that is update 3? Since I don’t have a data connection in the lab, I have to find the offline package for all updates then I have walk them in manually with a stick. ☺ Fun!
I have searched for the latest VSphere 4.1 update 4 and latest VM Tools offline packages, I have not been able to locate them. Do you have a link by any chance?
I think there only was an ESX 4.1 Update 2.
See KB2002337 for all the patches in Update 2.
You can also download from here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Luc, so now that we have updated the ESX host, I created a new server with SP and apps and converted it to template. I still don’t get the guest os renamed and static IP’s named
Do I need to have WAIK or sysprep installed on the template? These are 2008R2 servers if that matters.
I'm at a total loss here Luc. Everything I have read says this should work. And even you said it works. Need help!
For Windows 2008 R2 you don't need to install sysprep files, see KB1005593.
Is there any indication of why the rename failed in the file C:\Windows\TEMP\vmware-imc\guestcust.log, that you should find in the guest ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This is the guestcust.log. I am not sure which part to focus on. I see there are ) devices found under the NicAdapter section. Can that be part of the problem. Thanks for your help Luc!
Customization in progress set to 1 at 2012-Apr-24 13:26:21
Rpci: Sending request='deployPkg.update.state 4 0 C:\Windows\TEMP\vmware-imc\guestcust.log'
Rpci: Sent request='deployPkg.update.state 4 0 C:\Windows\TEMP\vmware-imc\guestcust.log', reply='', len=0, status=1
System Drive: C:
Moving directory 'sysprep' to 'C:'
select * from win32_networkadapter where Manufacturer != 'Microsoft' and ServiceName != 'VMnetAdapter' and manufacturer is not null and MACAddress is not null
Found 0 objects. Pointer 0. return code 1(0x1)
Executing command C:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /reboot /unattend:C:\sysprep\sysprep.xml
Successfully executed command C:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /reboot /unattend:C:\sysprep\sysprep.xml
Rpci: Sending request='deployPkg.update.state 4 103 C:\Windows\TEMP\vmware-imc\guestcust.log@4000'
Rpci: Sent request='deployPkg.update.state 4 103 C:\Windows\TEMP\vmware-imc\guestcust.log@4000', reply='', len=0, status=1
Could it be that there are no NICs in the template you are using ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Luc, There is one nic attached to the template.