Terraform, LXD and RHEL7 boot issue (can't find disk)

Hi,

After struggling quite a bit to deploy VMs with Terraform/LXD, I’m now running into troubles with RHEL7 based VMs.
I managed to make Ubuntu 20.04, 22.04 and RHEL8 to run properly but RHEL7 is still resisting.
Apparently, RHEL7 just can’t see the boot disk and tries to boot with others media (pxe, http, …) which it of course can’t.

Here is the error message I see in the UEFI console when the VM starts :

BdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1): Not Found

The RHEL7 image is an official RedHat image, unmodified.

Any help gladly welcomed.

Ok, I did some more in depth testing and this is definitely due to UEFI being used to boot the VM.
I could reproduce the same behavior with virt-manager where I could play more easily with the hardware configuration.
Changing nothing but boot mode from UEFI to Bios fixed the issue but now, I’d like to change the boot mode with LXD and I can’t find a proper way to do it.

I tried with raw.qemu.conf in the “config” section but I get this error when trying to modify it with "lxc config edit " :

Config parsing error: Invalid config: Unknown configuration key: raw.qemu.conf

Any idea how I can disable UEFI with LXD ?
I’m running LXD 5.0 (snap) on Ubuntu 20.04

Best regards

Hi,
Can you check this post, you can find the answer there. https://discuss.linuxcontainers.org/t/how-to-override-vm-uefi-boot-in-lxd-5-3/14479
Regards.

We support CentOS 7 VMs using lxc launch images:centos/7 --vm suggesting it is possible to use with UEFI.

How did you create the VM, did you use lxc launch --empty --vm and then boot of an ISO to install RHEL7?

the image is a locally imported official RHEL cloud image (qcow2 format).
It works with >RHEL8 but not RHEL7.
I’m trying to build an image from scratch with a custom install with the iso on a UEFI based VM … this should work.

1 Like

You’re telling me that images:centos/7 works but I’m talking about RHEL image.
RHEL images are not in the official LXD registry and you’re right, CentOS works but not RHEL7 official cloud image which doesn’t seem to support UEFI (while RHEL7 itselfs does when you install it from scratch with the iso)

Yep because they are very similar so in theory RHEL 7 should work fine with UEFI.

Excellent that confirms it also.

So just the official cloud images not supporting UEFI it seems.