Test Ubuntu Core with QEMU

Is there a KVM/QEMU example, please?

The method shown here (NAT vs. Bridge?) doesn’t use the LAN’s DHCP server, I believe. Of course, I’m just a newbie in these matters.

Thanks.

Regarding the UEFI files located in /usr/share/OVMF/, the OVMF_CODE.secboot.fd file functions properly for officially released images. However, if users following the UC documentation for building a custom image with a custom kernel encounter this guide, attempting to use these files will result in a bad shim signature error due to secure boot being enabled.

To address this issue, it would be helpful to either:

  1. Provide instructions on disabling secure boot:
    Navigate to UEFI Firmware Settings > Device Manager > Secure Boot Configuration > Attempt Secure Boot, uncheck the box, and press ESC to return and boot.

OR

  1. Recommend using the file /usr/share/OVMF/OVMF_CODE_4M.fd, which functions correctly without requiring secure boot.

I believe both instances of OVMF/OVMF_VARS.ms.fd in -drive file=OVMF/OVMF_VARS.ms.fd,if=pflash,format=raw,unit=1 arguments should be replaced with OVMF_VARS.ms.fd (without parent directory), which is where the file is being copied to:

Hi! I believe it should be mentioned that for testing on a local machine, a user can just do
ssh -p 8022 <username>@localhost

You’re absolutely right - thanks for pointing this out. We used to have that in this document (I’m not sure why it was dropped). I’ll add it back.

Edit: done.

1 Like

This doesn’t make sense, as the three lines haven’t been introduced yet. Maybe this was originally placed after the command with TPM?

I suggest replacing it with:

To test Ubuntu Core without TPM emulation:

On Ubuntu 24.04 these files have a _4M suffix in their name, before the extension:

$ lsb_release -r
No LSB modules are available.
Release:	24.04

$ tree /usr/share/OVMF/
/usr/share/OVMF/
├── OVMF_CODE_4M.fd
├── OVMF_CODE_4M.ms.fd -> OVMF_CODE_4M.secboot.fd
├── OVMF_CODE_4M.secboot.fd
├── OVMF_CODE_4M.snakeoil.fd -> OVMF_CODE_4M.secboot.fd
├── OVMF_VARS_4M.fd
├── OVMF_VARS_4M.ms.fd
└── OVMF_VARS_4M.snakeoil.fd

1 directory, 7 files

See ovmf’s package content: Ubuntu – File list of package ovmf/noble/all

Thanks so much for pointing this out, and for the TPM wording (you were right, of course). I’ve updated the doc accordingly.

1 Like

Hey there, I see a recent change was made to this doc. There’s a typo in “Without TPM emulation” block of code.

-drive file=OVMF_CODE.secboot_4M.fd,if=pflash,format=raw,unit=0,readonly=on \

Should be:

-drive file=OVMF_CODE_4M.secboot.fd,if=pflash,format=raw,unit=0,readonly=on \