Skip to content

Latest commit

Β 

History

79 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

QuickVM - Fast Hyper-V Virtual Machine Manager πŸš€

QuickVM Logo Release Go Version License Build Status

A beautiful TUI-based command-line tool for managing Hyper-V virtual machines

Features β€’ Installation β€’ Usage β€’ Screenshots


✨ Features

  • 🎨 Beautiful TUI Interface - Interactive table view with color-coded VM states and responsive actions
  • ⚑ Quick Commands - Start/stop/restart VMs by index number
  • πŸš€ Concurrent Batch Operations - Start, stop, or restart multiple VMs simultaneously (1 3 5, --range 1-5, or --all) with bounded parallel worker pools
  • πŸ›‘οΈ Reliable & Idempotent - Graceful handling of already running VMs, deterministic result ordering, and strict 60s context timeout safety
  • πŸ€– AI-Agent & Scripting Ready - Machine-readable JSON output mode (--output json / -o json) across all commands
  • πŸ“Š Real-time Monitoring - Live VM status, CPU usage, memory, and uptime
  • 🎯 Easy Navigation - Keyboard shortcuts for efficient VM management
  • πŸ”„ Auto-refresh - Keep your VM list up-to-date with a single keypress
  • πŸ’» Windows Native - Direct integration with Hyper-V via safe PowerShell execution

πŸ“‹ Prerequisites

  • Windows 10/11 with Hyper-V enabled
  • Administrator privileges (required for Hyper-V management)
  • Go 1.27.0 or higher (for building from source)

πŸš€ Installation

Quick Install (Recommended)

For the easiest installation experience:

  1. Download the latest release package for your architecture

  2. Extract the ZIP file to a folder

  3. Run the installation menu

    • Double-click install-menu.bat, or
    • Right-click on install-menu.ps1 β†’ Run with PowerShell
  4. Choose your installation location:

    • Option 1 (System): Install to C:\Windows\System32 - available globally for all users (requires Admin)
    • Option 2 (User): Install to %USERPROFILE%\bin - available for current user (recommended)
    • Option 3 (Current): Keep in current directory - portable mode

Automated Install

For scripted or custom installations:

# Install for current user (recommended)
.\install.ps1 -InstallLocation User

# Install system-wide (requires Admin)
.\install.ps1 -InstallLocation System

# Keep in current directory
.\install.ps1 -InstallLocation Current

# Additional options
.\install.ps1 -InstallLocation User -CreateAlias  # Add 'qvm' alias

Build from Source

For developers or those who want the latest code:

# Clone the repository
git clone https://github.com/hoangtran1411/quickvm.git
cd quickvm

# Download dependencies
go mod download

# Build the application
go build -ldflags="-s -w" -o quickvm.exe

# Lint the code (requires golangci-lint v2.8.0+)
golangci-lint run

# Install using the menu
.\install-menu.bat

πŸ“– Usage

Interactive TUI Mode

Launch the interactive interface by running:

quickvm

Keyboard Shortcuts:

  • ↑/↓ - Navigate through VMs
  • Enter - Start the selected VM
  • s - Stop the selected VM
  • t - Restart the selected VM
  • r - Refresh VM list
  • q or Esc - Quit

Command Line Mode

List all VMs

quickvm list
# or
quickvm ls

Start VMs

# Start a single VM by index
quickvm start 1

# Start multiple VMs concurrently (parallel execution)
quickvm start 1 3 5

# Start a range of VMs
quickvm start --range 1-5

# Start all VMs
quickvm start --all

Stop VMs

# Stop a single VM
quickvm stop 1

# Stop multiple or all VMs
quickvm stop 1 2 3
quickvm stop --all

Restart VMs

# Restart a single VM or a range
quickvm restart 1
quickvm restart --range 1-3

AI Agent & Structured Output (JSON)

All commands support --output json (-o json) for machine-readable automation:

# List all VMs in JSON format
quickvm list -o json

# Batch start VMs with JSON status reporting
quickvm start 1 2 -o json

# Get system info as structured JSON
quickvm info -o json

View System Information

quickvm info

This will display:

  • πŸ–₯️ CPU: Name and number of cores
  • πŸ’Ύ Memory: Total, used, and free RAM (in MB and GB)
  • πŸ’Ώ Disk Drives: Name, free space, and total capacity for each drive
  • πŸ”§ Hyper-V Status: Whether Hyper-V is enabled or disabled

Update QuickVM

# Check for updates and install
quickvm update

# Check for updates without installing
quickvm update --check-only

# Auto-install without prompting
quickvm update -y

# Check for updates before running any command
quickvm --update list

Enable Hyper-V

# Enable Hyper-V (will prompt for restart if needed)
quickvm enable

# Enable and restart immediately
quickvm enable -y

# Enable without restarting (manual restart required)
quickvm enable --no-restart

⚠️ Note: The enable command requires Administrator privileges.

Snapshot Management

# List all snapshots for a VM
quickvm snapshot list 1

# Create a new snapshot
quickvm snapshot create 1 "Before Update"

# Restore a VM to a snapshot
quickvm snapshot restore 1 "Before Update"

