Как отключить hyper v в windows server 2019

Microsoft Hyper-V is a type 1 hypervisor that you can install on Windows – including on Windows 10 and Windows Server 2019. In some scenarios, you may need to uninstall Hyper-V on your Windows machine. For example, VMware Workstation and Hyper-V are not compatible when installed on the same machine. The same issues occur with other type 2 hypervisors like VirtualBox.

Whatever your case, learn how to uninstall Hyper-V in Windows using two methods: via the GUI (graphical user interface) and via the CLI (command line interface).

Note: The processes explained for Windows 10 are applicable to Windows 11. The processes explained for Windows Server 2019 also work for Windows Server 2022 and 2016.

How to Disable Hyper-V in Windows 10 and 11 in Control Panel

Using the Control Panel to uninstall Hyper-V is the most convenient method and is preferred by most users for Windows 10 or 11. As a result, the Hyper-V feature is uninstalled completely.

To uninstall Hyper-V, do the following:

  1. Click Start, type Control Panel, and open it. Press Win+R. In the Run field, type appwiz.cpl and press Enter.
  2. In the Control Panel window, click Turn Windows features on or off.
  3. In the Windows Features window that opens, deselect the Hyper-V checkbox. Make sure that checkboxes in Hyper-V subfolders are deselected.

    How to uninstall Windows 10 Hyper-V in Control Panel

  4. Locate and deselect Virtual Machine Platform and Windows Hypervisor Platform.
  5. Hit OK to save settings and start the Hyper-V uninstallation process.
  6. Click Restart now to restart your computer to finish the process and uninstall Hyper-V.

    Hyper-V Windows 10 uninstallation - restarting Windows

How to Uninstall Hyper-V in Windows 10 and 11 with the Command Prompt

You can uninstall Hyper-V in the command line interface (CLI) just as with the previous method in the graphical user interface (GUI). This workflow works in both Windows 10 and Windows 11.

Check the Hyper-V installation status in the command line before you start to uninstall Hyper-V and to make sure that this hypervisor has been removed from your Windows system after you have uninstalled Hyper-V.

  1. Open the command line (CMD) as administrator. Open the Windows Start menu, type cmd, right-click the cmd entry, and click Run as administrator.
  2. Run systeminfo to check whether Hyper-V is installed.
    • If Hyper-V is not installed, in the Hyper-V requirements section, you see the names of the technologies required to install Hyper-V and the status of their availability on the machine.
    • If Hyper-V is installed, you should see the following message in the Hyper-V Requirements line:
      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

      Checking the Hyper-V installation status in Windows

    • As an alternative, you can run msinfo32.exe to check whether Hyper-V is uninstalled in the GUI. The needed information is located in the System Summary section at the bottom of the item list.

      Hyper-V is installed in Windows

      Now, once you have verified that Hyper-V is installed, you can uninstall Hyper-V in Windows 10 by using the command line.

  3. Open PowerShell with administrative privileges (type PowerShell in the Start menu, right-click PowerShell, and click Run as administrator just as you do to run CMD).
  4. Run the following command to remove the Hyper-V feature from Windows 10:

    Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

    Hyper-V Windows 10 uninstallation in PowerShell

  5. Do you want to restart the computer to complete this operation now?

    Type Y and hit Enter.

  6. Restart is required after executing this command. You can type N (No) and restart Windows manually.

Removing Hyper-V with DISM

DISM (Deployment Image Servicing and Management) is a tool for working with Windows images (.wim files) and installing/uninstalling Windows drivers, features, and packages.

Open PowerShell with administrative privileges, and run this command to disable Hyper-V:

DISM /Online /Disable-Feature:Microsoft-Hyper-V

How to uninstall Hyper-V in Windows 10 by using PowerShell and DISM

You may need to disable Secure Boot in UEFI/BIOS settings of a computer to finish the uninstallation process and uninstall Hyper-V. The sequence to disable Secure Boot depends on your hardware vendor and differs for different motherboard vendors and models.

How to Disable Hyper-V in BCDEDIT

You can change Hyper-V startup options when Windows boots without uninstalling Hyper-V completely. In this case, Hyper-V is installed but inactivated. Hyper-V is not booted before Windows boots if you disable Hyper-V by using the command line bcdedit tool. Bcdedit is the command line tool to manage Boot Configuration Data or BCD. BCD store is used to describe boot parameters for applications, add boot menu entries, etc.

