Ubuntu Server 22.04 LTS VM boots into UEFI

ceftee

Cadet
Joined
Sep 21, 2023
Messages
5
Hello there,

Before anyone tells me this is a known issue with Linux-based VMs and that there already are solved threads regarding this issue, please understand that I have gone through numerous threads and followed their instructions and I still have not been capable of solving this issue. Since I am very new to TrueNAS and it's capabilities, I'm going to try and be as extensive as possible regarding information about my current setup and stuff I've already done.

I am currently running a custom built system on TrueNAS-SCALE-22.12.3.3 with the following specs:
- AMD Ryzen 5 3600 Processor
- ASRock B550 Phantom Gaming-ITX motherboard
- 32GB of DDR-3200 ECC memory (16GBx2) from Samsung
- 1x Goodram PX500 Gen.2 256GB nVME + 1x WD Green 120GB 2.5" SSD as boot drives for a mirrored install
- 5x Seagate Ironwolf NAS 4TB hard drives configured in a ZFS Raidz1
- Using a 1Gb/s connection with the included 2.5G Intel I225V Ethernet port on the motherboard

I created a separate dataset called "Virtual_Machines" in which I created sub-datasets to store my VM ISOs ("ISO_Storage") and also use the main dataset as my Zvol location. I have managed the ACL of this dataset and all child directories to give the necessary permissions to user "libvirt-qemu" to load the ISOs for installation.

datasets.png
permissions.png


I then started the process of creating a VM. If it matters, the purpose of the VM is to run an instance of a LinuxGSM CS:GO Dedicated Server to play some games with friends. In the below screenshots you can find the details of my VM (I'm using VNC for the display option and loaded the Ubuntu Server 22.04 LTS .iso):

VM1.png
VM2.png



My VM starts normally and boots into UEFI instead of starting the installation of Ubuntu Server. I have read in previous threads that the reason this happens is because the UEFI firmware looks for the file boot64.efi in the EFI partition of the VM, and if it's not present you end up in the EFI shell, unable to boot into the desired OS. This is what my VM Display shows when I start it:

shell.png


One particular thing that seems to have been fixing this issue for other people is typing exit on the Shell and navigating to the Boot Maintenance Manager > Boot From File to locate and select the grubx64.efi file. This would then allow me to boot into Ubuntu and then cd as root to the EFI folder to copy the grubx64.efi file to that location. The problem, as shown in the below screenshot, is that the file manager from the "Boot From File" menu shows completely blank.

bootfile.png


I've tried the following steps, without any success:
- Restart the VM
- Switch disk mode from AHCI to VirtIO and vice versa
- Reboot the entire TrueNAS system

Any help on how I can fix this issue is a appreciated. If it matters, using a Windows-based VM boots into OS installation without any issues. I haven't tried to create VMs with different Linux distros like CentOS or Debian, I chose Ubuntu because it's the one I'm most familiar with.
 

Attachments

  • VM1.png
    VM1.png
    24.1 KB · Views: 87
  • VM2.png
    VM2.png
    18.9 KB · Views: 80
  • 1695323650554.png
    1695323650554.png
    23.5 KB · Views: 81
  • VM2.png
    VM2.png
    18.9 KB · Views: 89

ceftee

Cadet
Joined
Sep 21, 2023
Messages
5
So, I'm not really able to explain how this happened, but it booted into installation media after I changed the number of Cores to 2 (instead of 1 vCPU, 1 core and 2 threads). I tried a different Linux distro with CentOS and Debian and managed to install and boot from it successfully using those configurations. And then out of curiosity went back and tried to load a VM with the exact same Ubuntu server image and it loaded straight into installation without any hassle.
 
Top