CIatWork
Contributor
Contributor

Customization failed

I am using VI tools to automate creation of VM's in ESX v3.5. VM creation is successsful until I try to apply OScustomization. Does anyone know how to create a VM and apply OScustomization successfully. This is the syntax I have used:

new-vm -name -W2k3srv -VMhost ( Get-VMHost 169.254.248.41 ) -Template ( Get-Template W2k3_Gold ) -Datastore ( Get-Datastore whtstvm-NFS ) -OScustomizationSpec ( Get-OScustomizationSpec TestSysprepFile )

Error message: The operation for the entity vm-202 failed with the following message: "customization failed."

Customization file was created using the VMware Infrastructure Client GUI and works fine if VM cloned from within GUI.

Thanks

Tags (2)
0 Kudos
14 Replies
LucD
Leadership
Leadership

What settings are you trying to change in the OSCustomization ?

I already reported some issues with the IP address.

See .


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
CIatWork
Contributor
Contributor

The settings in the OScustomization are ok. I want to apply the OScustimationSpec to a new VM I am deploying. The VM appears to deploy ok from the Template I specify until it gets to the part where the OScustomization is supposed to attach with the VM.

0 Kudos
LucD
Leadership
Leadership

You could try setting the vpxd log to "verbose" and then run your script again.

That can be done in the VI Client via .

You can check the log via the VI Client or directly in C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\Logs.

Most of the time the error messages in there are quit clear.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
CIatWork
Contributor
Contributor

I checked the log. The sysprep part appeared to go smoothly.

checking customization spec

hostversion = 3.5.0, tools version 7299

sysprep options: -quiet -mini -reseal - reboot

successfully created file c:\windows\temp\imc5cf.tmp

setting param (13 lines of that)

Errors started here. No other details about what caused the abort.

'App' 2928 error (W2k3_Gold) Unexpected exception (vim.fault.customizationFault) during clone. Aborting.

'App' 2928 verbose Event[2503]: Failed to deploy template: Customization failed.

'App' 2928 info -- ERROR task -589 -- vm-202 -- vim.virtualMachine.clone:vin.fault.CustomizationFault:(vim.fault.CustomizationFault) { dynamicType = <unset>, msg = "" }

0 Kudos
LucD
Leadership
Leadership

This is an extract from a successful clone I started from within the VI Toolkit.

After the "Setting param" lines I get another creation of a temporary directory.

The process copies several files from the VC folder.

Since you can clone from the GUI I assume all these files are present ?


[2008-05-05 23:29:30.125 'App' 3576 info] hostVersion = 3.5.0, tools version = 7240

[2008-05-05 23:29:30.125 'App' 3576 info] Sysprep options: -quiet -mini -reseal -reboot

[2008-05-05 23:29:30.125 'App' 3576 info] Successfully created file C:\WINDOWS\TEMP\imc40.tmp

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param Unattended.OemSkipEula to value Yes

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param Unattended.InstallFilesPath to value \sysprep\i386

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param GuiUnattended.OemSkipWelcome to value 1

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param GuiUnattended.OEMSkipRegional to value 1

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param Networking.InstallDefaultComponents to value Yes

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param GuiUnattended.TimeZone to value 110

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param GuiUnattended.AdminEncryptedPassword to value xxxxx

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param UserData.FullName to value My Name

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param UserData.OrgName to value My Org

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param UserData.ProductKey to value xxx

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param UserData.ComputerName to value Prefix-0

[2008-05-05 23:29:30.125 'App' 3576 verbose] Setting param Identification.JoinWorkgroup to value WORKGROUP

[2008-05-05 23:29:30.125 'App' 3576 info] Successfully created directory C:\WINDOWS\TEMP\imc-8

[2008-05-05 23:29:30.125 'App' 3576 verbose] Sysprep output dir: C:/WINDOWS/TEMP/imc-8, verify unattended: true

[2008-05-05 23:29:30.140 'App' 3576 verbose] All supporting files copied successfully

[2008-05-05 23:29:30.171 'App' 3576 verbose] Copied file C:\Program Files\VMware\Infrastructure\VirtualCenter Server\\bootrun.exe to directory C:/WINDOWS/TEMP/imc-8/i386/$OEM$

[2008-05-05 23:29:30.171 'App' 3576 verbose] Copied file C:\Program Files\VMware\Infrastructure\VirtualCenter Server\\bootrunMsg.dll to directory C:/WINDOWS/TEMP/imc-8/i386/$OEM$

[2008-05-05 23:29:30.234 'App' 3576 verbose] Copied file C:\Program Files\VMware\Infrastructure\VirtualCenter Server\\finalizationsetup.bat to directory C:/WINDOWS/TEMP/imc-8/i386/$OEM$