If you use BCD to disable Hyper-V, the Hyper-V feature is disabled but not uninstalled completely from Windows. As you remember, Hyper-V is the first-type hypervisor that boots before Windows boots. The idea of using this method is to disable Hyper-V in boot configuration.

To use this method to disable Hyper-V, run the command prompt (CMD) as administrator and run the following command:

bcdedit /set hypervisorlaunchtype off

Windows 10 disable Hyper-V - using the command line bcdedit tool

Note: If you need to enable Hyper-V again, run bcdedit /set hypervisorlaunchtype on

For more convenience, you can create two boot entries for your Windows machine. One boot entry is used to boot the operating system with Hyper-V, and another one is used to boot the OS without Hyper-V.

  1. Run the following command to copy the default boot configuration to the new entry. “Hyper-V disable” is the name of the new boot entry in my case.

    bcdedit /copy {default} /d "Hyper-V disable"

  2. The following output message is displayed:

    The entry was successfully copied to {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.

  3. Run the command to edit Hyper-V boot options for the new boot entry you have created. Copy the value in brackets {} from the above output message and paste to this command:

    bcdedit /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} hypervisorlaunchtype off

    Creating two boot menu options in Windows 10 with bcdedit

  4. You should see the message: The operation completed successfully.
  5. Edit the name of the default boot entry with Hyper-V to “Windows 10 Hyper-V” for more convenience:

    bcdedit /set {default} description "Windows 10 Hyper-V"

  6. Restart your computer.

Now you have two boot menu entries. Select “Hyper-V disable” to boot Windows without Hyper-V or select “Windows 10 Hyper-V” to boot Windows with Hyper-V.

How to disable Hyper-V Windows 10 – selecting options in the boot menu

You can also watch how to uninstall Hyper-V in Windows in this video:

How to Uninstall Hyper-V on Windows Server 2019

The process of removing Hyper-V in Windows Server 2019 is slightly different compared to Windows 10. In this section, we cover how to uninstall Hyper-V in Windows Server 2019. The workflow to uninstall Hyper-V on Windows Server 2022 and 2016 is identical.

Using the GUI

If your Windows Server is installed with the graphic experience and has a graphical user interface (GUI), then the easiest way to uninstall Hyper-V is using Server Manager and the Remove Roles and Features wizard.

  1. Open Server Manager (Start > Server Manager), and click Manage > Remove Roles and Features.

    Using the Remove Roles and Features wizard to uninstall Hyper-V in Windows Server 2016

    The Remove Roles and Features wizard opens.

  2. Before You Begin. There is nothing to configure at this step, but you can select the Skip this page by default option to avoid displaying this page in the future. Click Next to continue.
  3. Server Selection. Select a server from the server pool and select your server in the list. The server name is Hyper-V-Repl.test.net in my case. Hit Next at each step of the wizard to continue.

    Selecting a server on which you want to uninstall Hyper-V

  4. Server Roles. Deselect the Hyper-V checkbox in the list of roles to uninstall Hyper-V.

    Deselect the Hyper-V role to uninstall Hyper-V in Windows Server 2016 or 2019

  5. The popup window opens. Check the features that you are about to remove. Select Remove management tools (if applicable) to remove Hyper-V Manager Windows tools. Click Remove Features.

    Removing Hyper-V features in Windows Server

  6. Features. There is no need to remove custom features when you uninstall Hyper-V. Leave features configuration as is.

    The list of features in the Remove Roles and Features wizard

  7. Confirmation. Check all items that are going to be removed. Select the checkbox if you want your server to restart automatically when the Hyper-V role is removed. Otherwise, you need to restart Windows manually for changes to take effect and finish Hyper-V uninstallation. Click Remove to finish and uninstall Hyper-V.

    Restart of the server is required to uninstall Hyper-Vs

Using PowerShell

The PowerShell command to uninstall Hyper-V in Windows Server 2016, 2019, and 2022 is not the same as in Windows 10.

  1. Open PowerShell as administrator.
  2. Run the following command to uninstall Hyper-V on Windows Server 2016:

    Remove-WindowsFeature -Name Hyper-V

    Using PowerShell to uninstall Hyper-V in Windows Server 2016

  3. Restart the server to finish the removal process.

