You are not logged in.

#1 2025-08-23 13:51:00

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Can't start virt-manager

I want to set up a Windows virtual machine to access Windows-only programs like Microsoft Office. I followed the Arch Wiki guides for QEMU, libvirt, and virt-manager. I installed the `qemu-full`, `libvirt`, `dnsmasq`, and `virt-manager` packages. According to https://wiki.archlinux.org/title/Virt-m … stallation and since I want to use QEMU, I enabled the `libvirtd.socket` unit. The output of `systemctl status libvirtd.socket` is:

● libvirtd.socket - libvirt legacy monolithic daemon socket
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.socket; enabled; preset: disabled)
     Active: active (listening) since Sat 2025-08-23 16:30:20 IDT; 16min ago
 Invocation: e32e4022b57740489a0c661e9ed8c59d
   Triggers: ● libvirtd.service
     Listen: /run/libvirt/libvirt-sock (Stream)
     CGroup: /system.slice/libvirtd.socket

Aug 23 16:30:20 shai-desktop systemd[1]: Listening on libvirt legacy monolithic daemon socket.

I tried to launch virt-manager from the applications launcher (of KDE) and it didn't start. When I tried to launch it in the terminal (by executing `virt-manager`), I get the error:

Traceback (most recent call last):
  File "/usr/bin/virt-manager", line 6, in <module>
    from virtManager import virtmanager
  File "/usr/share/virt-manager/virtManager/virtmanager.py", line 13, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'

I thought `pacman` was supposed to handle all the dependencies of `virt-manager` sad.
In addition, the output of the `libvirtd.socket` unit above says it's "Listening on libvirt legacy monolithic daemon socket". I don't like the word "legacy" in there. Is it how it's supposed to work?
How can I get `virt-manager` to work?

Offline

#2 2025-08-23 13:58:39

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Can't start virt-manager

What does `pacman -Q virt-install python-gobject python` show? How about `type -a python3`?

Last edited by Scimmia (2025-08-23 14:05:01)

Online

#3 2025-08-23 14:29:20

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Re: Can't start virt-manager

`pacman -Q virt-install python-gobject python` output:

virt-install 5.0.0-1
python-gobject 3.52.3-3
python 3.13.7-1

`type -a python3` output:

python3 is /home/shai/.pyenv/shims/python3
python3 is /usr/bin/python3

Offline

#4 2025-08-23 14:33:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Can't start virt-manager

Bingo. Pacman did install the deps needed, but for the system python. You're overriding that with your own python, which doesn't have the needed packages. Don't override the system python unconditionally.

Online

#5 2025-08-23 14:48:01

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Re: Can't start virt-manager

But when I use python, I want to use my own python (for obvious reasons). I want the `python` command to refer to my python and not the system python.

Offline

#6 2025-08-23 14:50:42

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Can't start virt-manager

Then you get to manage the deps yourself, too.

And no, the reasons are not obvious.

Last edited by Scimmia (2025-08-23 14:51:03)

Online

#7 2025-08-23 14:53:03

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Re: Can't start virt-manager

I don't want to mess with the system's Python. I believe pip even throws errors if you try to install packages into the system's python. When I do Python dev, I want to use my version of Python, so the system's version is unharmed, and different packages like libvirt can rely on it.

Offline

#8 2025-08-23 14:54:15

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Can't start virt-manager

Then you activate the venv or whatever *at that point*, you don't override it for everything else.

Online

Board footer

Powered by FluxBB