This tutorial guides you through deploying HyperSDK and running your first VM export job.
docker pull ghcr.io/ssahani/hypersdk-hypervisord:latest
docker volume create hypersdk-data
docker volume create hypersdk-exports
Create an environment file:
cat > hypersdk.env <<EOF
GOVC_URL=https://vcenter.example.com/sdk
GOVC_USERNAME=administrator@vsphere.local
GOVC_PASSWORD=your-secure-password
GOVC_INSECURE=1
LOG_LEVEL=info
EOF
docker run -d \
--name hypersdk \
--env-file hypersdk.env \
-p 8080:8080 \
-p 8081:8081 \
-v hypersdk-data:/data \
-v hypersdk-exports:/exports \
ghcr.io/ssahani/hypersdk-hypervisord:latest
# Check container status
docker ps | grep hypersdk
# Check health endpoint
curl http://localhost:8080/health
# View logs
docker logs -f hypersdk
Expected output from health endpoint:
{
"status": "healthy",
"version": "v0.2.0",
"uptime": "5m30s"
}
Open your browser and navigate to:
http://localhost:8080/web/dashboard/
The dashboard provides:
git clone https://github.com/ssahani/hypersdk.git
cd hypersdk/deployments/docker
# Copy example environment file
cp .env.example .env
# Edit with your credentials
vim .env
Minimal .env configuration:
# vSphere credentials
GOVC_URL=https://vcenter.example.com/sdk
GOVC_USERNAME=administrator@vsphere.local
GOVC_PASSWORD=your-password
# Daemon configuration
LOG_LEVEL=info
DAEMON_PORT=8080
METRICS_PORT=8081
# Optional: Redis cache
REDIS_ENABLED=true
REDIS_MAX_MEMORY=256mb
docker compose up -d
This starts:
docker compose ps
Expected output:
NAME STATUS PORTS
hypersdk-hypervisord Up 0.0.0.0:8080->8080/tcp, 0.0.0.0:8081->8081/tcp
hypersdk-redis Up 0.0.0.0:6379->6379/tcp
hypersdk-prometheus Up 0.0.0.0:9090->9090/tcp
hypersdk-grafana Up 0.0.0.0:3000->3000/tcp
cd hypersdk/deployments/kubernetes
# Copy secrets template
cp base/secrets.yaml.example overlays/development/secrets.yaml
# Edit with your credentials
vim overlays/development/secrets.yaml
Example secrets configuration:
apiVersion: v1
kind: Secret
metadata:
name: vsphere-credentials
namespace: hypersdk
type: Opaque
stringData:
url: "https://vcenter.example.com/sdk"
username: "administrator@vsphere.local"
password: "your-password"
# Using deployment script
./deployments/scripts/deploy-k8s.sh development
# Or manually with kubectl
kubectl create namespace hypersdk
kubectl apply -f overlays/development/secrets.yaml
kubectl apply -k overlays/development
kubectl rollout status deployment/hypervisord -n hypersdk
kubectl port-forward -n hypersdk svc/hypervisord 8080:8080
In another terminal:
curl http://localhost:8080/health
Open browser to: http://localhost:8080/web/dashboard/
/exports/my-first-exportSubmit an export job using curl:
curl -X POST http://localhost:8080/jobs/submit \
-H "Content-Type: application/json" \
-d '{
"vm": "/Datacenter/vm/my-test-vm",
"output": "/exports/my-first-export",
"format": "ova",
"compress": true
}'
Expected response:
{
"job_id": "job-20260130-123456",
"status": "queued",
"vm": "/Datacenter/vm/my-test-vm",
"created_at": "2026-01-30T12:34:56Z"
}
# Query specific job
curl http://localhost:8080/jobs/query?id=job-20260130-123456
# List all jobs
curl http://localhost:8080/jobs/query
Job status response:
{
"job_id": "job-20260130-123456",
"status": "running",
"progress": 45,
"vm": "/Datacenter/vm/my-test-vm",
"output": "/exports/my-first-export",
"started_at": "2026-01-30T12:35:10Z",
"estimated_completion": "2026-01-30T12:40:00Z"
}
Watch the job in real-time:
# Using watch command
watch -n 2 'curl -s http://localhost:8080/jobs/query?id=job-20260130-123456 | jq'
# Or view logs
docker logs -f hypersdk # Docker
kubectl logs -f -n hypersdk deployment/hypervisord # Kubernetes
Docker/Podman:
# List exported files
docker exec hypersdk ls -lh /exports/my-first-export
# Copy to host
docker cp hypersdk:/exports/my-first-export ./my-first-export
Kubernetes:
# List files in PVC
kubectl exec -n hypersdk deployment/hypervisord -- ls -lh /exports/my-first-export
# Copy to local machine
kubectl cp hypersdk/hypervisord-pod:/exports/my-first-export ./my-first-export
curl http://localhost:8081/metrics
Key metrics to monitor:
hypersdk_export_jobs_total - Total export jobshypersdk_export_jobs_running - Currently running jobshypersdk_export_jobs_failed - Failed jobshypersdk_export_bytes_transferred - Bytes transferredhypersdk_http_requests_total - API request countAccess Grafana at http://localhost:3000 (admin/admin)
Pre-configured dashboards:
# Check logs for errors
docker logs hypersdk
# Common issues:
# - Missing or invalid cloud credentials
# - Port 8080/8081 already in use
# - Volume permission issues
# Test connectivity from container
docker exec hypersdk curl -k https://vcenter.example.com/sdk
# Verify credentials
docker exec hypersdk env | grep GOVC
# Check job details
curl http://localhost:8080/jobs/query?id=<job-id>
# Common issues:
# - Invalid VM path (case-sensitive)
# - Insufficient disk space in /exports
# - Network connectivity to vSphere
# - Permission issues on datastore
# Check health endpoint
curl -v http://localhost:8080/health
# If unhealthy, check:
# - Database connectivity (SQLite file permissions)
# - Disk space in /data volume
# - Container resource limits (memory/CPU)
# Docker
docker ps | grep hypersdk # Check status
docker logs -f hypersdk # View logs
docker exec hypersdk hyperctl status # Check daemon status
docker compose down && docker compose up -d # Restart stack
# Kubernetes
kubectl get pods -n hypersdk # Check pods
kubectl logs -f -n hypersdk deployment/hypervisord # View logs
kubectl describe pod -n hypersdk <pod-name> # Pod details
kubectl delete pod -n hypersdk <pod-name> # Restart pod
# API
curl http://localhost:8080/health # Health check
curl http://localhost:8080/status # Daemon status
curl http://localhost:8080/vms/list # List VMs
curl http://localhost:8081/metrics # Prometheus metrics
/data - Database and configuration/exports - VM export output/config - Optional configuration files