Search code examples
powershellhyper-vwindows-server-2016

Hyper-V Start-VM stuck on "Connecting to..."


I want to start a VM from command line (running win server 2016),
but I found that the command Start-VM will cause the VM stuck on "Connecting to...",
the preview screen always shows black. enter image description here

Until I opened the VM (double click on its name in Manager), it starts installing and works fine.
(It shows "connecting to" in the beginning.)

enter image description here

I can start the VM perfectly via Hyper-V Manager, but I can't start it using command line Start-VM. Why? How to solve this problem? Any help is appreciated!


Solution

  • Don't use CMD but Use powershell and type

    Start-VM -Name "virtual machine name"