Tuesday, February 25, 2014

Mouseless Hyper-V VM stuff

Here is a brief collection of stuff I found useful when switching from using mouse to keyboard for launching virtual machines.

This is all on Windows 8.1, but some or all may work on earlier versions.

You can list the virtual machines using get-vm. This will produce a list which includes the VM names.

You can then use the names to start and stop the VMs using start-vm and stop-vm. They both take the VM name as the first parameter and support wildcards. stop-vm shuts down the image by default, but you can use -Save or –TurnOff switches: use get-help stop-vm for more details.

I usually use Remote Desktop to interact with VMs. You can launch this by calling the client application. The following command line will connect in full screen. Use mstsc /? to get more help.

mstsc /v:machinename /f

You can break out of the VM session by pressing Ctrl+Alt+Home. The screen may seem the same, but the focus is now back with the local host machine, not the virtual machine, so your key presses are passed to the host. You can now Alt+Tab through the other applications running on the host, including other Remote Desktop sessions, so you can use this to switch between sessions.

No comments: