This system tray utility will enumerate all your Hyper-V VMs and allow you to start
& stop
the VMs when necessary. It also has an Open Shell
option where you can easily SSH into the selected VM.
- A Windows OS (tested on Windows 10 Pro)
- .NET Framework 4.0 Runtime or higher - Download
- An SSH Client - (Git Bash, Windows built-in SSH, PuTTY, etc.)
- Administrative Privileges in Windows - Required for executing Hyper-V PowerShell Commands
The settings.json
in the same directory as the HyperVMs binary contains all the configuration needed to run it.
defaultShell
- By default this is set towindowsTerminal
, and possible values arecmd
,powershell
,powershellCore
&windowsTerminal
. You can even setup a completely new shell with correct arguments and use it.sshCommand
- Thessh
client command used to shell into the VM. The default would work if the ssh client has a commandssh
available in thePATH
variable.autorun
- Determines ifHyperVMs
would autorun on windows startup
{
"shells": {
"cmd": {
"command": "cmd.exe",
"arguments": "/c"
},
"powershell": {
"command": "powershell.exe",
"arguments": ""
},
"powershellCore": {
"command": "pwsh.exe",
"arguments": "-c"
},
"windowsTerminal": {
"command": "wt.exe",
"arguments": ""
}
},
"sshCommand": "ssh",
"defaultShell": "windowsTerminal",
"autorun": true,
"hosts": {}
}
-
Prior to using the
Open Shell
action, SSH connectivity needs to be setup between host & guest (i.e. Installing SSH Server, setting up private & public keys) -
Preferred shell to open via
Open Shell
can be configured in Settings (i.e. useOpen Settings
menu item) -
By default CMD, PowerShell, PowerShell Core & Windows Terminal shells are configured in
settings.json
, and one can be picked as the default shell -
The user name used to SSH into the VM will asked the 1st time, and will be saved in the settings.json for subsequent uses.
-
Currently HyperVMs can directly shell into VMs configured with the Hyper-V Default Switch. If an Internal or External Switch is used, then the host records need to be setup in the
%WINDIR%/System32/drivers/etc/hosts
file.If the Hyper-V VM Name is "SomeVM", then the hostname
SomeVM.mshome.net
would need to be mapped into the corresponding IP manually.
.NET Framework 4.0 SDK is needed to build the project - Download.
- Clone the repository
- Open the
HyperVMs.sln
in Visual Studio to build & run