Issues That Can Occur

Sometimes issues may occur when you try to uninstall Hyper-V in Windows 10 and Windows Server 2016, 2019, or 2022. Let’s explain some common issues and offer recommendations to help fix these issues.

Case 1

If you see a message that Windows cannot uninstall Hyper-V components, try to check system files and their storage. Different error codes are displayed, for example, 0x800F0831, 0x80073701, etc. Use command line tools to fix this issue. Open the command line (CMD) with administrative privileges and run the following commands.

Dism /Online /Cleanup-Image /RestoreHealth

Dism.exe /online /Cleanup-Image /StartComponentCleanup

sfc /scannow

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

After executing these commands, logs are written to CBS.log and dism.log. Logs are useful for troubleshooting.

Case 2

Hyper-V is not uninstalled because a virtual network adapter or a virtual switch created by Hyper-V is present in a host Windows system. Remove virtual Hyper-V network adapters, and try to uninstall Hyper-V again. Here are some posts about Hyper-V network adapters and virtual switches from our blog.

Case 3

You disable Hyper-V but after reboot, Hyper-V is enabled again. A possible cause may be that a group policy is set to enable Hyper-V automatically on login after each boot. A system administrator should edit the group policy configuration to fix this issue. Remember, that Device Guard and Credential Guard are features using Hyper-V to work in Windows. Check Computer Configuration -> Administrative Templates -> System -> Device Guard in the group policy editor to make sure that there are no settings to force run Device Guard on a Windows machine.

Conclusion

Hyper-V can be uninstalled with a graphical user interface or a command line interface in Windows 10 and 11 and Windows Server 2016/2019/2022. The workflow is different for Windows 10 and Windows Server operating systems. If you have uninstalled Hyper-V, you can use another hypervisor to run virtual machines. Remember to back up your virtual machines to protect your data. NAKIVO Backup & Replication supports backup of VMware VMs  as well as Hyper-V VMs.

Remove hyper v role on windows server 2019 can be essential for reclaiming system resources, simplifying configurations, or preparing for a different virtualization solution. Hyper-V is a powerful tool for managing virtual machines (VMs) on Windows servers, but there are times when disabling or removing it becomes necessary. In this article, we’ll explore how to safely and efficiently remove the Hyper-V role from a Windows Server 2019 system, along with considerations, step-by-step guidance, and troubleshooting tips. Let’s dive into the process to ensure smooth uninstallation while protecting your system’s integrity and performance.

Why Remove the Hyper-V Role?

Resource Optimization: Hyper-V consumes considerable CPU, RAM, and storage resources. By removing it, these resources are freed, enhancing performance for other critical applications or roles.

System Simplification: Hyper-V adds complexity, especially if you’re not actively using virtual machines. Removing it helps simplify system management, updates, and troubleshooting.

Compatibility Needs: Some applications or tools may have compatibility issues with Hyper-V. Disabling Hyper-V can eliminate conflicts, allowing smoother operation of alternative virtualization solutions like VMware or VirtualBox.

Pre-Uninstallation Considerations

Before removing Hyper-V, here are key points to consider:

  1. Back-Up Virtual Machines: If you have virtual machines (VMs) running on Hyper-V, ensure they are backed up. Export your VMs to an external drive or another storage location to avoid data loss.
  2. Check Dependencies: Some services or applications may rely on Hyper-V. Assess your system to confirm that disabling Hyper-V won’t disrupt other important services.
  3. Consider Reboot Time: The server will require a reboot to complete the Hyper-V removal. Plan for a maintenance window to prevent unexpected downtime.
  4. User Access and Permissions: Ensure you have administrator privileges, as removing server roles requires elevated permissions.

Step-by-Step Guide to Removing the Hyper-V Role on Windows Server 2019

You can remove Hyper-V through the Server Manager or via PowerShell. Let’s go through both methods:

