PowerCLI

 View Only
  • 1.  Start VM with Powershell on a certain host

    Posted Oct 06, 2020 02:20 PM

    Hi,

    is it possible to start a VM with the Powershell CLI command "start-vm" on a certain host in a cluster?

    I see only the -server option, but i think this is for the vcenter server...

    Can someone help?

    Regards

    Uwe



  • 2.  RE: Start VM with Powershell on a certain host

    Posted Oct 06, 2020 02:28 PM

    You can connect to the host directly with the connect-viserver cmdlet instead of the vcenter server and use start-VM,I use it in my nested lab to shutdown the nested esxi hosts  when I want to power everything off.



  • 3.  RE: Start VM with Powershell on a certain host

    Posted Oct 06, 2020 03:36 PM

    Moderator: Thread moved to the PowerCLI area.



  • 4.  RE: Start VM with Powershell on a certain host

    Posted Oct 06, 2020 03:38 PM

    I assume you mean a cluster enabled for DRS? If so, connecting directly to the host will be the method - bypassing vCenter Server which would otherwise control the VM placement.



  • 5.  RE: Start VM with Powershell on a certain host

    Posted Oct 06, 2020 03:42 PM

    Even if you connect to the ESXi node directly, if that ESXi is part of a cluster with DRS active, DRS might still start/move it on/to another node in the cluster.



  • 6.  RE: Start VM with Powershell on a certain host

    Posted Oct 07, 2020 01:47 PM

    Hi,

    thanks for the information. It works now.

    Regards

    Uwe



  • 7.  RE: Start VM with Powershell on a certain host

    Posted Oct 06, 2020 03:40 PM

    It depends if that ESXi node is part of a cluster with DRS active.

    Normally you can move the VM to the intended ESXi node and then start it.

    But when DRS is active, then DRS might decide to start it on another node in the cluster.

    One option is to temporarily disable DRS