Automation

 View Only
  • 1.  Can I change VM Boot order using Powershell ?

    Posted May 05, 2009 03:11 PM

    Hi,

    I am trying to find a way to change the VM boot order using VI Powershell. Is there a cmdlet option to do it ?

    Any help is appreciated.

    Thanks.



  • 2.  RE: Can I change VM Boot order using Powershell ?
    Best Answer

    Posted May 05, 2009 03:28 PM

    Afaik there is no way of changing the VM's boot order with the VITK.

    But you can configure the devices from which the guest can boot.

    Have a look at



  • 3.  RE: Can I change VM Boot order using Powershell ?

    Posted May 05, 2009 03:36 PM

    Are you trying to change the boot order of the guest OS inside the VMs? Or are you trying to determine in which order the VMs are started by the host service? i.e. is this what you are looking for?

    PS C:\> gcm -CommandType cmdlet *startpolicy*
    
    CommandType     Name                          Definition
    -----------     ----                          ----------
    Cmdlet          Get-VMHostStartPolicy         Get-VMHostStartPolicy [[-...
    Cmdlet          Get-VMStartPolicy             Get-VMStartPolicy [[-VM] ...
    Cmdlet          Set-VMHostStartPolicy         Set-VMHostStartPolicy [-V...
    Cmdlet          Set-VMStartPolicy             Set-VMStartPolicy [-Start...






    [vExpert|http://www.vmware.com/communities/vexpert/], PowerShell MVP, VI Toolkit forum moderator

    Author of the book: Managing VMware Infrastructure with PowerShell

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

    Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org



  • 4.  RE: Can I change VM Boot order using Powershell ?

    Posted May 05, 2009 03:42 PM

    I am looking for a way to specify the boot order for the VM. Currently it is "PXE, CD, HD" and I want to change it to "HD, CD, PXE".



  • 5.  RE: Can I change VM Boot order using Powershell ?

    Posted May 05, 2009 04:28 PM

    That is currently not possible with PS. You can specify the devices but not the order.

    The order is kept in the NVRAM file.

    There are some tricks like mentioned in this thread .

    You create a NVRAM file that has the correct boot order and copy it to your similar VMs.

    But I suspect that this is not a supported method :smileysad:



  • 6.  RE: Can I change VM Boot order using Powershell ?

    Posted May 05, 2009 06:41 PM

    Thanks LucD. The scripting option worked.