当在编译及使用QEMU的过程中发现问题又不能自行解决时,可以去QEMU官网提Bug。本文以笔者实际遇到的问题为例,讲解提交QEMU Bug的完整过程。
1. 访问QEMU主页
QEMU官网主页地址为:https://www.qemu.org/
页面如下:
2. 跳转至CONTRIBUTE页面
点击QEMU官网主页右上角的“CONTRIBUTE”按钮,跳转至CONTRIBUTE页面。如下图所示:
3. 跳转至Issue页面
点击CONTRIBUTE页面中的“Report a bug in our bugtracker: https://gitlab.com/qemu-project/qemu/-/issues”链接,跳转至Issue页面。如下图所示:
此页面中显示已提交的Bug。可以看看其他人是如何提交问题的,以及是否有你所遇到的问题。
4. 跳转至Reporting a bug页面
回到CONTRIBUTE页面。点击CONTRIBUTE页面中的“How to report a bug”链接,跳转到Reporting a bug页面。如下所示:
其中关于如何报告Bug的具体方法翻译如下:
报告一个Bug
Bugs 可以在我们的bug tracker中被处理,其被托管于GitLab。注意:如果你在你使用的发行版的QEMU包中遇到了一个问题,请使用你的发行版的bug tracker。
当提交一个bug报告时,请尝试做以下事情:
在描述中包含QEMU发布版本(号)或者git提交的哈希值,以便于之后能够始终清楚你发现问题的版本。对于最新发布的版本或甚至是最新开发书中的问题的报告通常能得到更快的响应处理。
包含用于启动QEMU客户机的完整的命令行。
直接通过QEMU命令行重现问题。避免前段和管理栈,以确保bug是QEMU自身的问题而非前端的问题。
包含主机和客户机的信息(如操作系统、版本、32/64位。
QEMU不使用GitLab合并请求;补丁根据QEMU的 patch submissions guidelines.被发送至邮件列表。
在bug追踪器中不要报告安全方面的问题(也或者其它bug)作为“保密”的bug。
QEMU对于应该非公开报告的问题有一个 security process。
对于位于内核中的KVM的问题,使用内核bug跟踪器; KVM wiki包含了具体细节。
5. 跳转至bug tracker链接中的页面
在步骤4中点击bug tracker链接,跳转到bug跟踪器页面。其实就是步骤3中的Issue页面。
6. 未注册或登录状态下提交bug
点击Issue页面中的“New issue”按钮,出现以下页面:
如果没有注册过GitLab账号,则需要自行注册。点击“Register Now”,出现以下界面:
填写个人基本信息(注意Username不要和已有用户名重复),邮箱一定要留自己能够使用的真是邮箱,后续步骤中会用到。 设置好密码后,点击“Register”按钮,出现以下页面:
稍后,前述步骤留的邮箱中会收到确认邮件。如下所示:
点击“Confirm your account”,跳转回之前的登录界面。同时,界面中会有已确认的信息。如下所示:
输入密码后,点击“Sign In”按钮,出现以下页面:
填写好信息后,点击“Continue”按钮, 出现以下页面:
这说明注册GitLab账号的步骤完成了。后续无需重复此步骤,直接使用已经注册的账号登录即可。
7. 已注册登录状态下提交bug
点击Issue页面中的“New issue”按钮,这次就不出现登录页面了,而是出现以下页面:
根据自己实际遇到的问题填写bug单。比如,笔者遇到的实际问题是,通过qemu-7.2.0源码编译出来的7.2.0版本qemu工具,启动虚拟机后网络始终不正常,而qemu-7.1.0中的源码编译出来的是正常的。那么就根据自己所遇到问题的实际情况进行编辑,相关信息要详细(见上面说明),如下所示:
<!--
This is the upstream QEMU issue tracker.
If you are able to, it will greatly facilitate bug triage if you attempt
to reproduce the problem with the latest qemu.git master built from
source. See https://www.qemu.org/download/#source for instructions on
how to do this.
QEMU generally supports the last two releases advertised on
https://www.qemu.org/. Problems with distro-packaged versions of QEMU
older than this should be reported to the distribution instead.
See https://www.qemu.org/contribute/report-a-bug/ for additional
guidance.
If this is a security issue, please consult
https://www.qemu.org/contribute/security-process/
-->
## Host environment
- Operating system: Ubuntu 22.04 <!-- Windows 10 21H1, Fedora 37, etc. -->
- OS/kernel version: 5.15.0-58-generic #64-Ubuntu SMP <!-- For POSIX hosts, use `uname -a` -->
- Architecture: x86 <!-- x86, ARM, s390x, etc. -->
- QEMU flavor: qemu-system-x86_64 <!-- qemu-system-x86_64, qemu-aarch64, qemu-img, etc. -->
- QEMU version: QEMU emulator version 7.2.0 <!-- e.g. `qemu-system-x86_64 --version` -->
- QEMU command line: qemu-system-x86_64 -enable-kvm -m 8G -smp 4 -drive file=./Ubuntu2004.img -device ac97
<!--
Give the smallest, complete command line that exhibits the problem.
If you are using libvirt, virsh, or vmm, you can likely find the QEMU
command line arguments in /var/log/libvirt/qemu/$GUEST.log.
-->
```
./qemu-system-x86_64 -M q35 -m 4096 -enable-kvm -hda fedora32.qcow2
```
## Emulated/Virtualized environment
- Operating system: Ubuntu 20.04 <!-- Windows 10 21H1, Fedora 37, etc. -->
- OS/kernel version: 5.15.0-58-generic #64~20.04.1-Ubuntu SMP <!-- For POSIX guests, use `uname -a`. -->
- Architecture: x86 <!-- x86, ARM, s390x, etc. -->
## Description of problem
<!-- Describe the problem, including any error/crash messages seen. -->
After I created and installed Ubuntu 20.04 img in qemu virtual machine from Ubuntu 20.04 iso, I found that the network could not work normally, the network settings wasn't right yet.
## Steps to reproduce
1. Download the source code of qemu-7.2.0 using command "wget https://download.qemu.org/qemu-7.2.0.tar.xz";
2. Untar using command "tar Jxvf qemu-7.2.0.tar.xz";
3. Configure with command "./configure --target-list=x86_64-softmmu" under root of qemu source code;
4. Build with command "make";
5. Install with command "make install" or "sudo make install";
5. Create image with command "qemu-img create -f qcow2 Ubuntu2004.img 40G";
5. Launch and install guest with ubuntu 20.04 iso using command "qemu-system-x86_64 -enable-kvm -m 8G -smp 4 -boot once=d -cdrom ../iso_images/Ubuntu-20.04.5-desktop-amd.iso -drive file=./Ubuntu2004.img -device ac97";
6. After system installed, launch guest with command "qemu-system-x86_64 -enable-kvm -m 8G -smp 4 -drive file=./Ubuntu2004.img -device ac97"
## Additional information
1. When I used qemu version 7.1.0, that is qemu-7.1.0, and go through the same steps above, then the network worked normally, and the network setting was right.
2. Windows images from Windows iso(s) had the same phenomenon.
<!--
Attach logs, stack traces, screenshots, etc. Compress the files if necessary.
If using libvirt, libvirt logs and XML domain information may be relevant.
-->
<!--
The line below ensures that proper tags are added to the issue.
Please do not remove it.
-->
/label ~"kind::Bug"
编辑完成后,点击“Commit”按钮,出现以下页面:
可以看到,bug已经提交,issue号为1482。
至此,向QEMU社区提Bug的全部步骤完成。