Source: factory.deploy/extend.substrate/ObjLibvirt.py
A controller class for interacting with Libvirt/KVM hypervisors.
| Method | Signature | Description |
|---|---|---|
| connect | connect() -> bool |
Establishes a connection to the Libvirt daemon. |
| list_instances | list_instances() -> List[Dict[str, Any]] |
Lists all domains (VMs) managed by Libvirt. |
| get_instance | get_instance(name: str) -> Optional[Dict[str, Any]] |
Gets detailed information about a specific domain. |
| create_instance | create_instance(config: Dict[str, Any]) -> bool |
Creates a new domain from an XML configuration. |
| start_instance | start_instance(name: str) -> bool |
Starts a domain. |
| stop_instance | stop_instance(name: str, force: bool = False) -> bool |
Stops a domain. |
| delete_instance | delete_instance(name: str, force: bool = False) -> bool |
Deletes (undefines) a domain. |
| execute_command | execute_command(name: str, command: List[str]) -> Optional[Dict[str, Any]] |
Executes a command in a domain via SSH. |
List all Libvirt domains.
Get detailed status of a specific domain.
Start a domain.
Stop a domain.
Delete (undefine) a domain.