This guide provides detailed, platform-specific instructions for removing a virtual machine (VM) from a high-availability (HA) configuration in VMware, Hyper-V, and Nutanix AHV environments.
Removing a VM from HA doesn't delete the VM itself; it simply removes the cluster's ability to automatically restart or fail over that specific VM if the host fails.
Removing a VM from a VMware HA Cluster
In VMware vSphere, you can override the cluster's HA settings for individual VMs using the "VM Overrides" feature. This approach is ideal because it allows you to remove a single VM from HA protection without disabling HA for the entire cluster.
Prerequisites
- Log in to the vSphere Client with administrator permissions.
- Ensure the VM is powered off if possible, though this process can often be performed while the VM is running.
Step-by-step process
- Navigate to the cluster: In the vSphere Client, go to Hosts and Clusters.
- Access cluster settings: Right-click the cluster that the VM is in and select Settings. You can also click the cluster and go to the Configure tab.
- Go to VM Overrides: In the settings or Configure tab, expand the vSphere Availability section and select VM Overrides.
- Add a new override: Click the Add button (often a green plus sign) to open a list of VMs in the cluster.
- Select the VM: Choose the VM(s) you want to remove from HA and click OK.
- Modify the restart priority: In the VM Overrides list, find your VM and select its VM Restart Priority. In the drop-down menu, change the priority from "Use cluster setting" to "Disabled".
- Apply the change: Click OK to save and apply the changes. The cluster will reconfigure, and the VM is now excluded from HA protection.
Removing a VM from a Hyper-V Failover Cluster
For Hyper-V, VMs are made highly available by adding them as a "Role" in the Failover Cluster Manager. To remove a VM from HA, you must remove this cluster role.
Prerequisites
- Log in to a server that is a member of the failover cluster.
- Open the Failover Cluster Manager.
- Important: This process removes the VM from cluster control but does not delete the VM or its disk files from storage.
Step-by-step process
- Navigate to roles: In the Failover Cluster Manager, expand the cluster name in the left pane and click Roles.
- Select the VM: In the center pane, find and right-click the virtual machine you wish to remove.
- Remove the role: Select Remove from the context menu.
- Confirm the action: A dialog box will appear asking for confirmation. Click Yes to remove the clustered role. The VM will no longer be under the control of the cluster's HA service.
- Clean up (if necessary): The VM will remain powered on and can be managed directly via Hyper-V Manager on its host server. If you need to completely delete the VM, you must do so separately using the Hyper-V Manager.
Using PowerShell
For scripting or bulk operations, you can use the Remove-ClusterGroup cmdlet to unregister the VM from the cluster.
# First, identify the VM's cluster group name
Get-ClusterGroup
# Then, remove the group for the target VM
Remove-ClusterGroup -Name "<VM_Name>"
Use code with caution.
Removing a VM from a Nutanix AHV HA Cluster
In Nutanix AHV clusters, you can set the HA level on a per-VM basis. Removing a VM from HA involves updating this setting.
Prerequisites
- Log in to the Nutanix Prism console.
- Have appropriate permissions to modify VM settings.
Step-by-step process
- Navigate to VMs: In the Prism web console, select Compute & Storage from the main menu, and then click VMs.
- Select the VM: Find and select the VM you want to modify, then click the Update button.
- Edit the HA configuration: In the update dialog, scroll down to the High Availability section.
- Set the HA value: Change the HA configuration for the VM by setting the value to -1. A value of -1 effectively disables HA for that specific VM, meaning it will not be automatically restarted on a new host if its current host fails.
- Save the changes: Click Save to apply the configuration. The VM is now removed from the cluster's HA resource calculation.
Deeper Considerations for Removing a VM from HA
Understanding the impact
- No more automatic restarts: The most significant effect is that the cluster will no longer automatically restart the VM on a different host in the event of a host failure. The VM will remain offline until its original host is back online and functional.
- Resource availability: Removing non-critical VMs from HA can free up cluster resources. Clusters allocate a portion of their resources to HA failover capacity, and removing VMs from this calculation can make more resources available for other tasks.
- Licensing implications: Some applications have licensing tied to the physical CPU of the host. In such cases, removing a VM from HA prevents it from being failed over to a non-compliant host, which could violate licensing terms.
- Planned downtime: For VMs that are scheduled for maintenance or are non-critical, temporarily removing them from HA can simplify operations. If the host it is on fails during this period, you would already expect some downtime for this VM.
Best practices
- Communicate the change: Before making any changes, inform relevant teams (e.g., application owners, IT support) about the plan and the potential impact of removing the VM from HA protection.
- Document the change: Record the change in your configuration management database (CMDB) or a change control system. This ensures that the VM's HA status is known and tracked.
- Use overrides, not global settings: Wherever possible, use per-VM override settings rather than disabling HA for the entire cluster. This allows for granular control and maintains protection for your critical workloads.
- Create a backup: Before making significant configuration changes, always ensure you have a recent, reliable backup of the VM.
- Test the configuration: If possible, test the new configuration to confirm that the VM behaves as expected in a host failure scenario. This is especially important for critical systems.