Post

Replies

Boosts

Views

Activity

Virtualization.framework: Can a separate process stop a VM if its owning process hangs?
Hello, I am evaluating a fail-safe architecture for a macOS application that would run a single Linux virtual machine using Apple's Virtualization.framework. My main concern is what happens if the process owning the VZVirtualMachine instance hangs, crashes, or becomes unresponsive while the VM is running. According to the public API documentation, stop(completionHandler:) can stop a VM, but the operation must be performed through the owning VZVirtualMachine instance and its associated dispatch queue. I would appreciate clarification on three questions: Independent termination: Is there a documented, supported way for a separate watchdog process to identify and forcibly terminate an existing VM when its owning process or dispatch queue is unresponsive? Owner termination: If the operating system terminates the process owning the VZVirtualMachine instance, is termination of the associated VM guaranteed? Is there a documented upper bound on the time required? Resource cleanup: Is there a supported mechanism for an independent process to verify that the VM has terminated and that its associated host resources have been released, rather than relying solely on a callback from the original owner? I am considering a dedicated VM-owner process supervised through launchd/XPC, but I do not want to assume that restarting or terminating the owner provides guarantees that the framework does not document. This is an architectural investigation only. No production VM or autonomous workload has been started. Any references to official documentation or recommended architectural patterns would be greatly appreciated. Thank you.
0
0
68
11h
Virtualization.framework: Can a separate process stop a VM if its owning process hangs?
Hello, I am evaluating a fail-safe architecture for a macOS application that would run a single Linux virtual machine using Apple's Virtualization.framework. My main concern is what happens if the process owning the VZVirtualMachine instance hangs, crashes, or becomes unresponsive while the VM is running. According to the public API documentation, stop(completionHandler:) can stop a VM, but the operation must be performed through the owning VZVirtualMachine instance and its associated dispatch queue. I would appreciate clarification on three questions: Independent termination: Is there a documented, supported way for a separate watchdog process to identify and forcibly terminate an existing VM when its owning process or dispatch queue is unresponsive? Owner termination: If the operating system terminates the process owning the VZVirtualMachine instance, is termination of the associated VM guaranteed? Is there a documented upper bound on the time required? Resource cleanup: Is there a supported mechanism for an independent process to verify that the VM has terminated and that its associated host resources have been released, rather than relying solely on a callback from the original owner? I am considering a dedicated VM-owner process supervised through launchd/XPC, but I do not want to assume that restarting or terminating the owner provides guarantees that the framework does not document. This is an architectural investigation only. No production VM or autonomous workload has been started. Any references to official documentation or recommended architectural patterns would be greatly appreciated. Thank you.
Replies
0
Boosts
0
Views
68
Activity
11h