The default cloud image for RHEL 8.7 does not support EFI schema, so it needs to create customized EFI based RHEL 8.7 image via TDX Guest Image Tool.
The tool provides scripts to generate guest image for RHEL. In this section, it takes RHEL 8.7 as an example.
For Ubuntu 22.04 guest image, please refer to the guide
-
Install required packages:
sudo dnf install -y virt-install libguestfs-tools-c
-
TDX guest RPM repository was already generated by build-repo.sh
-
Make sure libvirtd service and the default virbr0 interface works normal via
systemctl status libvirtd ifconfig virbr0
Generate guest image td-guest-rhel-8.7.qcow2:
cd tdx-tools/build/rhel-8/guest-image/
./create-efi-img.sh
NOTE:
-
For RHEL-8 image, please prepare RHEL 8.7 base ISO image and put it under the same directory as
create-efi-img.sh
. You can download RHEL 8.7 base ISO image from https://access.redhat.com/downloads Modifycreate-efi-img.sh
and set the ISO variable to the image name as below. Then runcreate-efi-img.sh
to create the RHEL 8.7 guest image.ISO="RHEL-8.7.0-20221013.1-x86_64-dvd1.iso"
-
For Ubuntu 22.04, default cloud image from official portal already supports the EFI boot, so just download from it.
Install tdx-guest-grub2, tdx-guest-shim and tdx-guest-kernel:
./tdx-guest-stack.sh
NOTE:
- It will copy TDX guest repo to target guest image and install the guest packages
- Use the existing host environment in the guest. Such as /etc/environment, /etc/chrony.conf
- This script can be used as an example of how to install necessary guest components if a custom image is wanted.