Pages

TPM Passthrough with QEMU fails

mercredi 17 août 2016

I am running Ubuntu 16.04 and I have installed the following:

qemu - version 2.5
qemu-kvm - version 2.5
libvirt - 1.3.1-1
virt-manager - version 1.3.2-3
virt-viewer - version 1.0-1
trousers - version 0.3.13-4
tpm-tools - version 1.3.8-2

I prefer to use Linux, but need a Windows platform with a virtual digital badge for work and would like to run it in a VM. Once I create the VM and add the TPM device, I get the following error:

Unable to complete install: 'internal error: process exited while connecting to monitor: 2016-08-17T23:57:55.383617Z qemu-system-x86_64: -tpmdev passthrough,id=tpm-tpm0,path=/dev/fdset/1,cancel-path=/dev/fdset/2: '/dev/fdset/1' is not a TPM device.'

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 90, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 2277, in _do_async_install
guest.start_install(meter=meter)
File "/usr/share/virt-manager/virtinst/guest.py", line 501, in start_install
noboot)
File "/usr/share/virt-manager/virtinst/guest.py", line 416, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3606, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: 2016-08-17T23:57:55.383617Z qemu-system-x86_64: -tpmdev passthrough,id=tpm-tpm0,path=/dev/fdset/1,cancel-path=/dev/fdset/2: '/dev/fdset/1' is not a TPM device.

The path is correct in virt-manager when the TPM device is added, but the error shows the path to be /dev/fdset/1 and the cancel-path to be /dev/fdset/2. The cancel path should be /sys/class/tpm/tpm0/device/cancel, but cancel does not exist there. Below are some outputs from tpm_version and dmesg | grep -I tpm:

~$ tpm_version
TPM 1.2 Version Info:
Chip Version: 1.2.3.19
Spec Level: 2
Errata Revision: 2
TPM Vendor ID: IFX
Vendor Specific data: 0313000b 00
TPM Version: 01010000
Manufacturer Info: 49465800

~$ dmesg | grep -I tpm
[ 3.946348] tpm_tis 00:01: 1.2 TPM (device-id 0xB, rev-id 16)
[ 200.751309] audit: type=1400 audit(1471478263.879:29): apparmor="DENIED" operation="file_perm" profile="libvirt-e5dd312d-8a15-4652-925e-cc915a27b98e" name="/dev/tpm0" pid=6534 comm="qemu-system-x86" requested_mask="w" denied_mask="w" fsuid=123 ouid=123
[ 200.751320] audit: type=1400 audit(1471478263.879:30): apparmor="DENIED" operation="file_perm" profile="libvirt-e5dd312d-8a15-4652-925e-cc915a27b98e" name="/dev/tpm0" pid=6534 comm="qemu-system-x86" requested_mask="w" denied_mask="w" fsuid=123 ouid=123
[ 212.248188] audit: type=1400 audit(1471478275.380:35): apparmor="DENIED" operation="file_perm" profile="libvirt-e5dd312d-8a15-4652-925e-cc915a27b98e" name="/dev/tpm0" pid=6649 comm="qemu-system-x86" requested_mask="w" denied_mask="w" fsuid=123 ouid=123
[ 212.248194] audit: type=1400 audit(1471478275.380:36): apparmor="DENIED" operation="file_perm" profile="libvirt-e5dd312d-8a15-4652-925e-cc915a27b98e" name="/dev/tpm0" pid=6649 comm="qemu-system-x86" requested_mask="w" denied_mask="w" fsuid=123 ouid=123

Before trying to add the TPM device, I stopped and disabled trousers. Any help would be appreciated. Thank you in advance!
DJ

Let's block ads! (Why?)



TPM Passthrough with QEMU fails

2 commentaires:

  1. Excellent information.I like the way of writing and presenting.

    123 HP Officejet 4652 Setup

    RépondreSupprimer
  2. Really its very useful information that you have shared and thanks for sharing the information with us.
    123 HP Officejet 4652 Install

    RépondreSupprimer