5-Minute Setup Guide - Get started with HyperSDK workflow integration
✅ hyper2kvm installed ✅ HyperSDK repository cloned ✅ Go 1.19+ installed ✅ Python 3.8+ installed
cd /home/ssahani/go/github/hypersdk/cmd/hyperctl
go build -o hyperctl .
Verify:
./hyperctl workflow --help
./hyperctl manifest --help
sudo mkdir -p /var/lib/hyper2kvm/manifest-workflow/{to_be_processed,processing,processed,failed}
sudo mkdir -p /var/lib/hyper2kvm/output
sudo chown -R $(whoami):$(whoami) /var/lib/hyper2kvm
cat > /tmp/manifest-daemon.yaml <<EOF
command: daemon
daemon: true
manifest_workflow_mode: true
manifest_workflow_dir: /var/lib/hyper2kvm/manifest-workflow
output_dir: /var/lib/hyper2kvm/output
max_concurrent_jobs: 3
verbose: 2
log_file: /tmp/workflow-daemon.log
EOF
cat > /tmp/test-vm.json <<'EOF'
{
"version": "1.0",
"pipeline": {
"load": {
"source_type": "vmdk",
"source_path": "/path/to/your/vm.vmdk"
},
"inspect": {
"enabled": true,
"detect_os": true
},
"fix": {
"fstab": {"enabled": true, "mode": "stabilize-all"},
"grub": {"enabled": true},
"initramfs": {"enabled": true, "regenerate": true}
},
"convert": {
"output_format": "qcow2",
"compress": true
}
}
}
EOF
Update the source_path to point to a real VM disk!
# Start daemon (in terminal 1)
python3 -m hyper2kvm --config /tmp/manifest-daemon.yaml
# Submit manifest (in terminal 2)
cp /tmp/test-vm.json /var/lib/hyper2kvm/manifest-workflow/to_be_processed/
# Watch progress
watch -n 1 'ls -lR /var/lib/hyper2kvm/manifest-workflow/'
# Check workflow status
/home/ssahani/go/github/hypersdk/cmd/hyperctl/hyperctl workflow -op status
# Validate manifest
/home/ssahani/go/github/hypersdk/cmd/hyperctl/hyperctl manifest validate -file /tmp/test-vm.json
# Submit manifest (requires HyperSDK daemon running)
/home/ssahani/go/github/hypersdk/cmd/hyperctl/hyperctl manifest submit -file /tmp/test-vm.json
# Start HyperSDK daemon
cd /home/ssahani/go/github/hypersdk
go run ./cmd/daemon --config config.yaml
# Open browser
firefox http://localhost:8080/web/dashboard/
# Via CLI
ls -la /var/lib/hyper2kvm/manifest-workflow/processing/
# Via HyperCTL
/home/ssahani/go/github/hypersdk/cmd/hyperctl/hyperctl workflow -op list
# List completed
ls -la /var/lib/hyper2kvm/manifest-workflow/processed/
# View processing report
cat /var/lib/hyper2kvm/manifest-workflow/processed/*/your-manifest.json.report.json
# List failed
ls -la /var/lib/hyper2kvm/manifest-workflow/failed/
# View error details
cat /var/lib/hyper2kvm/manifest-workflow/failed/*/your-manifest.json.error.json
HYPERCTL="/home/ssahani/go/github/hypersdk/cmd/hyperctl/hyperctl"
# Workflow operations
$HYPERCTL workflow -op status # Daemon status
$HYPERCTL workflow -op list # List all jobs
$HYPERCTL workflow -op queue # Queue statistics
$HYPERCTL workflow -op watch # Real-time monitoring
# Manifest operations
$HYPERCTL manifest create # Interactive builder
$HYPERCTL manifest validate -file <manifest.json>
$HYPERCTL manifest submit -file <manifest.json>
$HYPERCTL manifest generate <vm-path> <output-dir>
# Status
curl http://localhost:8080/api/workflow/status | jq
# List jobs
curl http://localhost:8080/api/workflow/jobs | jq
# Active jobs
curl http://localhost:8080/api/workflow/jobs/active | jq
# Submit manifest
curl -X POST http://localhost:8080/api/workflow/manifest/submit \
-H "Content-Type: application/json" \
-d @test-vm.json | jq
# Validate manifest
curl -X POST http://localhost:8080/api/workflow/manifest/validate \
-H "Content-Type: application/json" \
-d @test-vm.json | jq
For processing multiple VMs:
{
"version": "1.0",
"batch": true,
"vms": [
{
"name": "web-server-1",
"pipeline": {
"load": {
"source_type": "vmdk",
"source_path": "/vms/web1.vmdk"
},
"fix": {
"fstab": {"enabled": true, "mode": "stabilize-all"}
},
"convert": {
"output_format": "qcow2",
"compress": true
}
}
},
{
"name": "web-server-2",
"pipeline": {
"load": {
"source_type": "vmdk",
"source_path": "/vms/web2.vmdk"
},
"fix": {
"fstab": {"enabled": true, "mode": "stabilize-all"}
},
"convert": {
"output_format": "qcow2",
"compress": true
}
}
}
]
}
# Check Python module
python3 -m hyper2kvm --version
# Check directories exist
ls -la /var/lib/hyper2kvm/manifest-workflow/
# Check logs
tail -f /tmp/workflow-daemon.log
# Check daemon is running
ps aux | grep hyper2kvm
# Check file permissions
ls -la /var/lib/hyper2kvm/manifest-workflow/to_be_processed/
# Check daemon logs
tail -f /tmp/workflow-daemon.log
# Ensure HyperSDK daemon is running
curl http://localhost:8080/health
# Start HyperSDK daemon if needed
cd /home/ssahani/go/github/hypersdk
go run ./cmd/daemon --config config.yaml
cd /home/ssahani/tt/hyper2kvm
./demo_hypersdk_integration.sh
cd /home/ssahani/tt/hyper2kvm
./test_hypersdk_integration.sh
HYPERSDK_INTEGRATION.mdINTEGRATION_TEST_REPORT.mdHYPERSDK_INTEGRATION_SUCCESS.md| File | Location |
|---|---|
| HyperCTL | /home/ssahani/go/github/hypersdk/cmd/hyperctl/hyperctl |
| Workflow Dirs | /var/lib/hyper2kvm/manifest-workflow/ |
| Output Dirs | /var/lib/hyper2kvm/output/ |
| Example Manifests | /home/ssahani/tt/hyper2kvm/examples/manifest-workflow/ |
| Test Scripts | /home/ssahani/tt/hyper2kvm/test_*.sh |
| Demo Script | /home/ssahani/tt/hyper2kvm/demo_*.sh |
After following this guide, you should have:
Need Help?
Check the comprehensive documentation:
HYPERSDK_INTEGRATION.md - Full integration guideINTEGRATION_TEST_REPORT.md - Detailed test resultsHYPERSDK_INTEGRATION_SUCCESS.md - Complete feature listQuick Commands Reference:
# Build
cd /home/ssahani/go/github/hypersdk/cmd/hyperctl && go build .
# Start daemon
python3 -m hyper2kvm --config /tmp/manifest-daemon.yaml
# Submit manifest
cp manifest.json /var/lib/hyper2kvm/manifest-workflow/to_be_processed/
# Monitor
./hyperctl workflow -op watch
Quick Start Complete! 🚀
You now have a working HyperSDK + hyper2kvm workflow integration.