Method 1: Using Server Manager

  1. Open Server Manager:
    • Launch Server Manager from the Start menu or by pressing Win + S and typing “Server Manager.”
  2. Navigate to Manage:
    • In Server Manager, go to the “Manage” menu on the top-right corner.
  3. Remove Roles and Features:
    • Select Remove Roles and Features from the drop-down. This opens the wizard that allows you to remove server roles.
  4. Select Server:
    • Choose the server from which you wish to remove the Hyper-V role. In most cases, it’s the local server, so you can proceed by selecting it.
  5. Uncheck Hyper-V:
    • When you reach the “Roles” section, scroll down to find Hyper-V. Uncheck the box beside it, indicating that you want to remove the role.
  6. Confirm Removal:
    • The wizard will prompt you to confirm the removal. Review the options and click Next until you reach the “Remove” option. Click Remove to start the process.
  7. Restart the Server:
    • Once the wizard completes, it will prompt you to restart the server. Rebooting is necessary to finalize the removal.

Method 2: Using PowerShell

PowerShell offers a quick alternative to Server Manager, especially useful for advanced users or automated processes.

    1. Open PowerShell:
      • Launch PowerShell with administrator privileges by right-clicking on the Start menu and selecting Windows PowerShell (Admin).
    2. Run the Removal Command:
      • Enter the following command to remove the Hyper-V role:
        powershell   Copy code
        
        Uninstall-WindowsFeature -Name Hyper-V -Restart
      • This command uninstalls Hyper-V and automatically restarts the server. If you want more control over the reboot process, you can omit -Restart and manually restart the server after the uninstallation.

Post-Uninstallation Steps

After removing the Hyper-V role, take the following steps to verify the uninstallation and clean up any remaining artifacts:

    1. Verify Hyper-V Removal:
      • To confirm Hyper-V is uninstalled, open Server Manager or use PowerShell:
        powershell   Copy code
        
        Get-WindowsFeature -Name Hyper-V
      • This command will return the current state of the Hyper-V feature. If it shows as “Removed,” the process was successful.
    2. Check for Virtual Switches:
      • Removing Hyper-V doesn’t always delete virtual network switches. Open Network Connections in Control Panel and remove any unnecessary vEthernet switches associated with Hyper-V.
    3. Clean Up Storage:
      • If you had virtual machines or storage associated with Hyper-V, review your storage drives to remove any unneeded files, freeing up disk space.
    4. Update System Drivers:
      • Removing Hyper-V may affect certain drivers. Ensure all drivers are up-to-date to avoid potential conflicts or performance issues.

Troubleshooting Common Issues

During or after the removal process, you may encounter a few issues. Here are some solutions to the most common ones:

    1. Removal Failure Due to Dependencies:
      • If the removal fails due to dependency issues, check if other services are relying on Hyper-V. Disable these dependencies before attempting the removal again.
    2. Failed Restart:
      • Occasionally, the server might fail to restart during the Hyper-V removal. If this happens, manually reboot the server, then check if Hyper-V has been successfully uninstalled.
    3. Network Issues:
      • If you experience network issues post-uninstallation, double-check network settings and remove any orphaned virtual switches. Restarting the network adapter can also help resolve connectivity problems.

Benefits of Hyper-V Removal

By removing Hyper-V from your Windows Server 2019 environment, you gain several benefits:

  • Resource Reallocation: Without Hyper-V, system resources like CPU, RAM, and storage are freed up for other tasks.
  • Enhanced Performance: Some server functions may run more smoothly without the overhead associated with Hyper-V.
  • Simplified Maintenance: Fewer roles on the server reduce the complexity of updates, monitoring, and troubleshooting.

Conclusion

Removing the hyper-v role on windows server 2019 is a straightforward process that can bring significant performance and management benefits, particularly if virtualization is no longer needed. Using Server Manager or PowerShell, you can effectively disable and remove Hyper-V with minimal system disruption. Remember to back up any important data before starting, and follow best practices for a smooth uninstallation experience.

(

Мой ответ — скорее «для общего случая»

Для «Windows Server 2019, при установке служб RDS автоматически установился Hyper-V» склоняюсь к варианту:
==
Hyper-V — это следствие Virtual Desktop, которые являются неотделимой частью RDS (ибо это не RDP).
==

)

} Выключить Hyper-V — в управлении сервером отключить роль Hyper-V

Увы, примерно с Win 1703 этого недостаточно . . .

Например : WSL2

