Welcome to hypersdk - the Go implementation of the hyper2kvm migration toolkit!
A high-performance, daemon-based VM export system that provides:
hyperexport) - Beautiful terminal UI for manual exportshypervisord) - REST API service for automationhyperctl) - Manage daemon jobs from command lineBuilt with:
Choose the deployment method that best fits your environment:
Get up and running in under 5 minutes with containers:
# Build and start full stack
git clone https://github.com/ssahani/hypersdk.git
cd hypersdk
./deployments/scripts/build-images.sh --builder podman
cd deployments/docker && podman compose up -d
# Access dashboard
open http://localhost:8080/web/dashboard/
Includes: HyperSDK + Redis + Prometheus + Grafana monitoring
See Docker/Podman Guide for details.
Deploy to Kubernetes with Kustomize:
git clone https://github.com/ssahani/hypersdk.git
cd hypersdk
./deployments/scripts/deploy-k8s.sh development
kubectl port-forward -n hypersdk svc/hypervisord 8080:8080
See Kubernetes Guide for details.
Install directly on Linux:
# Install RPM package
sudo dnf install hypersdk-*.rpm
# Or build from source
make build && sudo make install
See Installation Guide for details.
export GOVC_URL='https://your-vcenter.com/sdk'
export GOVC_USERNAME='administrator@vsphere.local'
export GOVC_PASSWORD='your-password'
export GOVC_INSECURE=1
# Start daemon
cd ~/projects/hypersdk
./build/hypervisord
# Open in browser
xdg-open http://localhost:8080/web/dashboard/
What You Can Do:
Dashboard URLs:
http://localhost:8080/web/dashboard/http://localhost:8080/web/dashboard/vm-console.htmlcd ~/projects/hypersdk
./build/hyperexport
Then:
Terminal 1 - Start Daemon:
./build/hypervisord
Terminal 2 - Submit Jobs:
# Single VM
./build/hyperctl submit -vm "/datacenter/vm/my-vm" -output "/tmp/export"
# Or from YAML
./build/hyperctl submit -file example-job.yaml
# Check status
./build/hyperctl query -all
Create my-export.yaml:
name: "my-first-export"
vm_path: "/datacenter/vm/my-test-vm" # Change this to your VM path
output_path: "/tmp/my-export"
options:
parallel_downloads: 4
remove_cdrom: true
./build/hyperctl submit -file my-export.yaml
# Watch all jobs
./build/hyperctl query -all
# Watch daemon status
./build/hyperctl status
# View logs
tail -f /tmp/hypervisord.log
The interactive CLI (./build/hyperexport) automatically discovers all VMs.
Create batch-export.yaml:
jobs:
- name: "vm-1"
vm_path: "/datacenter/vm/vm-1"
output_path: "/tmp/export-vm-1"
- name: "vm-2"
vm_path: "/datacenter/vm/vm-2"
output_path: "/tmp/export-vm-2"
- name: "vm-3"
vm_path: "/datacenter/vm/vm-3"
output_path: "/tmp/export-vm-3"
Submit:
./build/hyperctl submit -file batch-export.yaml
# Get job ID first
./build/hyperctl query -all
# Cancel it
./build/hyperctl cancel -id <job-id>
./build/hyperctl status
Output:
ββββββββββββββ¬βββββββββ
| Metric | Value |
|ββββββββββββββββββββ|
| Version | 1.0.0 |
| Uptime | 5m30s |
| Total Jobs | 5 |
| Running | 2 |
| Completed | 3 |
| Failed | 0 |
ββββββββββββββ΄βββββββββ
Perfect for integrating with your Python hyper2kvm project:
import requests
# Submit job
resp = requests.post("http://localhost:8080/jobs/submit", json={
"name": "python-export",
"vm_path": "/datacenter/vm/my-vm",
"output_path": "/tmp/export"
})
job_id = resp.json()["job_ids"][0]
# Check status
status = requests.post("http://localhost:8080/jobs/query",
json={"job_ids": [job_id]}).json()
print(status["jobs"][0]["status"]) # "running", "completed", etc.
ββ ββ ββ ββ ββββββ βββββββ ββββββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ
βββββββ ββββ ββββββ βββββ ββββββ
ββ ββ ββ ββ ββ ββ ββ
ββ ββ ββ ββ βββββββ ββ ββ
Hypervisor to KVM Migration Tool
Exporting my-vm: 45% |βββββββββββββββββββ| (2/4 files)
β disk-0.vmdk (23 GB) - Complete
β disk-1.vmdk (15 GB) - Complete
β disk-2.vmdk (18 GB) - Downloading 67%
disk-3.vmdk (8 GB) - Pending
Multiple VMs export in parallel - each in its own goroutine!
SUCCESS Connected to vSphere successfully!
SUCCESS Found 201 virtual machine(s)
ββ Connection Info ββββββββββββββββββββββ
| vCenter: https://10.73.213.134/sdk |
| User: administrator@vsphere.local |
βββββββββββββββββββββββββββββββββββββββββ
Select a VM to export [type to search]:
> my-test-vm
production-web-server
dev-database
...
# Jobs
ββββββββββββββ¬ββββββββββ¬βββββββββββββββββ¬ββββββββββ¬βββββββββββββ¬ββββββββββ
| Job ID | Name | VM Path | Status | Progress | Started |
|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ|
| abc123... | vm-1 | .../my-vm | running | export 45% | 10:30:15|
| def456... | vm-2 | .../other-vm | complete| 100% | 10:25:00|
ββββββββββββββ΄ββββββββββ΄βββββββββββββββββ΄ββββββββββ΄βββββββββββββ΄ββββββββββ
sudo cp build/hypervisord /usr/local/bin/
/etc/systemd/system/hypervisord.service:
[Unit]
Description=Hypervisord - VM Export Daemon
After=network.target
[Service]
Type=simple
User=vmexport
Environment="GOVC_URL=https://vcenter.example.com/sdk"
Environment="GOVC_USERNAME=admin@vsphere.local"
Environment="GOVC_PASSWORD=secret"
Environment="GOVC_INSECURE=1"
ExecStart=/usr/local/bin/hypervisord
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo systemctl enable hypervisord
sudo systemctl start hypervisord
sudo systemctl status hypervisord
| Variable | Required | Description |
|---|---|---|
GOVC_URL |
β Yes | vCenter SDK URL |
GOVC_USERNAME |
β Yes | vCenter username |
GOVC_PASSWORD |
β Yes | vCenter password |
GOVC_INSECURE |
No | Skip TLS verification (1=yes) |
GOVC_DATACENTER |
No | Default datacenter |
DOWNLOAD_WORKERS |
No | Parallel downloads (default: 4) |
LOG_LEVEL |
No | debug/info/warn/error (default: info) |
Check:
# Test credentials
echo $GOVC_URL
echo $GOVC_USERNAME
# Try direct connection
curl -k $GOVC_URL
Solution:
/sdkGOVC_INSECURE=1 for self-signed certsCheck daemon logs:
tail -f /tmp/hypervisord.log
Common causes:
Automatic retry happens 3 times. If still failing:
df -h /tmpping vcenter.example.comparallel_downloads: 1 to job fileAfter starting hypervisord, open your browser to:
http://localhost:8080/web/dashboard/
Submit Jobs:
/datacenter/vm/my-vm/tmp/exportMonitor Jobs:
Discover VMs:
Access at: http://localhost:8080/web/dashboard/vm-console.html
Features:
Using VNC Console:
The dashboard uses these key endpoints:
# Jobs
GET /jobs/query?all=true # List all jobs
POST /jobs/submit # Submit new job
GET /jobs/progress/<id> # Get job progress
# VMs
GET /libvirt/domains # List libvirt VMs
GET /vms/list # List VMware VMs
# Console
GET /console/info?name=<vm> # Get console info
GET /console/vnc?name=<vm> # Open VNC console
GET /console/serial?name=<vm> # Open serial console
GET /console/screenshot?name=<vm># Take screenshot
# Health
GET /health # Health check
./hypervisord --disable-web
# Or in config: web.disabled=true
Try your first export:
# Interactive mode
./build/hyperexport
# OR daemon mode
./build/hypervisord &
./build/hyperctl submit -vm "/path/to/your/vm" -output "/tmp/export"
./build/hyperctl query -all
Happy migrating! π
Part of the hyper2kvm project family