Library to manage VM's on hosts - mirror
Find a file
Till Wegmueller 407baab42f
Make QEMU backend fully functional end-to-end
The scaffolding compiled but couldn't actually run VMs because QEMU
was missing vCPU/memory/networking args, VmHandle didn't persist enough
state for restart, and CLI commands discarded updated handles after
operations.

Key changes:
- Add vcpus, memory_mb, disk_gb, network, ssh_host_port, mac_addr to
  VmHandle with serde(default) for backward compat
- Make NetworkConfig serializable with serde(tag = "type")
- Change Hypervisor trait: start/stop/suspend/resume return Result<VmHandle>
  so backends can return updated PID, VNC addr, etc.
- Complete QEMU start() with -smp, -m, tap/user-mode networking, stale
  socket cleanup, PID reading, and VNC querying via QMP
- Fix guest_ip() to return 127.0.0.1 for user-mode networking and
  filter ARP entries by bridge for tap mode
- Add QMP query_vnc() and fix unwrap() panics in send_command()
- All CLI commands now persist the updated VmHandle after operations
- Add input validation in create with miette diagnostics
- Atomic state persistence (write-to-tmp + rename)
- SSH: port-aware connections, try ed25519/ecdsa/rsa key types
- Enhanced status/list output with vCPUs, memory, network, SSH port
- New tests: NetworkConfig roundtrip, VmHandle roundtrip, backward compat

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 18:58:02 +01:00
brand/nebula-vm Add vm-manager library and vmctl CLI 2026-02-14 18:25:17 +01:00
crates Make QEMU backend fully functional end-to-end 2026-02-14 18:58:02 +01:00
.gitignore Add vm-manager library and vmctl CLI 2026-02-14 18:25:17 +01:00
Cargo.lock Add vm-manager library and vmctl CLI 2026-02-14 18:25:17 +01:00
Cargo.toml Add vm-manager library and vmctl CLI 2026-02-14 18:25:17 +01:00