Вернее, это не требуется для ПО использущего API WHPX ( Windows Hypervisor Platform ):
— VirtualBox 6.0.X ( 6.1.X пока на стадии Beta1)
— эмуляторы Android
— QEMU

(

Или требуется, но для ускорения работы

)

C VMWare workstation — действительно надо отключать

C полгода назад в попытках, хотя бы в виде «матрёшки» VM-in-VM, запустить VMWare workstation
«внутри Hyper-V» перебрал чуть ли не все версии VMWare

И всё впустую Ж-(

(

Т.е. Hyper-V «внутри VMWare workstation» — можно, видел материалы.
А вот наоборот …

)

P.S.

«как отключить Hyper-V», Device Guard / Creditional Guard

VMware Workstation and Device/Credential Guard are not compatible
VMware Workstation and Device/Credential Guard are…

Device Guard and Credential Guard hardware Readiness Tool v3.6
Device Guard and Credential Guard hardware Readine…

If you’re looking to remove Hyper-V from your Windows Server 2019 environment, you might find it a bit tricky. In this guide, we’ll cover everything from prerequisites to step-by-step removal methods, ensuring a smooth process from start to finish.


TOC

Understanding Hyper-V and Why You Might Remove It

Hyper-V is Microsoft’s native hypervisor designed to create and manage virtual machines on Windows-based operating systems. While it offers a range of virtualization features—such as isolation, resource allocation, and integration with other Microsoft services—there are many reasons you might decide it’s time to remove it:

  1. Resource Constraints: Virtualization can consume significant CPU, memory, and storage resources, which may be needed for other services.
  2. Server Repurposing: Perhaps you initially set up the server for virtualization, but now you want to reassign it to serve as a domain controller, file server, or some other dedicated role.
  3. Compatibility Issues: Certain applications or drivers might conflict with virtualization technologies, making Hyper-V an undesirable component.
  4. Security Policies: Some organizational or security policies might forbid virtualization on specific systems, especially those in high-security environments.

By understanding these reasons, you can better prepare for the next steps. Removing Hyper-V is straightforward if you know where to look and which commands to run, but there can be unexpected hurdles along the way.


What Happens When Hyper-V Is Removed

When you remove Hyper-V from a server, all of the underlying virtualization components, services, and drivers are uninstalled. Any virtual machines that were running will no longer be accessible. If you plan to migrate those VMs elsewhere, be sure to export or back them up prior to removal.

Component Effect of Removal
Hyper-V Management Service Service is removed, preventing the creation or management of VMs
Virtual Switches All virtual network switches are deleted, removing connectivity for any VMs
Integration Services Hyper-V guest service integration for Windows-based VMs is removed
Hyper-V Manager Tools Graphical and CLI-based management utilities are uninstalled

Pre-Removal Considerations

Before you remove the Hyper-V role, it’s crucial to take some preparatory steps to ensure a smooth and safe process.

1. Check Dependencies

  • Other Roles: Make sure that no other roles like Remote Desktop Virtualization or other virtualization extensions depend on Hyper-V.
  • Virtual Switch Dependencies: If you have set up virtual switches, consider the impact on network adapters or any software that might rely on those switches.

2. Back Up Your System

  • Full Backup: Always perform a full system backup or create a snapshot if you’re running in a virtual environment. This ensures you can revert if anything goes wrong.
  • Export Virtual Machines: If you have any active virtual machines, export them to external storage or migrate them to another Hyper-V host. Once you remove Hyper-V, the VMs are no longer usable on this server.

3. Plan Downtime

  • Server Reboots: Removing Hyper-V often requires a system reboot. Plan for a maintenance window to avoid interrupting critical workloads.
  • Service Interruptions: If this server runs any critical services, schedule an appropriate downtime or move essential tasks to another machine temporarily.

Using Server Manager to Remove Hyper-V

For many administrators, Server Manager is the first stop for adding or removing roles and features in Windows Server. Let’s walk through the process step-by-step.

  1. Open Server Manager: Click the Start button, type “Server Manager,” and open the application.
  2. Manage Menu: In Server Manager, go to the Manage menu in the top-right corner and select Remove Roles and Features.
  3. Select the Server: When prompted, choose the server from which you want to remove Hyper-V.
  4. Server Roles: In the list of server roles, uncheck Hyper-V. If the box is grayed out, it often means there is some dependency or you lack the proper permissions.
  5. Features: Scroll through the features list to ensure there are no other Hyper-V management components selected.
  6. Confirmation: Click Next and proceed to remove the role. If everything is in order, the wizard will prompt you to remove Hyper-V and reboot the server.

Gray-Out Issue in Server Manager

Sometimes the Hyper-V role option is grayed out, making it impossible to deselect. Reasons for this include:

  • Insufficient Privileges: Even if you’re an administrator, certain Group Policy settings or domain configurations might prevent role removal.
  • Active Virtual Machines: If a VM is still running, the option might remain disabled.
  • Other Dependent Features: Some Windows features or roles might rely on Hyper-V components.

Possible Solutions

  • Run as Administrator: Make sure to start Server Manager with elevated privileges or log in with the built-in Administrator account.
  • Stop Active VMs: Shut down all virtual machines and confirm they aren’t set to auto-start.
  • Check for Dependencies: In the Features section, ensure no other Hyper-V-related features are active.
  • Use PowerShell: When Server Manager fails, PowerShell is often more reliable and thorough for role removal.

Removing Hyper-V Using PowerShell

PowerShell provides a powerful way to remove server roles and features without having to rely on the graphical interface. If you run into any limitations with Server Manager, PowerShell commands can often circumvent those issues.

1. Remove-WindowsFeature Command

A straightforward approach is to use the Remove-WindowsFeature cmdlet. Open an elevated PowerShell session and type:

Remove-WindowsFeature -Name Hyper-V -IncludeManagementTools
  • Hyper-V: The main Hyper-V feature.
  • -IncludeManagementTools: Ensures that any Hyper-V management tools like Hyper-V Manager are also removed.

After the removal is complete, you’ll receive a success message and may be prompted to restart the server. Go ahead and reboot to finalize the process.

2. Using DISM (Optional)

Microsoft also provides the Deployment Image Servicing and Management (DISM) tool, which can manage roles and features at the OS image level. The command might look like:

DISM /Online /Disable-Feature /FeatureName:Microsoft-Hyper-V-All
  • /Online: Indicates you’re working on the currently running operating system.
  • /Disable-Feature: Tells DISM to remove or disable the specified feature.
  • FeatureName: Microsoft-Hyper-V-All includes the core hypervisor and related components.

Both PowerShell and DISM serve similar purposes, but PowerShell often offers more verbose output and immediate role management integration.

Comparing PowerShell vs. DISM

Factor PowerShell DISM
Ease of Use High; intuitive cmdlets Moderate; requires knowledge of DISM syntax
Integration Deeply integrated with Windows Server roles and features Works at the OS image level; can be used for offline servicing
Output Detail Provides verbose logs and status messages Outputs basic status; logs can be found in DISM logs
Common Uses Daily server administration, role management, scripting Image deployment, offline servicing, advanced diagnostics

Why Some Commands Fail

If you’ve tried commands like:

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor

and found no success, it often indicates:

  • Incomplete Removal: This command might only disable the hypervisor but not remove the full Hyper-V role, leaving behind services and dependencies.
  • Active Dependencies: Background services or features relying on Hyper-V remain active.
  • Permission Issues: Not running PowerShell as an administrator can cause failures.

The Remove-WindowsFeature cmdlet is more comprehensive for Windows Server, ensuring all Hyper-V components and sub-features are removed.


Common Issues and Troubleshooting

While the process is typically straightforward, a few roadblocks can appear. Below are some of the most common issues you might face, alongside recommended solutions.

1. Hyper-V Services Still Running

Hyper-V includes multiple services that might continue to run if they’re tied to other processes. If the removal fails, try stopping these services manually:

  • Hyper-V Virtual Machine Management (vmms)
  • Hyper-V Host Compute Service (vmcompute)

Use the following commands in an elevated PowerShell session:

Stop-Service -Name vmms
Stop-Service -Name vmcompute

Once stopped, rerun the removal cmdlets.

Disabling Services at Startup

If the issue persists after a reboot, set these services to Disabled startup type:

Set-Service -Name vmms -StartupType Disabled
Set-Service -Name vmcompute -StartupType Disabled

Then restart the server and attempt removing Hyper-V again.


2. Virtual Switch or Virtual Adapters

Sometimes administrators forget about the virtual switch or custom network adapters created by Hyper-V. If these remain active, they can prevent a clean removal.

  1. Check Network Connections: Open Network and Sharing Center and see if virtual network adapters are still present.
  2. Remove Virtual Switches: In an elevated PowerShell session, run:
   Get-VMSwitch | Remove-VMSwitch

This removes all virtual switches, ensuring no leftover network objects block the role removal.

Manual Cleanup

In rare cases, you might have to manually remove legacy adapters or references in the registry. Always back up the registry before making any changes, as incorrect modifications can cause system instability.


3. Corrupted Server Manager or Feature Store

If neither Server Manager nor PowerShell works, your Server Manager or feature store might be corrupted. In such cases:

  1. Run SFC/SCANNOW: This built-in Windows command checks for system file corruption.
   sfc /scannow
  1. Run DISM Check: Use DISM commands to repair the image.
   DISM /Online /Cleanup-Image /RestoreHealth
  1. Server Manager Repair: Occasionally, reinstalling or re-registering Server Manager components might be required if they’re causing the gray-out issue.

Verifying Hyper-V Removal

After you’ve attempted removal using either Server Manager or PowerShell, it’s good practice to confirm that Hyper-V is indeed gone from your server.

1. Server Manager Confirmation

  • Open Server Manager: Navigate back to Manage > Remove Roles and Features.
  • Check Roles: Hyper-V should no longer appear or should be unchecked in the list of roles.
  • Restart if Prompted: If a reboot prompt appears, complete the reboot first, then verify again.

2. PowerShell Verification

In an elevated PowerShell window, run:

Get-WindowsFeature | Where-Object {$_.Name -like "*Hyper-V*"}
  • If Hyper-V is fully removed, the Installed state should be listed as False for all Hyper-V-related features.

Post-Removal Cleanup Steps

  • Delete Residual Files: Check C:\ProgramData\Microsoft\Windows\Hyper-V or any custom storage location for leftover files or logs.
  • Refresh Network Settings: If you had virtual switches, ensure your physical network adapters are configured correctly for your production environment.

Best Practices Before and After Removal

While removing Hyper-V is often straightforward, there are best practices to keep in mind to ensure a hassle-free experience.

1. Document Your Environment

  • VM Inventory: Record all virtual machines, their configurations, IP addresses, and storage locations. This ensures you don’t lose critical VM data.
  • Networking Configuration: Note the details of each virtual switch and any VLAN IDs in use.

2. Maintain Updated Drivers

  • Network Adapters: After removing virtual switches, it’s good to ensure the physical adapter drivers are up to date.
  • Firmware Updates: Some vendors tie server firmware updates to virtualization features. Check your server’s BIOS/UEFI settings and ensure they’re current.

3. Stay on Top of Windows Updates

  • Post-Removal Updates: Removing a major role like Hyper-V can sometimes expose missing or outdated OS components. Make sure to apply all pending Windows Updates.

4. Plan for Future Virtualization Needs

  • Reinstallation: If you ever decide to bring virtualization back, keep a record of your original Hyper-V configuration for a smoother setup next time.
  • Explore Alternatives: If you’re removing Hyper-V permanently due to performance or other considerations, consider evaluating other hypervisors to see if they better suit your needs.

Conclusion

Removing the Hyper-V role on Windows Server 2019 can be achieved effortlessly with a bit of preparation and the right PowerShell commands. Whether you prefer using Server Manager or rely on the Remove-WindowsFeature and DISM commands, ensuring no dependencies or active VMs remain will lead to a clean, error-free removal. Always remember to back up your system, note any dependencies, and verify removal to keep your server environment running optimally.

By following these guidelines, you’ll avoid unexpected downtimes and maintain a stable infrastructure, even after removing a critical role like Hyper-V. And if you ever need virtualization again, you’ll know exactly how to restore or reinstall it.


Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как посмотреть название видеокарты на windows 10 на ноутбуке
  • Telegram windows 11 theme
  • Изменить пароль на удаленном рабочем столе windows 10
  • Windows 8 build 7850 download
  • Такие ошибки могут возникать из за того что вы используете устаревшую версию windows что делать