![我在 WSL 上安装了 qemu,但我没有看到 /usr/bin 中的二进制文件——帮忙?](https://linux22.com/image/933562/%E6%88%91%E5%9C%A8%20WSL%20%E4%B8%8A%E5%AE%89%E8%A3%85%E4%BA%86%20qemu%EF%BC%8C%E4%BD%86%E6%88%91%E6%B2%A1%E6%9C%89%E7%9C%8B%E5%88%B0%20%2Fusr%2Fbin%20%E4%B8%AD%E7%9A%84%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6%E2%80%94%E2%80%94%E5%B8%AE%E5%BF%99%EF%BC%9F.png)
我在运行 WSL 的 Ubuntu 20.04 LTS 上运行了以下命令:
me@mymachine:~$ sudo apt-get install qemu
输出如下。令人怀疑的是,它只安装了 123kb,qemu 肯定不止这个数。
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
qemu
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 14.3 kB of archives.
After this operation, 123 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 qemu amd64 1:4.2-3ubuntu6.10 [14.3 kB]
Fetched 14.3 kB in 1s (27.7 kB/s)
Selecting previously unselected package qemu.
(Reading database ... 32104 files and directories currently installed.)
Preparing to unpack .../qemu_1%3a4.2-3ubuntu6.10_amd64.deb ...
Unpacking qemu (1:4.2-3ubuntu6.10) ...
Setting up qemu (1:4.2-3ubuntu6.10) ...
但是,我认为它实际上并没有安装,因为我没有看到 qemu 二进制文件?
me@mymachine:~$ ls /usr/bin/q*
ls: cannot access '/usr/bin/q*': No such file or directory
有人能帮忙吗?我对 Linux 还很陌生。谢谢。
答案1
如今 qemu 只是一个虚拟包,其功能分散在许多包中。运行
apt-cache show qemu
了解更多信息。尝试安装 qemu-kvm 作为硬件辅助版本。
安装 qemu-kvm 实际上会安装 qemu-system-x86_64,而运行 kvm 就像运行 qemu-system-x86_64 -enable-kvm。例如,要从 iso 文件 whatever.iso 创建 12G(最大扩展)虚拟机 (myvirt.img):
qemu-img create myvirt.img -f qcow2 12G
kvm -m 750 -cdrom whatever.iso -boot d myvirt.img
查看 man kvm 以了解更多信息。