我正在关注MIT操作系统工程讲座。.我已经安装了Qemu并成功运行了它,我可以在“ make clean”,“ make”和“ make qemu”文件夹中使用这些命令。 还有一个单独的Labs文件夹...根据说明,我们必须在labs文件夹中使用“ make”命令,但是当我在lab文件夹中使用make命令时 我收到以下错误
*** Error: Couldn't find a working QEMU executable.
*** Is the directory containing the qemu binary in your PATH
*** or have you tried setting the QEMU variable in conf/env.mk?
***
***
*** Error: Couldn't find a working QEMU executable.
*** Is the directory containing the qemu binary in your PATH
*** or have you tried setting the QEMU variable in conf/env.mk?
***
+ as kern/entry.S
+ cc kern/entrypgdir.c
+ cc kern/init.c
+ cc kern/console.c
+ cc kern/monitor.c
+ cc kern/printf.c
+ cc kern/kdebug.c
+ cc lib/printfmt.c
+ cc lib/readline.c
+ cc lib/string.c
+ ld obj/kern/kernel
+ as boot/boot.S
+ cc -Os boot/main.c
+ ld boot/boot
boot block is 390 bytes (max 510)
+ mk obj/kern/kernel.img
我在某个地方读到我应该在conf / env.mk文件中设置路径的位置,但是我不确定如何设置PATH。 conf / env.mk文件的内容如下:
# env.mk - configuration variables for the JOS lab
# '$(V)' controls whether the lab makefiles print verbose commands (the
# actual shell commands run by Make), as well as the "overview" commands
# (such as '+ cc lib/readline.c').
#
# For overview commands only, the line should read 'V = @'.
# For overview and verbose commands, the line should read 'V ='.
V = @
# If your system-standard GNU toolchain is ELF-compatible, then comment
# out the following line to use those tools (as opposed to the i386-jos-elf
# tools that the 6.828 make system looks for by default).
#
# GCCPREFIX=''
# If the makefile cannot find your QEMU binary, uncomment the
# following line and set it to the full path to QEMU.
#
# QEMU=
我正在使用Ubuntu 16.04 在此先感谢!
答案 0 :(得分:2)
要运行具有2 GB以上RAM的来宾,您必须具有64位主机系统。
在继续安装之前,请确保您的Ubuntu主机支持KVM虚拟化。该系统应该具有支持VT-x(vmx)的Intel处理器或具有AMD-V(svm)技术支持的AMD处理器。
运行以下grep命令以验证处理器是否支持硬件虚拟化:
grep -Eoc '(vmx|svm)' /proc/cpuinfo
如果CPU支持硬件虚拟化,该命令将输出一个大于零的数字,该数字是CPU内核的数量。否则,如果输出为0,则表示CPU不支持硬件虚拟化。
运行以下命令以安装KVM和其他虚拟化管理软件包:
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst virt-manager
一旦安装了软件包,libvirt守护程序将自动启动。您可以输入以下内容进行验证:
sudo systemctl is-active libvirtd
输出:有效
要能够创建和管理虚拟机,您需要将用户添加到“ libvirt”和“ kvm”组中。为此,请输入:
sudo usermod -aG libvirt $USER
sudo usermod -aG kvm $USER