Automation

 View Only
  • 1.  New-OSCustomizationSpec and DNS name for Linux machine

    Posted Feb 21, 2018 09:52 AM

    Hi!

    I dont' undestand, how i can set DNS name (guest name) for New-OSCustomizationSpec Linux machine.

    I want the VM name to be different from the guest's DNS name.

    Please enter examples.



  • 2.  RE: New-OSCustomizationSpec and DNS name for Linux machine

    Posted Feb 21, 2018 10:00 AM

    You can't when the guest OS is a Linux flavour.

    As documented in the New-OSCustomizationNicMapping cmdlet, the Dns parameter is only valid for a Windows guest OS.

    The way around this is to configure the DNS settings inside the guest OS through the Invoke-VMScript cmdlet after the VM has been created.

    Note that this requires that the VMware Tools are installed and running.



  • 3.  RE: New-OSCustomizationSpec and DNS name for Linux machine

    Posted Feb 21, 2018 10:08 AM

    Thanks! but i cant it beleave it!

    When i run gui for Linux VM, i can modify Name (Guest name) , and can't in Powercli :-(



  • 4.  RE: New-OSCustomizationSpec and DNS name for Linux machine

    Posted Feb 21, 2018 10:19 AM

    The GUI screenshot is the ComputerName, not the DNS servers

    Also note that you can try with the DnsServer parameter on the New-OSCustomizationSpec cmdlet to set up the DNS servers.



  • 5.  RE: New-OSCustomizationSpec and DNS name for Linux machine

    Posted Feb 21, 2018 10:24 AM

    Thanks Lucd!

    I agree.

    I wont enter ComputerName for Linux machine in PowerCli (New-OSCustomizationSpec)

    it is impossible to do?

    ONLY Invoke?



  • 6.  RE: New-OSCustomizationSpec and DNS name for Linux machine
    Best Answer

    Posted Feb 21, 2018 10:33 AM

    Ok, I think I understand where the confusion is coming from.

    You mentioned 'DNS name' in the thread title, which I took for the set up of the DNS Servers, while you obviously mean the hostname inside the guest OS.

    That you can set, in a limited way, with the NamingScheme parameter of the New-OSCustomizationSpec cmdlet.

    The GUI screenshot conatins the same options as you can find in the NamingScheme options.

    If the hostname can't be realised through the available schemes, you can use the Invoke-VMScript cmdlet to send the command to the guest OS.



  • 7.  RE: New-OSCustomizationSpec and DNS name for Linux machine

    Posted Feb 21, 2018 10:40 AM

    Thanks again!