Skip to content

Add opt-in USB rootfs hotplug for VZ-backed Linux pods - #1025

Open
MarlonJD wants to merge 1 commit into
apple:mainfrom
MarlonJD:linuxpod-usb-hotplug
Open

MarlonJD wants to merge 1 commit into
apple:mainfrom
MarlonJD:linuxpod-usb-hotplug

Conversation

@MarlonJD

Copy link
Copy Markdown

Relates to #767. This builds on the USB mass-storage approach discussed in #881 and #890.

Append VZUSBRootfsHotplug() to LinuxPod.Configuration.extensions before boot to attach local ext4 root filesystems with addContainer. The provider matches each attachment to a newly enumerated guest SCSI disk, rejects image aliases, and verifies unmount before detaching. If stopping an unstarted member fails partway, callers can retry the stop.

The guest needs xHCI PCI, USB mass storage, and SCSI disk drivers. The new integration test passed on Apple silicon with macOS 27.2.1, vminit 0.57.0, and the Cage v0.3.4 hotplug kernel. It reported the expected skip with the project's default Kata 3.17.0 kernel. Cage kernel release

make containerization, make check, and make test passed. A separate live run covered concurrent additions, cancellation, rollback, and an e2fsck -fn check after detach.

Attach distinct ext4 root disks to a running LinuxPod through a dedicated xHCI controller. Track host and guest device identities through attach, cancellation, unmount and detach, and allow an interrupted stop-before-start to be retried.

Relates to apple#767.

This branch has not been deployed

No deployments
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.

1 participant