Ok, we need two different bug reports. I think the issue of David is more a configuration issue that caused some ownership/labeling problems, but this should not occur. I am not sure if that needs to be fixed upstream or if you need to customize some directories yourself, but the maintainer will know (a comparable report already exists for swtpm. I am quite sure the qemu-img denial of earlier had nothing to do with the issue you experience. Maybe it was a manifest of one of the earlier issues that have been fixed. First of all, make another update as of today (some new packages are contained) with dnf update --refresh
, reboot, check, and if the issue remains, then:
@safforddr
Please file a bug report here: Log in to Red Hat Bugzilla (you can login there with your Fedora Account System account)
Please file against the component āswtpmā and read the template that will appear then quite thoroughly and answer the questions precisely and explicitly. The less the maintainer has to find out themselves (and the more is obvious at first glance), the higher is the chance that your ticket will get quick attention.
Please ensure that the following information is contained:
ā please choose an expressive title: I suggest āCreating VMs not working IF swtpm is used AND IF SELinux is enabled; virt-manager is used; no avc denials logged; internal error: Could not run ā/usr/bin/swtpm_setupā.ā
ā you have updated your system as of today with dnf update --refresh
and your system includes swtpm-0.8.1-7.fc40
ā you experience the issue when CREATING VMs with tpm, but not when USING existing VMs with tpm (always!)
ā you do NOT experience the issue when SELinux is disabled (always!)
ā the output of ausearch is empty / no denials logged of the whole boot
ā please add a link in the bug report to this ask.fedora page (and also add the bug report link here!)
ā please mention that there is a swtpm github ticket of 2022 that contains the same internal error: openSUSE: TPM 1.2 not working with libvirt/qemu, swtpm_setup exit status 1, no log created Ā· Issue #284 Ā· stefanberger/swtpm Ā· GitHub (I donāt think it is the same but maybe it is a hint in some direction)
ā please add the log (or a link) to the internal error log ( /var/log/swtpm/libvirt/qemu/fedora-swtpm.log)
ā please add a link to a new file, and contain in this file the outputs of the following commands (and make clear which output belongs to which command; at the best, just copy the whole terminal with commands and their outputs): ls -laZ /usr/lib/systemd/systemd
, ls -laZ /usr/bin/swtpm_setup
, ls -laZ /var/lib/libvirt/swtpm/2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c/tpm2
, ls -laZ /var/lib/libvirt/swtpm/2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c
, ls -laZ /var/lib/libvirt/swtpm/
, ls -laZ /var/lib/libvirt/
(feel free to anonymize files, but ensure that the username in the files and journal remain equal)
ā please add a link (not inline!) to the journalctl you provided and shortly elaborate what has happened from your user perspective in this journal (so, what did you do, and what has resulted, including the used tools)
ā additionally to the journal link, please provide the following extract from the journal inline and make clear that it is an extract from the very attached journal:
May 02 09:38:49 fedora audit[4560]: VIRT_MACHINE_ID pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c vm-ctx=system_u:system_r:svirt_t:s0:c107,c635 img-ctx=system_u:object_r:svirt_image_t:s0:c107,c635 model=selinux exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_MACHINE_ID pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c vm-ctx=+107:+107 img-ctx=+107:+107 model=dac exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora systemd[1]: Listening on virtlogd-admin.socket - libvirt logging daemon admin socket.
May 02 09:38:49 fedora audit: BPF prog-id=98 op=LOAD
May 02 09:38:49 fedora systemd[1]: Starting virtlogd.service - libvirt logging daemon...
May 02 09:38:49 fedora systemd[1]: Started virtlogd.service - libvirt logging daemon.
May 02 09:38:49 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=virtlogd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora virtqemud[4560]: libvirt version: 10.1.0, package: 1.fc40 (Fedora Project, 2024-03-01-18:35:13, )
May 02 09:38:49 fedora virtqemud[4560]: hostname: fedora
May 02 09:38:49 fedora virtqemud[4560]: internal error: Could not run '/usr/bin/swtpm_setup'. exitstatus: 1; Check error log '/var/log/swtpm/libvirt/qemu/fedora-swtpm.log' for details.
May 02 09:38:49 fedora virtqemud[4560]: cannot resolve symlink /var/lib/libvirt/swtpm/2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c/tpm2: No such file or directory
May 02 09:38:49 fedora virtqemud[4560]: Unable to restore labels on TPM state and/or log file
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=disk reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c old-disk="?" new-disk="/var/lib/libvirt/images/fedora-1.qcow2" exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=disk reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c old-disk="?" new-disk="/home/dave/Downloads/Fedora-Everything-netinst-x86_64-40-1.14.iso" exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=net reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c old-net="?" new-net="52:54:00:9c:f9:27" exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=dev reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c bus=usb device=555342207265646972646576 exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=dev reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c bus=usb device=555342207265646972646576 exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=chardev reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c old-chardev="?" new-chardev="/run/libvirt/qemu/channel/1-fedora/org.qemu.guest_agent.0" exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=rng reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c old-rng="?" new-rng="/dev/urandom" exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=tpm-emulator reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c device="/run/libvirt/qemu/swtpm/1-fedora-swtpm.sock" exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=mem reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c old-mem=0 new-mem=2097152 exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_RESOURCE pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=vcpu reason=start vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c old-vcpu=0 new-vcpu=2 exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=success'
May 02 09:38:49 fedora audit[4560]: VIRT_CONTROL pid=4560 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm op=start reason=booted vm="fedora" uuid=2e3c9e89-2ee1-4156-ae4b-b1e1dc1d163c vm-pid=0 exe="/usr/sbin/virtqemud" hostname=? addr=? terminal=? res=failed'
May 02 09:39:00 fedora gnome-shell[2895]: JS ERROR: TypeError: this.actor is null
_syncEnabled@resource:///org/gnome/shell/ui/windowManager.js:145:25
onStopped@resource:///org/gnome/shell/ui/windowManager.js:157:35
_makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:65:22
_easeActorProperty/<@resource:///org/gnome/shell/ui/environment.js:232:60
_destroyWindowDone@resource:///org/gnome/shell/ui/windowManager.js:1607:21
onStopped@resource:///org/gnome/shell/ui/windowManager.js:1595:39
_makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:65:22
_easeActor/<@resource:///org/gnome/shell/ui/environment.js:154:64
@resource:///org/gnome/shell/ui/init.js:21:20
Please read all points I have written here and ensure that they apply to your situation! Just to avoid that I misunderstood something.
I am quite sure that the maintainer of the swtpm will have some questions for you and might ask for some further data / outputs / files. So keep watching the topic at least daily or even more, and provide what is asked for.
@bug2k24 I will write you shortly something here to create another bug report.