Connect with us

Gadgets

How to Move a Hyper-V Stand-alone VM to a Cluster

[ad_1]

If you created a VM in a Hyper-V stand-alone host, read this guide to learn how to move the VM to a highly available cluster.

Background and Requirements

If you have a Hyper-V VM on stand-alone hots, you may want to move it to a cluster. Moving a VM to a Hyper-V cluster makes the VM highly available.

This means that if the Hyper-V host the VM is currently deployed becomes unavailable, it can be automatically migrated to another host on the cluster. Another benefit of having a VM in a cluster is that it allows hosts to be shut down for maintenance without shutting down the VMs on the host.

To move a VM to a highly available Hyper-V cluster, the following conditions must be met:

  1. You must have set up a Hyper-V cluster
  2. Ideally, the current Hyper-V host should be a member of the Hyper-V cluster
  3. If the current Hyper-V host is not a member of the cluster, Live Migration must be enabled on the host

In the following sections, I have explained the steps to make a VM highly available by migrating it to a Hyper-V cluster.

Step 1: Enable Live Migration on the Host (Optional)

Perform this optional step if the current host is not a member of a Hyper-V cluster. If a Hyper-V is a member of a cluster, Live Migration would be enabled.

  1. Select the host from the Hyper-V Manager, then click Hyper-V Settings on the details pane.
Select the host from the Hyper-V Manager, then click Hyper-V Settings on the details pane.
  1. Then, click the Live Migration node on the host’s settings page. After that, check the Enable incoming and outgoing live migration checkbox.

If you have a different network or VLAN for Live Migration, choose the Use these IP addresses for live migration option and use the Add button to enter the IP address to use for Live Migration.

Then, click the Live Migration node on the host's settings page. After that, check the Enable incoming and outgoing live migration checkboxThen, click the Live Migration node on the host's settings page. After that, check the Enable incoming and outgoing live migration checkbox
  1. If you need to configure the Advanced settings of Live Migration, expand the + sign next to it, and click Advanced Features. When you finish, click OK to save the changes you made.

Step 2: Migrate the VM to a Hyper-V Cluster

In this section, I’ll move the VM, IPMvWAC from a local Hyper-V host to a a Hyper-V Cluster.

Step 2: Migrate the VM to a Hyper-V ClusterStep 2: Migrate the VM to a Hyper-V Cluster

To give context, the VM and its storage are saved in the Hyper-V host’s local storage. Additionally, to confirm this VM is not on a cluster, see the Roles node on my second screenshot below.

Migrate the VM to a Hyper-V ClusterMigrate the VM to a Hyper-V Cluster
Additionally, to confirm this VM is not on a cluster, see the Roles node on my second screenshot below. Additionally, to confirm this VM is not on a cluster, see the Roles node on my second screenshot below.

Once I migrate the VM to the cluster, it will be displayed as a cluster role in the Failover Cluster Manager.

Meanwhile, migrating a VM to a cluster is a two-step process. The first step is to move the VM’s storage to the Cluster Shared Volumen.

After that, migrate the VM to the cluster.

Step 2, Task 1: Migrate the VM to a CSV

  1. From the Hyper-V Manager on the host where the stand-alone, local VM is located, right-click the VM and select Move. Then, on the first page of the wizard, click Next.
Step 2, Task 1  - Migrate the VM to a CSV - step 1Step 2, Task 1  - Migrate the VM to a CSV - step 1
  1. On the Move Type page, choose option 2 – Move the virtual machine’s storage.
  1. Then, on the Choose options for moving storage page, select Move all the virtual machine’s data to a single location.

Before performing the next step, create a folder for the VM in the Cluster Shared Volumen.

  1. After that, use the Browse button to select the newly created VM’s folder in Cluster Shared Volume as the new location for the VM.
After that, use the Browse button to select the newly created VM's folder in Cluster Shared Volume as the new location for the VM. After that, use the Browse button to select the newly created VM's folder in Cluster Shared Volume as the new location for the VM.
  1. Finally, review your selections and click Finish to start the VM migration, then, wait for the VM’s files to move.
Finally, review your selections and click Finish to start the VM migration. Finally, review your selections and click Finish to start the VM migration.
then, wait for the VM's files to move. then, wait for the VM's files to move.

Step 2, Task 2: Move the VM to a Hyper-V Cluster

  1. From the Failover Cluster Manager on the Hyper-V host where the VM is located, expand the cluster node, right-click Roles, and choose Configure Roles. Then, on the first page of the Highly Availability Wizard, click Next.
  1. After that, choose Virtual Machines on the Select Roles node. Then, check the checkbox before the VM you want to make Highly Available and click Next.
After that, choose Virtual Machines on the Select Roles node. After that, choose Virtual Machines on the Select Roles node.
 Then, check the checkbox before the VM you want to make Highly Available and click Next.  Then, check the checkbox before the VM you want to make Highly Available and click Next.
  1. Finally, confirm that you selected the right VM, then, click Next to start moving the VM to the cluster. When the wizard finishes moving the VM, click Finish to close the wizard.
When the wizard finishes moving the VM, click Finish to close the wizard. When the wizard finishes moving the VM, click Finish to close the wizard.

Now the VM is listed as a role in the Hyper-V cluster!

Now the VM is listed as a role in the Hyper-V cluster!Now the VM is listed as a role in the Hyper-V cluster!

Conclusion

If you create a VM on a HYper-V host before the host is joined to a cluster, you can move the VM to the cluster using the steps discussed in this guide.

I hope you enjoyed reading this guide as much as I loved writing it! Let me know your thoughts by responding to our “Was this page helpful?” feedback request below.

[ad_2]

Victor Ashiedu

Source link