The error you're encountering:
textModuleNotFoundError: No module named 'libxml2'
means that the Python module libxml2 is missing. This module is required by virt-install (part of the virt-manager suite) to manage virtual machines.
On Debian, the libxml2 Python bindings are provided by the python3-libxml2 package. Run the following command:
bashsudo apt update sudo apt install python3-libxml2
After installing, check if the module is available:
bashpython3 -c "import libxml2; print('Module loaded successfully')"
If you see Module loaded successfully, the issue is resolved.
virt-installTry running virt-install again. The error should no longer appear.
virt-manager from a non-standard source (e.g., pip), try reinstalling it via apt:
bashsudo apt install --reinstall virt-manager
bashpip install libxml2-python
Le Chat can make mistakes. Check answers. Learn more