Tiny Core Extensions > TCE Bugs
virt-manager fails to import libxml2
Rich:
Hi Leee
Just a little story in case your machine has a similar issue.
Last year someone gave me a Sony VAIO VGN-FZ240E laptop.
It has an "Intel Core 2 Duo T7250" CPU which is capable of
virtualization, yet I could not load kvm-intel.
After some online searching I found the manufacturer (VAIO) disabled
virtualization in the BIOS and provided no way to enable it.
Some more searching turned up a program that could read the CMOS
settings and save the contents in a text file.
I also found a list of what many of those locations do.
I changed the virtualization location to enable it.
I then used the program to write the text file back to CMOS memory.
I was then able to load kvm-intel.
Leee:
Hi Rich,
I did pause during reboot to check the BIOS settings and virtualization was disabled there. I enabled it and that allowed sudo modprobe kvm-intel to succeed:
--- Code: ---tc@dolly:~$ sudo modprobe kvm-intel
tc@dolly:~$ sudo /usr/local/etc/init.d/dbus start
starting dbus daemon...
tc@dolly:~$ sudo libvirtd -d
tc@dolly:~$ sudo virtlogd -d
--- End code ---
However, the issue with libxml2 remains:
--- Code: ---tc@dolly:~$ virt-manager
Traceback (most recent call last):
File "/usr/local/share/virt-manager/virt-manager", line 19, in <module>
from virtinst import BuildConfig
File "/tmp/tcloop/virt-manager/usr/local/share/virt-manager/virtinst/__init__.py", line 49, in <module>
from virtinst.domain import * # pylint: disable=wildcard-import
File "/tmp/tcloop/virt-manager/usr/local/share/virt-manager/virtinst/domain/__init__.py", line 5, in <module>
from .blkiotune import DomainBlkiotune
File "/tmp/tcloop/virt-manager/usr/local/share/virt-manager/virtinst/domain/blkiotune.py", line 8, in <module>
from ..xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty
File "/tmp/tcloop/virt-manager/usr/local/share/virt-manager/virtinst/xmlbuilder.py", line 16, in <module>
from .xmlapi import XMLAPI
File "/tmp/tcloop/virt-manager/usr/local/share/virt-manager/virtinst/xmlapi.py", line 7, in <module>
import libxml2
ModuleNotFoundError: No module named 'libxml2'
--- End code ---
Juanito:
The missing module is in /usr/local/lib/python3.9/site-packages/libxml2.py
I'd guess that virt-manager is either looking in /usr/local/lib/python3.6/site-packages for the module or it is missing a symlink python -> python3.9 or python3 -> python3.9?
Leee:
--- Quote from: Juanito on January 23, 2025, 09:48:20 AM ---The missing module is in /usr/local/lib/python3.9/site-packages/libxml2.py
I'd guess that virt-manager is either looking in /usr/local/lib/python3.6/site-packages for the module or it is missing a symlink python -> python3.9 or python3 -> python3.9?
--- End quote ---
Neither of those two symlinks did the trick but the following got me some progress:
--- Code: ---# these two allowed virt-manager to start up w/o errors:
sudo cp /usr/local/lib/python3.9/site-packages/libxml2.py /usr/local/lib/python3.6/site-packages/
sudo cp /usr/local/lib/python3.9/site-packages/libxml2.py /usr/local/lib/python3.6/site-packages/
# these two allowed the "File / New Virtual Machine" dialog to start up without too much complaining:
sudo cp /usr/local/share/lshw/pci.ids.gz /usr/local/share/hwdata/pci.ids.gz
sudo cp /usr/local/share/lshw/usb.ids.gz /usr/local/share/hwdata/usb.ids.gz
# although it still says"Error: No active connection to install on." ... but that could just be me not having a clue.
--- End code ---
The whole thing feels like I've made hash of it (at the very least, it looks like both python 3.6 and python 3.9 are present) so I'll probably reboot to a clean system, then load virt-manager by itself and see what happens.
patrikg:
You have to tell virtmanager what HV you using, something like this.
--- Code: ---export LIBVIRT_DEFAULT_URI=qemu:///system
--- End code ---
And start the network.
--- Code: ---sudo virsh net-start default-network
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version