A Textual-based TUI (Terminal User Interface) application for managing QEMU/KVM virtual machines using the libvirt python API.
This is using Python Textual: https://github.com/Textualize/textual
Virt-manager is only usable with X or X forward, and this is very slow and not possible in many cases to use it. It has a lot of dependencies.
This terminal solution is simple, very few deps, remote control with low bandwidth. Moreover it includes some features like disabling a disk (intead or removing it completly), change machine-type, etc....
I worked in the past on some other Virtu related project like pvirsh, virt-scenario, and most of their features will be integrated into this project in the futur some are already availables).
Born during a SUSE hackweek, this project is a work-in-progress—packed with potential bugs, but still missing features and tests. Devel is also co-piloted by some AI agent for extra efficiency.
- Add all missing features on Adding/Removing stuff to VM
- Being able to create VM based on scenario usage: API is ready, just need to call it (https://github.com/aginies/virt-scenario)
- Minimal terminal size: 34x92
- Remote connection to libvirt server ssh (ssh-agent recomended)
- Python 3.7+
- libvirt
- textual
- pyaml
- virt-viewer
- novnc
- websockify
git clone https://github.com/aginies/vmanager.gitpython3 vmanager.pypip install libvirt-python textual pyamlwhich virt-viewerIn addition to the main TUI application, vmanager also provides a command-line interface (vmanager_cmd.py) for managing virtual machines and storage.
To launch the CLI, run:
python3 vmanager_cmd.pyor:
python3 vmanager.py --cmdThe application uses a YAML configuration file to customize its behavior. The configuration file can be placed at:
~/.config/vmanager/config.yaml(user-specific)/etc/vmanager/config.yaml(system-wide)
The default configuration is provided in config.py, and user configurations merge with these defaults. Here are the key configuration options:
- WC_PORT_RANGE_START: Start port for websockify (default: 40000)
- WC_PORT_RANGE_END: End port for websockify (default: 40050)
- websockify_path: Path to the websockify binary (default:
/usr/bin/websockify) - novnc_path: Path to noVNC files (default:
/usr/share/novnc/) - REMOTE_WEBCONSOLE: Enable remote web console (default:
False) - VNC_QUALITY: VNC quality setting (0-10, default: 0)
- VNC_COMPRESSION: VNC compression level (default:
9) - AUTOCONNECT_ON_STARTUP: Automatically connect to the first configured server on application startup (default:
False) - network_models: List of allowed network models (default:
['virtio', 'e1000', 'e1000e', 'rtl8139', 'ne2k_pci', 'pcnet']) - sound_models: List of allowed sound models (default:
['none', 'ich6', 'ich9', 'ac97', 'sb16', 'usb']) - servers: List of libvirt server connections (default:
[{'name': 'Localhost', 'uri': 'qemu:///system'}])
To customize, create a config.yaml file with the desired settings. For example:
servers:
- name: "Remote Server"
uri: "qemu+ssh://user@remote-host/system"This project is licensed under the GPL3 License.