hello,
i'm trying to develop some PowerCLI scripts for mass-deployment of test VMs. i retrieve existing vCenter OS customization spec, modify it and create new temp spec with changes to deploy new VMs with different settings. and i'm struggling with Linux timezone information.
i have timezone specified in existing custom specs. if i use command "get-oscustomizationspec" for Windows specs it retrieves timezone info correctly. but if i use the same command for Linux spec, it retrieves empty timezone information. does anybody know why?
and if i try to create new Linux spec with "new-oscustomizationspec" i can specify only "-timezone" parameter. this returns error that i cannot use Windows-specific parameters for Linux. i guess it is because Linux also requires "hwClockUTC" parameter which is not available with "new-oscustomizationspec" command at all.
does anybody have experiences with manipulating Linux specs using PowerCLI?
regards,
kipz
Yes, it doesn't work :smileycry:
The Linux parameterset on the New-OSCustomizationSpec cmdlet is not ready for use imho.
The following parameters can be used in the Linux parameterset, but again it doesn't seem to work.
New-OSCustomizationSpec [-OSType <String>] [-Server <VIServer[]>] [-Name <String>] [-Type <OSCustomizationSpecType>] [-DnsServer <String[]>] [-DnsSuffix <String[]>] [-Domain <String>] [-NamingScheme <String>] [-NamingPrefix <String>] [-Description <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
It is possible to create a Linux OSCustomizationSpec with the CreateCustomizationSpec method.
Let me know if you need some sample code.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
hello,
thanks for your responce. i already started to suspect also that it requires direct API manipulation.
kipz
Hi LucD
This is a nold post so wanted to check if there is an update on this; Do we have a final parameter list for Linux.
I am using
$strCustomSpec = New-OSCustomizationSpec -OSType $ostype -Name $strNewVMName -Type NonPersistent `
-NamingScheme Fixed -NamingPrefix $strNewVMName -Confirm:$false
But it is not working; First it shows input box for FullName and OrgName; If I use these 2 flags then the input box is not displayed but error is displayed I need to used either Windows or Linux parameter set.
I'm afraid there has been no change
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I was considering revisiting whether I needed to consolidate my automation code with CustomizationSpecs in mind, but looks like Linux specs still need special TLC. At least that answers that question. Thanks, LucD.