Virtual Machine Auto-Suspension on Client Disconnect
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional host machines lack a mechanism to automatically save the state and shut down virtual machines when remote clients disconnect, leading to unnecessary resource usage and consumption.
Innovation Solution
Implementing a mechanism where a host controller detects client disconnection, initiates a timer, saves the virtual machine state, and shuts it down after the timer expires, allowing for efficient resource management and reconnection from a saved state.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the host machine leaves the virtual machine running after client disconnection, then the virtual machine state is preserved for potential reconnection, but system resources are unnecessarily consumed
Solution Approach 1:
The system dynamically adjusts the virtual machine lifecycle based on real-time client connection status. When a client disconnects, the VM transitions from an active running state to a suspended state, and eventually to shutdown after a timeout period. This dynamic state management allows the system to preserve VM state when needed while releasing resources when the VM is unused, resolving the contradiction between reliability and energy efficiency.
Solution Approach 2:
The system performs preliminary actions by saving the virtual machine state to storage before shutting down the VM. This preliminary state preservation ensures that when a client reconnects, the VM can be quickly restored to its previous state without needing to perform a full boot sequence, thus maintaining reliability while enabling efficient resource release.
2Loss of energy
If the host machine shuts down the virtual machine immediately upon client disconnection, then system resources are freed, but the client cannot reconnect to the same virtual machine state
Solution Approach 1:
The system performs preliminary state saving to persistent storage before shutting down the virtual machine. This ensures that the VM's computational state, memory contents, and execution context are preserved. When a client reconnects, the system can restore this saved state, enabling seamless reconnection while allowing the VM to be shutdown and resources freed during idle periods.
Solution Approach 2:
The system creates a copy of the virtual machine state and stores it externally in a data store or file system. This copying mechanism allows the original VM to be shutdown and resources released, while the copied state remains available for restoration when needed, thus resolving the contradiction between resource efficiency and reconnection capability.
3Reliability
If the host machine runs multiple virtual machines simultaneously, then service availability is maintained, but resource allocation efficiency decreases when clients are disconnected
Solution Approach 1:
The system implements dynamic resource allocation by monitoring client connection status for each virtual machine. When a client disconnects, the associated VM is suspended or shutdown, freeing its allocated resources. When a client reconnects, resources are reallocated and the VM is restored. This dynamic approach maintains service availability for active clients while improving overall resource allocation efficiency by eliminating waste from disconnected sessions.
Solution Approach 2:
The system discards the active running state of virtual machines when clients disconnect, and recovers the state from saved copies when clients reconnect. This allows the system to efficiently manage multiple VMs by releasing resources for inactive VMs while maintaining the capability to restore and continue service for reconnecting clients, thus balancing availability and efficiency.
Data Source
AI summary
A host controller or a host detects that a client has disconnected from a virtual machine running on the host. The host controller or host initiates a timer upon detecting that the client has disconnected. When the timer times out, the host controller or host saves the state of the virtual machine. The host controller or host causes the virtual machine to be shut down upon saving the state.


