microsoft/mu_tiano_platforms

[Bug]: QEMU runner cannot boot to OS on qcow2 images

Closed this issue · 0 comments

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

After https://github.com/microsoft/mu_tiano_platforms/pull/489/files#diff-f29acc9b32cd66d4c8c4c23f631994df06954559b7de7978658a3a61ecf61e75, the QemuRunner.py will no longer take a qcow2 OS image to boot on QEMU.

For example, it used to take "PATH_TO_OS=<os_image_folder/os_image_name.qcow2>" to boot to the OS, now the image does not map to the file system protocols. Specifically, the format=raw is causing the file not being able to be mapped.

Expected Behavior

Map the qcow2 image as before. Because the qcow2 images are more resilient to the sudden deaths of QEMU process and would not get corrupted in those cases.

Steps To Reproduce

  1. Build QemuQ35Pkg
  2. Boot the built images using "PlatformBuild.py PATH_TO_OS=<os_image_name.qcow2> --flashonly", where the os_image_name.qcow2 can be made from vhdx images using qemu-img convert -f vhdx -p -c -O qcow2 foo.vhdx foo.qcow2
  3. Notice that the system would attempt to boot to the qcow2 image and failed, then ended up in UEFI shell.

Build Environment

- OS(s): Windows 11
- Tool Chain(s): VS2022
- Targets Impacted: DEBUG, RELEASE

Version Information

https://github.com/microsoft/mu_tiano_platforms/pull/489/files#diff-f29acc9b32cd66d4c8c4c23f631994df06954559b7de7978658a3a61ecf61e75

Urgency

Low

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

Need to know why only the vhd is chosen to be supported in the first place.