go-container/kb/Hypervisors.md
Snider 6c4050486b refactor(container): migrate module path to dappco.re/go/core/container
Update module path from forge.lthn.ai/core/go-container to
dappco.re/go/core/container. Migrate import paths for go-io (v0.2.0),
go-log (v0.1.0), and go-i18n (v0.2.0) to their new dappco.re
equivalents. cli and config remain at forge.lthn.ai (not yet migrated).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 01:55:36 +00:00

1 KiB

Hypervisors

Module: dappco.re/go/core/container

Interface

type Hypervisor interface {
    Name() string
    Available() bool
    BuildCommand(ctx, image string, opts *HypervisorOptions) (*exec.Cmd, error)
}

QEMU

NewQemuHypervisor() — Default binary: qemu-system-x86_64.

Features:

  • KVM acceleration on Linux (/dev/kvm)
  • HVF acceleration on macOS (-accel hvf)
  • Nographic mode with serial console on stdio
  • User networking with port forwarding (hostfwd)
  • Virtio-9p filesystem shares for volumes
  • Supports all image formats (ISO as -cdrom, others as -drive)

Hyperkit

NewHyperkitHypervisor() — macOS-only, default binary: hyperkit.

Features:

  • ACPI support
  • Virtio-blk for disk images
  • Slirp networking with port forwarding
  • Serial console on stdio
  • PCI slot-based device assignment

Detection

DetectHypervisor() priority:

  1. Hyperkit (macOS only, if installed)
  2. QEMU (all platforms)
  3. Error if neither available

GetHypervisor(name) returns a specific hypervisor by name ("qemu" or "hyperkit").