如何在 Windows 11 中禁用或删除 Hyper-V

WBOY
发布: 2024-06-14 15:59:12
原创
990 人浏览过

Hyper-V 预装在 Windows 11 计算机上。虽然此虚拟化工具在家庭版操作系统上无法开箱即用,但您可以使用批处理脚本安装它。

不幸的是,Hyper-V 可能会与 PC 上的第三方应用程序发生冲突,包括其他虚拟化工具,例如 VMWare Workstation、VirtualBox 和模拟器。因此,在尝试启动应用程序、PC 游戏或硬件调整实用程序时,您可能会遇到 Hyper-V 检测到的错误。

幸运的是,您可以借助经典的 Windows 功能对话框、命令提示符和 PowerShell 在 Windows 11 中禁用 Hyper-V。

为什么您可能需要禁用 Hyper-V

根据设计,只有一种虚拟化工具可以使用处理器上提供的集成虚拟化扩展,例如 Intel VT-x 和 AMD-V 。如果需要使用第三方虚拟化软件,包括VMware WorkStation和Virtual Box,则必须禁用Hyper-V Hypervisor。

您可能还需要禁用其他与虚拟机管理程序相关的功能,包括 Device Guard、Credential Guard 和 Windows 安全中核心隔离的内存完整性功能部分。

如何检查 Hyper-V 是否在 Windows 11 上运行

How to Disable or Remove Hyper-V in Windows 11

您可以访问系统信息应用程序以确定 Hyper-V 虚拟化是否正在运行。如果您需要在禁用 Hyper-V 虚拟机管理程序之后或之前验证它的状态,这非常有用。

要检查计算机上的 Hyper-V 虚拟机管理程序状态:

  1. 按 Win + R 打开“运行”。
  2. 键入 msinfo32.exe 并单击“确定”打开应用程序。
  3. 接下来,检查详细信息选项卡底部是否有以下条目:
    A hypervisor has been detected. Features required for Hyper-V will not be displayed.
    登录后复制
  4. 如果是,则需要禁用 Hyper-V、内存完整性和 Credential Guard如下所述,可以使用其他虚拟化工具而不会出现任何错误。

1. 如何通过 Windows 可选功能禁用 Hyper-V

Windows 功能对话框可让您添加 Windows 11 中默认禁用的其他功能。您还可以使用它来禁用一些高级功能,包括 Hyper-V。

请注意,要修复 Hyper-V 检测到的错误,除了 Hyper-V 之外,还必须禁用虚拟机平台和 Windows Hypervisor 平台功能。

使用 Windows 功能对话框禁用 Hyper-V:

  1. 按 Win + R 键打开“运行”对话框。
  2. 键入 control 并单击“确定”打开控制面板。
  3. 在“控制面板”中,单击“程序”。How to Disable or Remove Hyper-V in Windows 11
  4. 接下来,单击“程序和功能”。
  5. 在左侧窗格中,单击“打开或关闭 Windows 功能”。How to Disable or Remove Hyper-V in Windows 11
  1. 在“Windows 功能”对话框中,找到 Hyper-V。
  2. 取消选中 Hyper-V 选项以禁用该功能。How to Disable or Remove Hyper-V in Windows 11
  3. 接下来,向下滚动并找到虚拟机平台和 Windows Hypervisor 平台选项。How to Disable or Remove Hyper-V in Windows 11
  4. 取消选择这两个选项并单击“确定”。
  5. Windows 将从系统中卸载 Hyper-V 和其他功能。
  6. 完成后,重新启动电脑以应用更改。

2. 如何使用 BCDEDIT 禁用 Hyper-V

How to Disable or Remove Hyper-V in Windows 11

您可以使用 BCDEdit 工具在引导配置中禁用 Hyper-V。如果您只想停用 Hyper-V 而不想完全卸载它,这非常有用。

使用 BCDEdit 禁用 Hyper-V:

  1. Press the Win key and type cmd.
  2. Right-click on the Command Prompt and select Run as administrator.
  3. In the Command Prompt window, type the following command and press Enter:
    bcdedit /set hypervisorlaunchtype off
    登录后复制
  4. When the success message appears, close the Command Prompt and restart your PC to apply the changes.
  5. If you need to activate Hyper-V again, use the following command:
    bcdedit /set hypervisorlaunchtype auto
    登录后复制
  6. Make sure to restart your PC to apply the changes.

Additionally, you can use the BCDEdit tool to perform other advanced tasks, such as deleting the old boot menu options and adding a safe mode shortcut to the Windows 11 boot menu.

3. How to Uninstall Hyper-V Using the Command Prompt

How to Disable or Remove Hyper-V in Windows 11

If the Windows Features dialog fails to remove Hyper-V, you can use the Command Prompt to disable the hypervisor. Here's how to do it:

  1. Open Command Prompt as administrator.
  2. In the Command Prompt window, type the following command and press Enter:
    dism /online /disable-feature /featurename:Microsoft-hyper-v-all
    登录后复制
  3. Upon execution, the DISM tool will disable Hyper-V and show the operation completed successfully message to indicate successful execution.
  4. Type exit, press Enter to close the Command Prompt, and restart your PC.

After the restart, you can run your games and other hypervisors without the error. If not, open the Windows Features dialog, disable the Virtual Machine Platform and Windows Hypervisor Platform options, and restart your PC to turn off Hyper-V Hypervisor.

