在您的计算机上使用与虚拟化(virtualization)相关的虚拟机时,您可能遇到了错误。什么是虚拟化?你的电脑有吗?你怎么打开它?无论您使用的是Intel还是AMD系统,都可以在下面找到这些以及更多问题的答案。
什么是硬件虚拟化?
您很有可能知道您需要虚拟化,但不知道它是什么。您可能会怀疑,它与虚拟机(virtual machines)有关。实际上,硬件虚拟化允许您的物理CPU将自己呈现为多个虚拟CPU(CPUs)。
这对于虚拟机与来宾操作系统无缝兼容同时与主机操作系统共享资源至关重要。您想要拥有这些隔离的虚拟CPU(CPUs)的技术原因有很多。尽管如此,对于本文,您只需要知道虚拟化使虚拟机和其他一些类型的应用程序运行良好。
英特尔(Are Intel)和 AMD 的虚拟化品牌名称(Virtualization Brand Names)是什么?
两个主要的 PC CPU品牌是Intel和AMD。您的计算机几乎可以肯定内部装有这两个品牌的处理器之一。两家公司都基于x86指令集构建他们的CPU 。(CPUs)换句话说,它们可以执行和理解相同的代码。
但是,英特尔(Intel)和AMD也有其内部CPU功能,这些功能必须由软件明确支持。在硬件虚拟化方面,英特尔(Intel)的技术被称为英特尔 VT(Intel VT)或VT-x。另一方面,AMD 只是将其版本称为AMD -V(AMD-V)。因此,当您想在计算机上启用虚拟化时,这些是您应该寻找的术语。
如何检查是否启用了虚拟化(Virtualization)
在我们讨论如何打开或关闭虚拟化之前,值得学习如何检查该功能当前是否处于活动状态或您的CPU是否首先支持它。
在Windows中,请按照以下步骤检查是否启用了虚拟化:
- 按Ctrl + Shift + Esc打开任务管理器(Task Manager)。
- 切换到Performance 选项卡(Performance tab)(如果尚未选择)。
- 在左侧窗格中选择CPU 。
- 在CPU 性能图(CPU performance graph)下方的右侧窗格中查找Virtualization条目。
如果条目显示“已启用”,则您无需再执行任何操作。您的计算机都支持虚拟化,并且已经启用。但是,如果它不表示它已启用,我们需要检查您的CPU是否真的配备了硬件虚拟化。
最简单的方法是使用CPU-Z应用程序。这是计算机极客多年来一直在使用的应用程序,用于快速准确地获取有关计算机中CPU的信息。
- 下载并安装CPU-Z。
- 运行CPU-Z
- 在CPU 选项卡(CPU tab)下,检查VT-X或AMD-V的(AMD-V)说明(Instructions)部分。
如果CPU-Z(CPU-Z)中列出了虚拟化指令,那么您的 CPU 确实具有该功能。这意味着您需要在BIOS或UEFI菜单中激活它。
如何在BIOS或UEFI中启用(UEFI)虚拟化(Virtualization)
在确定您的计算机上没有启用虚拟化,但您的 CPU 确实支持它之后,下一步是翻转开关并启用它。
这就是事情变得有点棘手的地方,因为虚拟化的切换位于您的BIOS 或 UEFI(BIOS or UEFI)菜单中。这些是您的计算机可能使用的两种固件类型,UEFI是更现代的标准。
无论哪种方式,您都需要通过重新启动计算机并激活BIOS(BIOS)或UEFI菜单来进入您的固件。不同(Different)的主板供应商有不同的方法,但如果您需要帮助,请前往如何在 Windows 10 和更早版本中进入 BIOS(How to Enter BIOS in Windows 10 and Older Versions)。
一旦您设法进入您的BIOS,您需要为您的系统找到正确的设置,以便在BIOS中启用虚拟化。BIOS/UEFI开发人员之间没有针对此类设置的标准术语。因此,如果他们选择的措辞有点晦涩,您可能需要发挥想象力。上面的屏幕截图在Advanced and CPU Configuration下,该设置称为Intel Virtualization Technology。
下面的屏幕截图来自基于 Intel 的Gigabyte Aorus笔记本电脑,但无论主板或CPU品牌如何,总体思路都是相同的。
我们在Advanced Chipset Features(Advanced Chipset Features)下找到了虚拟化设置。尽管在这台特定计算机的情况下,VT-x没有切换开关。相反,我们只找到了一个用于VT-d 的开关。VT-d(VT-d. VT-d)是一种虚拟化子技术,它处理 IO(输入-输出)设备的虚拟化,而不是CPU(CPUs)。尽管如此(Nonetheless),您应该打开您的系统支持的任何虚拟化功能。
启用虚拟化(Enabling Virtualization)有缺点吗(Downside)?
您可能想知道虚拟化是否那么有用,为什么默认关闭它?答案有些复杂,但在某些情况下该功能会损害性能。这类似于关闭超线程(hyperthreading)可以使计算机在某些程序上运行得更好。
在实践中,您不太可能注意到现代系统的任何性能变化。除非您背靠背运行CPU基准测试并每次看到不同的分数,否则就是这样。(CPU)无论如何,如果您必须运行不能很好地与硬件虚拟化配合的软件,可以简单地反转上述步骤并再次将其关闭。
How to Enable Virtualization in BIOS for Intel and AMD
You may have run into an error while using a virtual machіne on your computer that relateѕ to virtualization. What is virtualization? Does your computer have it? How do you turn it on? Find the answers to these and more questions below, whether you’re using an Intel or AMD system.
What Is Hardware Virtualization?
There’s a good chance that you know you need virtualization but don’t know what it is. As you may suspect, it’s related to virtual machines. In effect, hardware virtualization allows your physical CPU to present itself as multiple virtual CPUs.
This is essential for virtual machines to be seamlessly compatible with the guest operating system while sharing resources with the host operating system. There are many technical reasons why you’d want to have these isolated virtual CPUs. Still, for this article, all you need to know is that virtualization makes virtual machines and a few other types of applications run well.
What Are Intel and AMD’s Virtualization Brand Names?
The two major PC CPU brands are Intel and AMD. Your computer almost certainly has one of these two brands of processor inside it. Both companies build their CPUs based on something called the x86 instruction set. In other words, they can both execute and understand the same code.
However, Intel and AMD also have their in-house CPU features, which have to be supported explicitly by software. In the case of hardware virtualization, Intel’s technology is known as Intel VT or VT-x. AMD, on the other hand, simply calls its version AMD-V. So, these are the terms you should look for when you want to enable virtualization on your computer.
How to Check If Virtualization Is Enabled
Before we get into how to switch virtualization on or off, it’s worth learning how to check if the feature is currently active or whether your CPU supports it in the first place.
In Windows, follow the steps below to check if virtualization is enabled:
- Press Ctrl + Shift + Esc to open the Task Manager.
- Switch to the Performance tab, if it wasn’t selected already.
- Select CPU in the left hand pane.
- Look for the Virtualization entry in the right hand pane, below the CPU performance graph.
If the entry says “Enabled” you don’t have to do anything more. Your computer both supports virtualization, and it’s already enabled. However, if it doesn’t indicate that it’s enabled, we need to check if your CPU is in fact equipped with hardware virtualization at all.
The easiest way to do this is by using the CPU-Z app. It’s an application computer geeks have been using for years to get quick and accurate information about the CPU in a computer.
- Download and install CPU-Z.
- Run CPU-Z
- Under the CPU tab, check the Instructions section for VT-X or AMD-V.
If virtualization instructions are listed in CPU-Z, then your CPU does have the feature. This means you need to activate it in your BIOS or UEFI menu.
How to Enable Virtualization in BIOS or UEFI
After determining that virtualization is not enabled on your computer, but your CPU does support it, the next step is to flip the switch and enable it.
Here’s where things get a little tricky because the toggle for virtualization is in your BIOS or UEFI menu. These are the two types of firmware your computer may use, with UEFI being the more modern standard.
Either way, you need to get into your firmware by restarting the computer and activating the BIOS or UEFI menu. Different motherboard vendors have different ways of doing this, but if you need help head over to How to Enter BIOS in Windows 10 and Older Versions.
Once you manage to get into your BIOS, you need to find the correct setting for your system to enable virtualization in BIOS. There is no standard terminology among BIOS/UEFI developers for such a setting. Therefore, you may have to use your imagination if their chosen wording is a little obscure. The above screenshot was under Advanced and CPU Configuration and the setting was called Intel Virtualization Technology.
The screenshot below is from an Intel-based Gigabyte Aorus laptop, but the general idea is the same regardless of motherboard or CPU brand.
We found virtualization settings under Advanced Chipset Features. Although in the case of this specific computer, VT-x did not have a toggle. Instead, we only found a switch for VT-d. VT-d is a virtualization sub-technology that deals with the virtualization of IO (input-output) devices, not CPUs. Nonetheless, you should turn on whatever virtualization features your system supports.
Is There a Downside to Enabling Virtualization?
You may be wondering if virtualization is so useful, why is it turned off by default? The answer is somewhat complicated, but there are some circumstances where the feature can hurt performance. This is similar to how turning off hyperthreading could make a computer perform better with some programs.
In practice, you’re unlikely to notice any performance change on a modern system. Unless you run a CPU benchmark back to back and see a different score each time, that is. Regardless, if you have to run software that doesn’t play well with hardware virtualization, it’s simple to reverse the above steps and simply turn it off again.