[2008-05-05 23:29:30.234 'App' 3576 verbose] Copied file C:\Program Files\VMware\Infrastructure\VirtualCenter Server\\guestcustutil.exe to directory C:/WINDOWS/TEMP/imc-8/i386/$OEM$

[2008-05-05 23:29:30.234 'App' 3576 verbose] Copied file C:\Program Files\VMware\Infrastructure\VirtualCenter Server\\loginblocker.exe to directory C:/WINDOWS/TEMP/imc-8/i386/$OEM$

[2008-05-05 23:29:30.250 'App' 3576 verbose] Copied file C:\Program Files\VMware\Infrastructure\VirtualCenter Server\\imgcust-reboot.exe to directory C:/WINDOWS/TEMP/imc-8/i386/$OEM$

[2008-05-05 23:29:30.250 'App' 3576 verbose] Copied custom command files successfully.

[2008-05-05 23:29:30.250 'App' 3576 info] Create sysprep file package. Params:

[2008-05-05 23:29:30.250 'App' 3576 info]    file       = C:\WINDOWS\TEMP\imc40.tmp

[2008-05-05 23:29:30.250 'App' 3576 info]    binary dir = C:\Program Files\VMware\Infrastructure\VirtualCenter Server\

[2008-05-05 23:29:30.250 'App' 3576 info]    options    = -quiet -mini -reseal -reboot

[2008-05-05 23:29:30.250 'App' 3576 info]    config     = C:\WINDOWS\TEMP\imc-8

[2008-05-05 23:29:30.250 'App' 3576 info]    sysprep    = C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp

[2008-05-05 23:29:30.250 'App' 3576 info]    tools      = 

[2008-05-05 23:29:30.250 'App' 3576 info]    native     = 

[2008-05-05 23:29:30.250 'App' 3576 info]    nativeArgs = 

You could also try the cloning process from the VI Client and compare the 2 logs.

That could possibly indicate where the VI Toolkit initiated clone went wrong.

If nothing obvious appears in the log I'm afraid I'm at my wits end.

You could open a call with support (I understood you could do that even though the Toolkit is still in beta).


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
CIatWork
Contributor
Contributor

Your system is creating directory C:\WINDOWS\TEMP\imc-8 and copying 4 files to that location directly after "Setting param".

My system is deleting file/directory C:\WINDOWS\TEMP\imc5CF.tmp after "Setting param". Nothing is being copied.

I checked the VC server and files are present in 'C:\Program Files\VMware\infrastructure\VirtualCenter Server' folder.

I will try cloning from VC as you suggest and compare.

Thanks

0 Kudos
CIatWork
Contributor
Contributor

Cloning from VC works prefectly. Folder is being created and files are copied. Something is not right with VI Tools on my machine. Is there a number I can call to get assistance?

Thanks

0 Kudos
halr9000
Commander
Commander

try the support link at the top of this page.

Hal Rottenberg

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
piglet
Enthusiast
Enthusiast

Have a look at my post here: http://communities.vmware.com/thread/146347?tstart=0

Got me out of the hole I was in.

Regards,

piglet

CIatWork
Contributor
Contributor

I will give that a try. Opened a case with Vmware tech support on May 9. No word from them yet.

0 Kudos
simplify_IT
Contributor
Contributor

Even I am hitting the same problem. Here is the script and error message:

-


foreach ($i in 1..3)

{ new-vm -vmhost (get-vmhost -name )

-name "automate"

-template (get-template "demo")

-OSCustomizationSpec (get-OSCustomizationSpec -name "winxp")

-datastore (get-datastore storage1) }

Error Message displayed after the status bar completes:

The operation for the entity vm-157 failed with the following message: "Customization failed."

-


However from GUI I am able to deploy a new VM using the same template and customization spec. I have tried the workaround mentioned in with no success.

Clatwork,

Did you find a solution? Any luck with VMWare tech support?

Thanks in advance.

0 Kudos
admin
Immortal
Immortal

I will give that a try. Opened a case with Vmware tech support on May 9. No word from them yet.

What SR was it?

Thanks

0 Kudos
admin
Immortal
Immortal

Even I am hitting the same problem. Here is the script and error message:

...

However from GUI I am able to deploy a new VM using the same template and customization spec. I have tried the workaround mentioned in with no success.

Clatwork,

Did you find a solution? Any luck with VMWare tech support?

Thanks in advance.

This is a known issue, unfortunately. Are you able to try this workaround? You should be able to drop it into your script fairly easily.

0 Kudos
glynnd1
Expert
Expert

Carter,

Can the resource pools be removed from that function? Or the option to place the VM in the root pool be provided?

Also, can a cluster be specified?

And one last question, the next release?

David

0 Kudos