Implement guest tool installation and management system
- Added `guest_tools.py` for standalone tool installer functionality. - Introduced `ToolJobStore` in `tool_store.py` to manage per-VM tool job records. - Created `ToolService` in `tools.py` for background installation workers using the guest execution channel. - Enhanced `LifecycleService` in `lifecycle.py` to support tool installation queuing and preparation. - Updated `guest_exec.py` to handle connection shutdown gracefully. - Added validation and normalization functions for tool specifications. - Implemented logging and error handling for tool installation processes. - Ensured compatibility with Ubuntu 22.04 and ARM64/x86_64 architectures.
This commit is contained in:
@@ -111,4 +111,10 @@ class GuestSession:
|
||||
) from error
|
||||
|
||||
def close(self) -> None:
|
||||
# Wake a thread waiting for a long-running tool command on server shutdown.
|
||||
# The guest still owns its bounded command and package-manager cleanup.
|
||||
try:
|
||||
self._connection.shutdown(socket.SHUT_RDWR)
|
||||
except OSError:
|
||||
pass
|
||||
self._connection.close()
|
||||
|
||||
Reference in New Issue
Block a user