Skip to content

Commit

Permalink
core: Prevent writing TPM device twice to OVA
Browse files Browse the repository at this point in the history
TPM device has its own method writing its OVF entry.  But as a special
device, it’s written the second time to OVF among other devices.  When
such an OVF is imported, the VM has two TPM devices, which is not
allowed by libvirt and the VM fails to start.

This patch prevents writing the second TPM device entry to OVF.

Bug-Url: https://bugzilla.redhat.com/2112702
  • Loading branch information
mz-pdm authored and mrkev-gh committed Aug 9, 2022
1 parent fbd5851 commit d6a3506
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,10 @@ private void writeOtherDevices() {
// mdev_type predefined property is written instead
continue;
}
if (device.getType() == VmDeviceGeneralType.TPM) {
// TPM device has its own write method
continue;
}
devices.add(device);
}
}
Expand Down

0 comments on commit d6a3506

Please sign in to comment.