Does the macOS 27 disk image release guidance also apply to USB mass storage?

Thanks for your answer about disk images after guest shutdown. You mentioned that on macOS 27 and later, the host should be able to use the image once guestDidStop(_:) fires.

Does that also apply to a writable RAW image opened by URL with VZDiskImageStorageDeviceAttachment and presented to the guest as a VZUSBMassStorageDevice? I’m testing with UTM 5.0.8 on an Apple silicon Mac running macOS 27.0.1 (build 26A434).

In my test, lsof showed an Apple Virtualization process holding the image open for read/write while the guest was running. After a graceful shutdown, ejecting the image in UTM, and quitting UTM, lsof showed no match. I’m trying to work out when a separate host process can safely read the file.

For this kind of attachment, is guestDidStop(_:) enough, or does the app also need to wait for VZUSBController.detach to complete? Can a separate process running without elevated privileges verify that the framework is done with that file, or does it need the app hosting the VM to report that the relevant callback fired?

You added the FSKit tag to this thread [1]. How does FSKit fit into this question?

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] And, curiously, not the Virtualization tag, but I’ve fixed that.