4. How to Disable Hyper-V Using PowerShell

How to Disable or Remove Hyper-V in Windows 11

If you prefer PowerShell, use the WindowsOptionalFeature cmdlet to disable Hyper-V in Windows 11. To do this, launch PowerShell with admin privileges and execute the command. Here's how to do it:

  1. Press the Win key and type powershell.
  2. Right-click on PowerShell and select Run as administrator.
  3. Click Yes when prompted by User Account Control.
  4. In the PowerShell window, copy and paste the command below and press Enter:
    Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
    登录后复制
  5. Wait for the process to complete. Once done, close PowerShell and restart your PC to apply the changes.

How to Uninstall the Hyper-V Virtual Network Adapter

During the restart following the uninstallation of Hyper-V, you may frequently encounter the message, "We couldn't complete the updates, undoing changes." To resolve this issue, ensure the Hyper-V virtual network adapters are deleted from your PC. You can delete the virtual network adapter from Device Manager.

To delete Hyper-V's virtual network adapters:

  1. Press Win + R to open Run.
  2. Type dvmgmt.msc and click OK to open Device Manager.
  3. In Device Manager, expand the Network Adapters section to locate the Hyper-V Virtual network adapters.
  4. If no virtual adapters associated with Hyper-V are listed, click View and select Show hidden devices.How to Disable or Remove Hyper-V in Windows 11
  5. Right-click on the Hyper-V Virtual Ethernet Adapter and select Uninstall device.

    Do not remove the Microsoft Wi-Fi Direct Virtual Adapter.

  6. Click Uninstall to confirm the action.How to Disable or Remove Hyper-V in Windows 11
  7. Repeat the steps to delete all the virtual network adapters associated with Hyper-V.
  8. Once done, close Device Manager and restart your PC. Next, uninstall Hyper-V and check for any improvements.

How to Turn Off Virtualization-Based Security (Memory Integrity)

If you encounter the Hyper-V detected issue even after you disable Hyper-V, try to disable the Memory integrity feature in Windows Security. The Memory integrity feature is part of Core Isolation. It helps prevent hackers from accessing and infecting high-security processes using malicious code.

By default, Windows disables the Memory integrity feature to avoid conflict with apps and device drivers due to incompatibility issues. This can also cause issues with third-party virtualization tools and programs needing access to your system's virtualization hardware.

To turn off Memory integrity in Windows Security:

  1. Press Win + I to open the Settings app.
  2. In the left pane, click on the Privacy & security tab.How to Disable or Remove Hyper-V in Windows 11
  3. Next, click on Windows Security.
  4. Under the Protection areas section, click on Device security.How to Disable or Remove Hyper-V in Windows 11
  5. Next, click on Core isolation details under the Core isolation section.How to Disable or Remove Hyper-V in Windows 11
  6. Toggle the switch under Memory integrity to turn it Off.How to Disable or Remove Hyper-V in Windows 11
  7. Restart your PC to apply the changes.

How to Disable Device Guard and Credential Guard

Device Guard and Credential Guard don't play well with other virtualization software, including VMware Workstation. You may encounter an error saying Device Guard/Credential Guard is enabled when trying to power on the VMware Workstation.

Since you intend to use third-party virtualization software, you can safely disable Device Guard and Credential Guard using the Registry Editor.

That said, modifying the Windows Registry involves risk. We recommend you create a restore point and take a registry backup before attempting any modifications.

To disable Device Guard and Credential Guard:

  1. Press Win + R to open Run.
  2. Type regedit and click OK to open Registry Editor.
  3. In Registry Editor, navigate to the following location:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
    登录后复制
  4. In the right pane, locate the LsaCfgFlagsDWORD value. You'll need to create a new key if no such value exists.How to Disable or Remove Hyper-V in Windows 11
  5. To create a new key, right-click the Lsa subkey in the left pane and select New < DWORD (32-bit)value. Rename the value as LsaCfgFlags.
  1. Next, double-click on LsaCfgFlags and type 0 in the Value data field.How to Disable or Remove Hyper-V in Windows 11
  2. Click OK to save the changes.
  3. Next, in Registry Editor, navigate to the following location:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard
    登录后复制
  4. In the right pane, check if the EnableVirtualizationBasedSecurity value exists. If not, right-click the DeviceGuard subkey and select New > DWORD (32-bit) Value.How to Disable or Remove Hyper-V in Windows 11
  5. Next, rename the key as EnableVirtualizationBasedSecurity and set its value to 0.How to Disable or Remove Hyper-V in Windows 11
  6. Click OK to save the changes.

Restart your computer to apply the changes and disable Device Guard and Credential Guard. If you ever need to enable these features, modify the value data and change it to 1.

Disable Hyper-V in Windows 11 to Run Third-Party Virtualization Tools and Apps

Hyper-V is an excellent utility if you want an out-of-the-box virtualization solution. However, you must disable Hyper-V to use third-party virtualization software, including VirtualBox and WMware Workstation.

Fortunately, you can easily disable the Hyper-V Hypervisor and other Virtualization-based Security solutions to use third-party hypervisors without errors.

以上是如何在 Windows 11 中禁用或删除 Hyper-V的详细内容。更多信息请关注PHP中文网其他相关文章!

来源:makeuseof.com
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!