Module sysbot.modules.virtualization.libvirt

Libvirt Virtualization Module

This module provides methods for managing virtual machines using libvirt on Linux systems, including domain management, storage pool operations, and network configuration.

Classes

class Libvirt

Libvirt virtualization management class for Linux systems.

Ancestors

Methods

def dominfo(self, alias: str, domain: str, **kwargs) ‑> dict

Get detailed information about a domain.

Args

alias
Session alias for the connection.
domain
Domain name or UUID.
**kwargs
Additional command execution options.

Returns

Dictionary containing domain information.

def domstate(self, alias: str, domain: str, **kwargs) ‑> str

Get the state of a domain.

Args

alias
Session alias for the connection.
domain
Domain name or UUID.
**kwargs
Additional command execution options.

Returns

Domain state (running, shut off, paused, etc.).

def list(self, alias: str, **kwargs) ‑> list

List all libvirt domains (virtual machines).

Args

alias
Session alias for the connection.
**kwargs
Additional command execution options.

Returns

List of domain names.

def net_info(self, alias: str, network: str, **kwargs) ‑> dict

Get detailed information about a virtual network.

Args

alias
Session alias for the connection.
network
Virtual network name.
**kwargs
Additional command execution options.

Returns

Dictionary containing virtual network information.

def net_list(self, alias: str, **kwargs) ‑> Libvirt.list() at 0x7f2e4c2be8e0>

List all virtual networks.

Args

alias
Session alias for the connection.
**kwargs
Additional command execution options.

Returns

List of virtual network names.

def nodeinfo(self, alias: str, **kwargs) ‑> dict

Get information about the virtualization host node.

Args

alias
Session alias for the connection.
**kwargs
Additional command execution options.

Returns

Dictionary containing node information (CPU, memory, etc.).

def pool_info(self, alias: str, pool: str, **kwargs) ‑> dict

Get detailed information about a storage pool.

Args

alias
Session alias for the connection.
pool
Storage pool name.
**kwargs
Additional command execution options.

Returns

Dictionary containing storage pool information.

def pool_list(self, alias: str, **kwargs) ‑> Libvirt.list() at 0x7f2e4c2be8e0>

List all storage pools.

Args

alias
Session alias for the connection.
**kwargs
Additional command execution options.

Returns

List of storage pool names.

def version(self, alias: str, **kwargs) ‑> dict

Get libvirt and hypervisor version information.

Args

alias
Session alias for the connection.
**kwargs
Additional command execution options.

Returns

Dictionary containing version information.