Automation

 View Only
  • 1.  About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 01:31 PM

    How can I use the New-OSCustomizationSpec command to create a configuration with a time zone?

    But linux-type [VM Customization Specifications] cannot be created with the [-Timezone] option.



  • 2.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 01:38 PM

    You can't.
    This is not a PowerCLI thing.
    The OSCustomizationSpec for Windows is basically using the Windows sysprep tool with an unattended.txt file.
    And there is an option to specify the TimeZone in there.

    The Linux OSCustomizationSpec is very limited in its parameters.
    That is because there is no sysprep like tool that works for all Linux distributions.



  • 3.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 01:47 PM

    Okay, it seems that I can only edit it manually.



  • 4.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 02:07 PM

    Edit what?



  • 5.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 02:17 PM

    Manually edit the linux configuration file in [VM Customization Specifications] to configure TIMEZONE.

    YanSi_0-1624889837232.png

     



  • 6.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 02:23 PM

    Just wondering which PowerCLI version are you using?

    For me the TimeZone parameter is available with OSType Linux



  • 7.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 02:56 PM

    About "You must specify only parameters that belong to the same parameter set, Windows or Linux."

    What's the meaning?



  • 8.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 03:01 PM


  • 9.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 03:02 PM

    Several PowerShell (and PowerCLI) cmdlets have so-called ParametersSets.
    In short, some parameters can not be combined with other parameters.
    This also goes for the New-OSCustomizationSpec cmdlet, there is a Linux and a Windows parameterset.

    In your code the -OSType Linux indicates that you are using the Linux parameterset, and then parameters like OrgName and FullName are not allowed.



  • 10.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 03:08 PM

    YanSi_0-1624892823483.png

    I don't see that Linux has the Timezone parameter.



  • 11.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 03:48 PM

    There is indeed an issue with that cmdlet, see also customization specification set timezone linux - VMware Technology Network VMTN

    As an alternative, you could use the API directly.
    Something like this

     



  • 12.  RE: About VM Customization Specifications Time Zone Setting

    Posted Jun 28, 2021 03:51 PM

    Thank you for your enthusiastic answer



  • 13.  RE: About VM Customization Specifications Time Zone Setting
    Best Answer