Hi,
To failover a virtual machine (VM) from Site A to Site B in System Center Virtual Machine Manager (VMM) with logical switches, you can follow the below steps:
- Create a Hyper-V replica of the VM on Site B by enabling Hyper-V Replica for the VM and including it in the replica group that is being used to replicate data between the two sites.
- Configure Failover and Reprotection settings for the replica of the VM on Site B in VMM by following these steps: a. Go to the Properties of the VM in VMM, and select Replication Settings. b. Select the virtualization host on Site B where the replica VM is located under the Replication Servers tab. c. Set the Failover Options and Reprotection Settings by selecting the replica VM and clicking Configure Failover. d. In the Configure Failover Wizard, select the Destination Host and Network Adapter, and then choose the Destination Switch. e. Map the Destination Logical Network to the Source Logical Network that the VM was originally using by choosing the appropriate network mapping. f. Configure other settings like IP settings, availability options, etc. as needed.
- After the replica VM is configured, you can create a Failover Plan in VMM to automate the failover process for multiple VMs. a. Go to the VMM Library, and select Create > Virtual Machine Rollout > Create Failover Plan. b. Follow the wizard to create a new Failover Plan and add the replica VM that you created earlier to the plan. c. Select the necessary options for the Failover Plan, including the destination host, network, and replication settings. d. Choose the VMs that you want to include in the Failover Plan, and configure any additional settings like IP addressing, etc. as needed.
- When a failover is triggered due to an outage or other event, the VM will be shut down gracefully on the source site, and then started up on the destination site using the replica data.
- After the outage is resolved, you can failback the VM by reversing the replication process, and then creating a new VM on the source site using the replica data that was generated during the failover process.
It is recommended to use VMM 2022 and Azure Site Recovery for handling disaster recovery scenarios, as this version of VMM has reached the end of support. In addition, it is important to follow best practices when deploying VMM and logical networks to ensure that your environment is properly configured and secure.
References:
- Configure VM failover between virtual networks: https://learn.microsoft.com/en-us/system-center/vmm/manage-vm-failover-virtual-networks
- Set up logical networks in the VMM 2022 fabric: https://learn.microsoft.com/en-us/system-center/vmm/network-logical-2022
- Manage Storage Replica in VMM: https://learn.microsoft.com/en-us/system-center/vmm/storage-replica#deployment-steps