# Delete a snapshot
quickvm snapshot delete 1 "Old Snapshot"

Export/Import VMs

# Export a VM to a directory
quickvm export 1 "D:\Backups\VMs"

# Import a VM from an exported directory
quickvm import "D:\Backups\VMs\MyVM"

# Import with options
quickvm import "D:\Backups\VMs\MyVM" --copy        # Copy VM files
quickvm import "D:\Backups\VMs\MyVM" --new-id      # Generate new VM ID

GPU Passthrough (GPU-P)

# Check GPU partitioning support
quickvm gpu status

# Add GPU partition to a VM (requires Admin)
quickvm gpu add 1

# Remove GPU partition from a VM
quickvm gpu remove 1

# Show driver paths for manual copy to guest
quickvm gpu drivers

Remote Desktop (RDP)

# Connect to a running VM via RDP
quickvm rdp 1

# Connect with auto-login credentials
quickvm rdp 1 -u "admin@password123"

Workspace Management (VM Groups)

# Create a workspace with specific VMs
quickvm ws create "DevEnvironment" --vms "Proxy,WebApp,DB"

# List all workspaces
quickvm ws list

# Start all VMs in a workspace
quickvm ws start "DevEnvironment"

# Stop all VMs in a workspace
quickvm ws stop "DevEnvironment"

🎯 Quick Examples

# View all VMs in a formatted table
quickvm list

# Start the first VM in the list
quickvm start 1

# Stop the second VM
quickvm stop 2

# Restart the third VM
quickvm restart 3

# Launch interactive mode for visual management
quickvm

πŸ—οΈ Architecture

QuickVM is built with clean architecture principles:

quickvm/
β”œβ”€β”€ cmd/            # CLI commands (Cobra)
β”‚   β”œβ”€β”€ root.go            # Root command & TUI launcher
β”‚   β”œβ”€β”€ list.go            # List VMs command
β”‚   β”œβ”€β”€ start.go           # Start VM command
β”‚   β”œβ”€β”€ stop.go            # Stop VM command
β”‚   β”œβ”€β”€ restart.go         # Restart VM command
β”‚   β”œβ”€β”€ output_helpers.go  # Concurrent batch operations & worker pool
β”‚   β”œβ”€β”€ info.go            # System info command
β”‚   β”œβ”€β”€ snapshot.go        # Snapshot management
β”‚   β”œβ”€β”€ clone.go           # Clone VM command
β”‚   β”œβ”€β”€ export.go          # Export VM command
β”‚   β”œβ”€β”€ import.go          # Import VM command
β”‚   β”œβ”€β”€ gpu.go             # GPU passthrough management
β”‚   β”œβ”€β”€ rdp.go             # Remote Desktop connection
β”‚   β”œβ”€β”€ workspace.go       # VM group management
β”‚   β”œβ”€β”€ enable.go          # Enable Hyper-V command
β”‚   β”œβ”€β”€ update.go          # Update command
β”‚   └── version.go         # Version & build info
β”œβ”€β”€ internal/       # Private application logic
β”‚   β”œβ”€β”€ hyperv/            # Hyper-V integration layer
β”‚   β”‚   β”œβ”€β”€ hyperv.go      # Core VM management & idempotency
β”‚   β”‚   β”œβ”€β”€ snapshot.go    # Snapshot operations
β”‚   β”‚   β”œβ”€β”€ clone.go       # Clone operations
β”‚   β”‚   β”œβ”€β”€ export.go      # Export/Import operations
β”‚   β”‚   β”œβ”€β”€ gpu.go         # GPU passthrough logic
β”‚   β”‚   β”œβ”€β”€ rdp.go         # RDP & Credential logic
β”‚   β”‚   β”œβ”€β”€ sysinfo.go     # Hardware & System info
β”‚   β”‚   └── workspace.go   # Workspace profile logic
β”‚   └── output/            # Formatter for console tables & AI-agent JSON
β”œβ”€β”€ ui/             # TUI components (Bubble Tea)
β”‚   └── table.go           # Interactive dashboard
β”œβ”€β”€ updater/        # Auto-update functionality
β”œβ”€β”€ main.go         # Application entry point
└── go.mod          # Go modules

πŸ› οΈ Technologies

🎨 Design Principles

  1. User Experience First - Intuitive keyboard navigation and clear visual feedback
  2. Performance - Fast VM operations with minimal overhead
  3. Reliability - Comprehensive error handling, automated testing, and proper process management via Context API
  4. Beauty - Color-coded states and modern terminal aesthetics

πŸ“š Documentation

For more detailed information, check out our comprehensive documentation:

Getting Started

User Guides

Developer Documentation

πŸ”’ Permissions

QuickVM requires administrator privileges because it manages Hyper-V virtual machines. Always run PowerShell or Command Prompt as Administrator when using QuickVM.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Charm.sh team for the amazing TUI libraries
  • Cobra framework for CLI management
  • The Go community for continued support

πŸ“§ Contact

For questions, suggestions, or issues, please open an issue on GitHub.


Made with ❀️ by a Go enthusiast Hoang Tran

⭐ Star this repo if you find it useful!

About

QuickVM - Fast Hyper-V Virtual Machine Manager

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages