Skip to content

Conversation

@sjmiller609
Copy link
Collaborator

@sjmiller609 sjmiller609 commented Dec 20, 2025

We will later introduce QEMU to support vGPU passthrough, then we should move cloud hypervisor behind a strategy interface. This change moves CH behind that abstraction, in preparation to later add QEMU. See lib/hypervisor/README.md

Note

Introduce a hypervisor interface with a Cloud Hypervisor implementation and migrate instance lifecycle, metadata, paths, networking, and tests from direct VMM usage to the new abstraction.

  • Hypervisor Layer:
    • Add lib/hypervisor abstraction (Hypervisor, ProcessManager, VMConfig, Capabilities, VMInfo, Type).
    • Implement Cloud Hypervisor adapter in lib/hypervisor/cloudhypervisor/* (API mapping, process manager, capabilities).
  • Instances:
    • Migrate lifecycle ops (create/start/stop/standby/restore/delete/query) to use hypervisor.Hypervisor instead of vmm.
    • Update VM config builder to output hypervisor.VMConfig.
    • Metadata changes: replace CHVersion/CHPID with HypervisorVersion/HypervisorPID and add HypervisorType; state derivation via hypervisor.
    • Graceful shutdown/kill helpers renamed to hypervisor equivalents; snapshot/restore via interface.
  • Paths/Networking:
    • Change paths.InstanceSocket(id, socketName); register socket name per hypervisor; update network allocation derivation to use SocketNameForType.
  • Tests/Docs:
    • Update tests to new metadata fields and hypervisor client usage; rename orphaned-process cleanup logs; add READMEs explaining the abstraction and filesystem changes.
  • Misc:
    • Improve VMM startup error reporting by including vmm.log when socket creation fails.

Written by Cursor Bugbot for commit 8358088. This will update automatically on new commits. Configure here.

@sjmiller609 sjmiller609 marked this pull request as ready for review December 20, 2025 19:22
Copy link
Contributor

@rgarcia rgarcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@sjmiller609 sjmiller609 merged commit cb29ca4 into main Dec 21, 2025
4 checks passed
@sjmiller609 sjmiller609 deleted the multi-hypervisor branch December 21, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants