Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] libvirt will not start Debian 12

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
leoaloha
Posts: 2
Joined: 2024-04-01 15:08

[Solved] libvirt will not start Debian 12

#1 Post by leoaloha »

I installed from usb stick a new install of Debian 12 about a week ago. I installed KVM/QEMU today and libvirt will not start:
output of sudo service libvirtd status;

Code: Select all

sudo service libvirtd status
○ libvirtd.service - Virtualization daemon
     Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; preset: enabled)
     Active: inactive (dead) since Mon 2024-04-01 10:48:25 EDT; 22s ago
   Duration: 56ms
TriggeredBy: ● libvirtd-ro.socket
             ● libvirtd.socket
             ● libvirtd-admin.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
    Process: 5177 ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS (code=exited, status=0/SUCCESS)
   Main PID: 5177 (code=exited, status=0/SUCCESS)
        CPU: 113ms

Apr 01 10:48:25 napali-server systemd[1]: Starting libvirtd.service - Virtualization daemon...
Apr 01 10:48:25 napali-server systemd[1]: Started libvirtd.service - Virtualization daemon.
Apr 01 10:48:25 napali-server libvirtd[5177]: libvirt version: 9.0.0, package: 9.0.0-4 (Debian)
Apr 01 10:48:25 napali-server libvirtd[5177]: hostname: napali-server
Apr 01 10:48:25 napali-server libvirtd[5177]: invalid argument: Failed to parse user 'swtpm'
Apr 01 10:48:25 napali-server libvirtd[5177]: Initialization of QEMU state driver failed: invalid argument: Failed to parse user 'swtpm'
Apr 01 10:48:25 napali-server libvirtd[5177]: Driver state initialization failed
Apr 01 10:48:25 napali-server systemd[1]: libvirtd.service: Deactivated successfully.
I noticed that my /etc/passwd file does not have a user "swtpm" whereas my old ubuntu system did have this user. I do have packages swtpm and swtpm-tools installed and reinstalled. I have not been able to find and help on how to install this user. Any Help with this?

leoaloha
Posts: 2
Joined: 2024-04-01 15:08

Re: libvirt will not start Debian 12

#2 Post by leoaloha »

further investigation reveals if i comment out user "swtpm" in /etc/libvirt/qemu.conf then libvirt will start up

Code: Select all

# User for the swtpm TPM Emulator
#
# Default is 'swtpm' as established by the swtpm-tools package.
#
# In the past this was 'tss' and that still would be the built-in default
# if nothing was configured here, but the 'tss' user also has TPM device
# access in the host which isn't needed for swtpm.
#
#swtpm_user = "swtpm"
#swtpm_group = "swtpm"

Aki
Global Moderator
Global Moderator
Posts: 3082
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 76 times
Been thanked: 418 times

Re: libvirt will not start Debian 12

#3 Post by Aki »

Hello,

Thanks for sharing your experience.

As far I know, "swtpm_*" parameters are commented out by default in the Debian libvirt installation; i.e.: This is also the case in my Debian Bookworm (12.5) installation.

So why were they enabled in your configuration?

By the way, please, mark the discussion as "solved" manually adding the text tag "[Solved]" at the beginning of the subject of the first message; i.e. :
[Solved] libvirt will not start with Debian 12 (swtpm issue)
Happy Debian !
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply