A Go CLI for managing Azure Virtual Machines directly from the terminal, built with the Azure SDK and Cobra.
- Authenticate with Azure CLI
- List Azure Virtual Machines
- Check VM status
- Start, stop, and restart Azure Virtual Machines
- Inspect VM compute and network information
- Deterministically diagnose available VM and network information
- Cross-platform release binaries for macOS, Linux, and Windows
Download the latest release for your operating system and architecture from the GitHub Releases page.
Available release binaries:
- macOS Apple Silicon (
darwin-arm64) - macOS Intel (
darwin-amd64) - Linux x86_64 (
linux-amd64) - Linux ARM64 (
linux-arm64) - Windows x86_64 (
windows-amd64)
Choose the binary that matches your operating system and CPU architecture.
Download the appropriate macOS binary from the GitHub Releases page.
For Apple Silicon Macs, use the binary ending in:
darwin-arm64
For Intel Macs, use:
darwin-amd64
The filename shown below is only an example. Use the exact filename of the binary you downloaded.
For example:
sudo install -m 755 azvm-v0.3.0-darwin-arm64 /usr/local/bin/azvmAfter installation, you can run:
azvm login
azvm list
azvm status my-vm
azvm start my-vm
azvm stop my-vm
azvm restart my-vm
azvm inspect my-vm
azvm doctor my-vmDownload the appropriate Linux binary from the GitHub Releases page.
For x86_64 systems, use the binary ending in:
linux-amd64
For ARM64 systems, use:
linux-arm64
The filename shown below is only an example. Use the exact filename of the binary you downloaded.
For example:
sudo install -m 755 azvm-v0.3.0-linux-amd64 /usr/local/bin/azvmAfter installation, you can run:
azvm login
azvm list
azvm status my-vm
azvm start my-vm
azvm stop my-vm
azvm restart my-vmDownload the Windows x86_64 binary from the GitHub Releases page.
The Windows binary ends in:
windows-amd64.exe
For example, if the downloaded file is:
azvm-v0.3.0-windows-amd64.exe
and place it in a directory on your PATH.
One simple option is to create a personal bin directory:
mkdir "$HOME\bin" -Force
Move-Item .\azvm-v0.3.0-windows-amd64.exe "$HOME\bin\azvm.exe"Then add $HOME\bin to your user PATH.
After restarting PowerShell, you can run:
azvm login
azvm list
azvm status my-vm
azvm start my-vm
azvm stop my-vm
azvm restart my-vmYou can verify that Windows can find the command with:
Get-Command azvm- Azure CLI
- An active Azure subscription
- Azure permissions to access and manage Virtual Machines
azvm currently uses the Azure CLI for authentication.
Log in with:
azvm loginThis runs:
az loginThe currently selected Azure subscription is used automatically by azvm.
You can verify the active Azure subscription with:
az account showazvm listExample:
Name: my-vm, Resource Group: my-resource-group, Location: westeurope
azvm status my-vmExample:
Name: my-vm, Status: VM running
azvm inspect my-vmazvm doctor <vm-name>inspect shows VM configuration and context. doctor interprets the
available Azure VM and network information using deterministic checks and
reports detected problems. It does not perform SSH, TCP, DNS, firewall, NSG,
or routing tests.
Example output (values are illustrative):
VM: my-vm
Compute
Status: VM running
Location: westeurope
Resource Group: production
Size: Standard_B2s
OS: Linux
Network
NIC: my-vm-nic
VNet: production-vnet
Subnet: backend
Private IP: 10.0.2.14
Public IP: none
azvm start my-vmExample:
Started VM: my-vm
azvm stop my-vmExample:
Stopped VM: my-vm
azvm restart my-vmExample:
Restarted VM: my-vm
Building from source is only necessary for development or if you want to build azvm yourself.
git clone https://github.com/leprpht/azvm.git
cd azvmBuild the application:
make buildRun the application:
make runRun tests:
make testFormat the code:
make fmtUpdate dependencies:
make tidyRemove build artifacts:
make cleanThe development binary is created at:
bin/azvm
azvm uses semantic versioning:
vMAJOR.MINOR.PATCH
For example:
v0.2.1
Release binaries are automatically built for supported platforms using GitHub Actions when a version tag is pushed.
Supported release targets:
- macOS Apple Silicon
- macOS Intel
- Linux x86_64
- Linux ARM64
- Windows x86_64
- Azure CLI login
- List VMs
- VM status
- Start VM
- Stop VM
- Restart VM
- VM diagnostics / doctor
- Public IP
- SSH
- Remote command execution
azvm is licensed under the MIT License. See LICENSE for details.