• 请不要在回答技术问题时复制粘贴 AI 生成的内容
uxff
V2EX  ›  程序员

Windows 11 彻底关闭 Hyper-V 的办法

  •  
  •   uxff · 4h 45m ago · 339 views

    Windows 11 Build 26200 上,Smart App Control 处于 Evaluation (评估)模式时,即使 Hyper-V/WHP/VMP/HVCI/Credential Guard 都已关闭、BCD hypervisorlaunchtype=Off ,Microsoft Windows Virtualization Based Security Policy 仍处于 Enforced 状态,并导致 Microsoft Hypervisor 实际运行。关闭 Smart App Control 后,VBS Policy 停止强制执行,Hypervisor 随之消失。 彻底关闭 hyper-v 后,安装 vmware workstation 没再提示主机启用了 hyper-v 的问题。

    uxff
        1
    uxff  
    OP
       2h 48m ago
    ```
    # Windows 11 彻底关闭 Hyper-V / VBS ,让 VMware 直接使用 VT-x

    适用于 Windows 11 25H2 等系统。

    目标是彻底关闭 Windows 的 Hyper-V / VBS ,使 VMware Workstation 可以直接使用 CPU 的 VT-x / EPT ,而不是通过 Windows Hypervisor Platform 运行。

    最终应达到:

    ```text
    HyperVisorPresent = False
    VirtualizationBasedSecurityStatus = 0
    ```

    > **重要:不要关闭 BIOS 中的 Intel Virtualization Technology / VT-x 。**
    >
    > VMware 本身需要硬件虚拟化。VT-d 也可以保持开启。

    ---
    ## 1. 关闭 Windows 虚拟化相关功能

    按 `Win + R`,运行:

    ```
    optionalfeatures
    ```

    在“启用或关闭 Windows 功能”中,取消勾选存在的以下项目:

    - Hyper-V
    - Windows 虚拟机监控程序平台( Windows Hypervisor Platform )
    - 虚拟机平台( Virtual Machine Platform )
    - Windows 沙盒( Windows Sandbox )
    - 适用于 Linux 的 Windows 子系统( WSL )

    如果本来就没有勾选,不需要处理。

    ---
    ## 2. 关闭“内存完整性”

    进入:

    **Windows 安全中心 → 设备安全性 → 内核隔离 → 内核隔离详细信息**

    关闭:

    ```
    内存完整性
    ```

    以下功能不需要为了 VMware 而关闭:

    - 本地安全机构保护( LSA Protection )
    - Microsoft 易受攻击的驱动程序阻止列表
    - 内核 DMA 保护

    ---
    ## 3. 禁止 Hyper-V Hypervisor 启动

    以**管理员身份**打开 CMD ,执行:

    ```
    bcdedit /set hypervisorlaunchtype off
    ```

    检查:

    ```
    bcdedit /enum {current}
    ```

    应该看到:

    ```
    hypervisorlaunchtype Off
    ```

    ---
    ## 4. 明确关闭 VBS 、Credential Guard 和 HVCI

    ### 关闭 VBS

    管理员 CMD:

    ```
    reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /v EnableVirtualizationBasedSecurity /t REG_DWORD /d 0 /f
    ```

    ### 关闭 Credential Guard

    ```
    reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v LsaCfgFlags /t REG_DWORD /d 0 /f
    ```

    ### 关闭 HVCI

    ```
    reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v Enabled /t REG_DWORD /d 0 /f
    ```

    ---
    ## 5. Windows 11 25H2 特别注意:Smart App Control

    这是 Windows 11 25H2 上一个容易被忽略的地方。

    进入:

    **Windows 安全中心 → 应用和浏览器控制 → 智能应用控制**

    如果 Smart App Control 当前处于:

    ```
    评估
    ```

    即使前面的 Hyper-V 、VBS 、Credential Guard 、HVCI 等都已经关闭,仍有可能出现:

    ```
    HyperVisorPresent = True
    VirtualizationBasedSecurityStatus = 2
    ```

    可以使用:

    ```
    CiTool.exe -lp
    ```

    检查 Code Integrity Policy 。

    问题发生时可能看到:

    ```
    Microsoft Windows Virtualization Based Security Policy

    Is Currently Enforced: true
    Authorized: true
    ```

    如果你的目标是彻底关闭 VBS/Hyper-V ,可以将:

    ```
    智能应用控制:评估
    ```

    改成:

    ```
    智能应用控制:关闭
    ```

    > **注意:**
    >
    > Smart App Control 手动关闭后通常不能简单地重新开启。
    >
    > 如果以后需要重新进入“评估/开启”状态,可能需要重置或重新安装 Windows 。
    >
    > 因此不要仅仅为了测试而随意关闭。这里适用于明确希望关闭 VBS/Hyper-V 、让 VMware 直接使用硬件虚拟化的机器。

    ---
    ## 6. 重启 Windows

    完成以上设置后完整重启:

    ```
    shutdown /r /t 0
    ```

    ---
    # 7. 验证 Hyper-V 是否真的关闭

    ## 检查 Hypervisor

    以管理员身份运行 PowerShell:

    ```
    Get-ComputerInfo | Select-Object HyperVisorPresent
    ```

    正确结果:

    ```
    HyperVisorPresent
    -----------------
    False
    ```

    `False` 表示 Microsoft Hypervisor 当前没有运行。

    ---
    ## 检查 VBS

    PowerShell:

    ```
    Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard |
    Select-Object VirtualizationBasedSecurityStatus,SecurityServicesConfigured,SecurityServicesRunning
    ```

    理想结果:

    ```
    VirtualizationBasedSecurityStatus : 0
    SecurityServicesConfigured : {0}
    SecurityServicesRunning : {0}
    ```

    其中最重要的是:

    ```
    VirtualizationBasedSecurityStatus = 0
    ```

    表示 VBS 没有运行。

    ---
    ## 8. 使用 msinfo32 再次确认

    按 `Win + R`,运行:

    ```
    msinfo32
    ```

    检查:

    ```
    基于虚拟化的安全性:未启用
    ```

    需要注意,下面这些项目仍然可能显示“是”:

    ```
    Hyper-V - 虚拟机监视模式扩展:是
    Hyper-V - 第二级地址转换扩展:是
    Hyper-V - 固件中启用的虚拟化:是
    Hyper-V - 数据执行保护:是
    ```

    这是**正常现象**。

    它们表示 CPU 和 BIOS **支持** Hyper-V 所需要的硬件虚拟化能力,并不代表 Hyper-V 正在运行。

    尤其:

    ```
    Hyper-V - 固件中启用的虚拟化:是
    ```

    正是我们需要的状态,因为 VMware 需要 BIOS 中开启 VT-x 。

    判断 Hyper-V/VBS 是否真正关闭,主要看:

    ```
    HyperVisorPresent = False
    VirtualizationBasedSecurityStatus = 0
    ```

    ---
    # 最终状态

    完成后系统架构应该是:

    ```
    BIOS / UEFI

    ├── Intel VT-x / EPT = ON
    ├── VT-d = ON (可以保持开启)


    Windows 11

    ├── Hyper-V Hypervisor = OFF
    ├── VBS = OFF
    ├── HVCI = OFF
    ├── Credential Guard = OFF


    VMware Workstation

    └── 直接使用 Intel VT-x / EPT
    ```

    ---
    # Windows 11 25H2 实际案例

    在 Windows 11 25H2 / Build 26200 的实际排查中,即使已经完成:

    ```
    Hyper-V Windows Feature OFF
    Windows Hypervisor Platform OFF
    Virtual Machine Platform OFF
    WSL OFF
    Memory Integrity OFF
    Credential Guard OFF
    EnableVirtualizationBasedSecurity = 0
    LsaCfgFlags = 0
    HVCI = 0
    hypervisorlaunchtype Off
    ```

    系统仍然出现:

    ```
    HyperVisorPresent = True
    VirtualizationBasedSecurityStatus = 2
    ```

    同时:

    ```
    CiTool.exe -lp
    ```

    显示:

    ```
    Microsoft Windows Virtualization Based Security Policy
    Currently Enforced = true
    ```

    最终将:

    ```
    Smart App Control
    评估 → 关闭
    ```

    并重新启动 Windows 后,状态变成:

    ```
    HyperVisorPresent = False
    VirtualizationBasedSecurityStatus = 0
    ```

    同时 VBS Policy 变为:

    ```
    Currently Enforced = false
    ```

    此后 VMware Workstation 17.6.4 安装程序不再提示:

    ```
    Hyper-V / Device Guard 已启用
    ```

    也不再要求安装 Windows Hypervisor Platform 。

    因此,如果 Windows 11 25H2 在关闭传统 Hyper-V/VBS 设置之后仍然启动 Microsoft Hypervisor ,**Smart App Control 的“评估”模式是一个值得重点检查的项目。**

    ```

    ```
    PopRain
        2
    PopRain  
       38 mins ago
    自问自答,还用 AI, 估计要被封号了
    GDSR
        3
    GDSR  
       16 mins ago via Android
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2758 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 12:28 · PVG 20:28 · LAX 05:28 · JFK 08:28
    ♥ Do have faith in what you're doing.