- Install the
@virtualization package group in fedora to install libvirt
- If you want to use the packages already compiled, skip to Step 4.
a. Initialize a clean mock chroot:
b. Install the following dependencies, taken from https://github.com/stefanberger/swtpm/blob/master/INSTALL:
c. Enter the chroot and clone the swtpm repo:
d. Compile and install swtpm:
e. If everything succeeded thusfar, create the srpm and rpm and install:
To install our pre-compiled rpms:
To install our pre-compiled qemu:
Run the swtpm setup script (sudo or as root) to initialize and create a virtual TPM device. Note default parameters will create /dev/vtpm0. You must run this script and load a TPM every time you use it in libvirt, because it self-destructs after it detects that it isn't being used anymore. You may also have to disable SElinux for now until a workaround is found.
Add the generated XML from step 6 to your virtual machine's XML file and create it!