Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
kuqin12 opened this issue Jun 27, 2023 · 0 comments
Closed
1 task done

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

kuqin12 opened this issue Jun 27, 2023 · 0 comments
Assignees
Labels
state:needs-triage Needs to triaged to determine next steps type:bug Something isn't working urgency:low Little to no impact

Comments

@kuqin12
Copy link
Contributor

kuqin12 commented Jun 27, 2023

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.

@kuqin12 kuqin12 added type:bug Something isn't working state:needs-triage Needs to triaged to determine next steps labels Jun 27, 2023
@github-actions github-actions bot added state:needs-owner Needs an issue owner to be assigned urgency:low Little to no impact labels Jun 27, 2023
@github-actions github-actions bot removed the state:needs-owner Needs an issue owner to be assigned label Jun 27, 2023
Flickdm added a commit that referenced this issue Jul 14, 2023
# Preface

Please ensure you have read the [contribution
docs](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md) prior
to submitting the pull request. In particular,
[pull request
guidelines](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md#pull-request-best-practices).

## Description

This adds support for both VHD and QCOW2 images by using the extension
to determine which storage rule should be used for qemu See [Issue
607](#607)

For each item, place an "x" in between `[` and `]` if true. Example:
`[x]`.
_(you can also check items in the GitHub UI)_
 
- [X] Impacts functionality?
  - Adds back functionality for qcow2 images
- [ ] Impacts security?
  - N/A
- [ ] Breaking change?
  - N/A
- [ ] Includes tests?
  - N/A
- [ ] Includes documentation?
  - N/A
  
## How This Was Tested
This was used to run both a vhd image and a cow2 image, to confirm
backward compatibility the resultant string was also compared

## Integration Instructions
N/A
@Flickdm Flickdm closed this as completed Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:needs-triage Needs to triaged to determine next steps type:bug Something isn't working urgency:low Little to no impact
Projects
None yet
Development

No branches or pull requests

2 participants