I was looking through the different Core OS announcements from WWDC24 and stumbled upon documentation for USB Device support in the Virtualization Framework. However, I haven't found any mention about it or the virtualization framework from the event or otherwise.
Are there any related release notes, examples or additional material besides the API documentation for the Beta OS?
The new USB Devices support is for removing the virtual USB mass storage device at runtime.
This can be used to bring disk in the VM or disconnect them, using the standard VZStorageDeviceAttachment
.
The way it works, roughly, is:
- Add a controller to your virtual machine configuration with
VZXHCIControllerConfiguration
. - Create the
VZVirtualMachine
- Get the runtime object for the controller, of the type
VZXHCIController
. - With the controller object, you can attach and detach emulated mass storage device while the VM is running.