Bug 1712556

Summary: Cannot start VM with a CBR 2.0 TPM device shows message "Failed to create v1 controller cpu for group: No such file or directory"
Product: [Fedora] Fedora Reporter: Nate Revo <nrevo>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 30CC: agedosier, berrange, clalancette, crobinso, itamar, jforbes, laine, libvirt-maint, richard.poettler, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-5.1.0-9.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-09 00:55:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
xml dump of domain none

Description Nate Revo 2019-05-21 19:01:48 UTC
Created attachment 1571730 [details]
xml dump of domain

Description of problem:
Recently Upgraded my Fedora 29 installation to Fedora 30 using the upgrade steps.   I've been successfully running a Windows 10 VM using i440FX UEFI and a TPM device configured for CBR 2.0.   
After upgrading to Fedora 30 I am unable to start the VM without removing the TPM device.   Once it is removed, the VM starts and Windows gives me a blue-screen saying TPM unavailable.


Version-Release number of selected component (if applicable):
libvirt-5.1.0-5.fc30.x86_64
tpm2-tss-2.2.2-1.fc30.x86_64
swtpm-0.1.0-0.20190425gitca85606.fc30.1.x86_64

edk2-tools-20190308stable-1.fc30.x86_64
edk2-ovmf-20190308stable-1.fc30.noarch
How reproducible:
Every Time

Steps to Reproduce:
1. Create VM with UEFI Firmware setting
2. Add TPM device CBR 2.0 (I tried TIS and both versions 1.2 & 2.0)
3. Start VM

Actual results:
VM fails to initialized and returns the error 
# virsh start Win10
error: Failed to start domain Win10
error: Failed to create v1 controller cpu for group: No such file or directory


Expected results:
VM Starts


Additional info:
The error message leads to discussions of cgroups or libvirt partitioning but partitioning is not being used.  I'll attach the xml dump of the domain.

Comment 1 Nate Revo 2019-05-21 20:45:13 UTC
As a temporary workaround a friend directed me to a qemu configuration that disables cgroups for cpu.

vim /etc/libvirt/qemu.conf 
#cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuset", "cpuacct" ]
cgroup_controllers = [ "devices", "memory", "blkio" ]

Comment 2 Cole Robinson 2019-06-18 16:17:47 UTC
Upstream libvirt is working. I bisected to this fix. I'll backport to fedora 30

commit 0eaa4716e1b8f6eb59d77049aed3735c3b5fbdd6 (HEAD, refs/bisect/fixed)
Author: Michal Privoznik <mprivozn>
Date:   Wed Apr 10 17:14:25 2019 +0200

    qemu: Set up EMULATOR thread and cpuset.mems before exec()-ing qemu

Comment 3 Fedora Update System 2019-06-20 17:41:30 UTC
FEDORA-2019-b2dfb13daf has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-b2dfb13daf

Comment 4 Fedora Update System 2019-06-22 06:04:14 UTC
libvirt-5.1.0-9.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-b2dfb13daf

Comment 5 Nate Revo 2019-06-26 22:15:32 UTC
Thanks Cole,

I installed libvirt-5.1.0-9.fc30 with the command 
 - `sudo dnf update --enablerepo=updates-testing libvirt`

Then reset the file /etc/libvirt/qemu.conf 


Windows 10 VM with TPM came up as expected!  

Thanks for fixing this!
-Nate

Comment 6 Fedora Update System 2019-07-09 00:55:07 UTC
libvirt-5.1.0-9.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.