Click me
Transcribed

How to use Hyper-V Replicas in Windows Server 2012

Windows Server 2012 HYPER-V REPLICA HYPER-V REPLICA HOW TO USE HYPER-V REPLICAS IN WINDOWS SERVER 2012 Updated every 5 minutes A replica is just what it says, a copy of a live VM stored on a remote server that is Until now if you wanted to implement High Availability in Virtual Machines (VMs), you would have to invest in cluster technology and some shared storage. updated every five minutes with any changes. Now the arrival of Windows Server 2012 brings with it a perfectly acceptable disaster recovery solution for VMs that is free, built into the product and easy to implement. At any point in time you can failover to the replica and bring the virtualised workload back online. WHAT YOU NEED TO GET STARTED Hyper-V Replicas can be implemented if you have any two physical Windows Server 2012 servers. These must both have the Hyper-V role installed. The location of the servers is not important – they can be in the same rack or on different continents. The only other requirements are: They can be connected by an IP network. They have sufficient storage to host the virtualised workloads to be replicated. The network bandwidth is sufficient to cope with the initial transfers. Replication is very flexible: in or out of domains, and in or out of failover clusters (same cluster or not). It also allows a completely standalone non- domain single replication model – which is the scenario that this infographic deals with. 2 WHERE TO BEGIN HYPER-V ROLE HYPER-V ROLE First install the Hyper-V role on both machines (using Server Manager, or PowerShell 3.0 if you are a command-line guru). INSTALL HYPER-V SERVER 1 SERVER 2 To prepare for replication, set-up an External Replication network using the virtual switch manager. This needs to be done on both servers, with the network name being the same on each. The only other step to prepare for the use of replicas is to have a VM configured on each server. This is because we are going to set both servers up to replicate each other. VIRTUAL SWITCH VRTUAL SWITCH RENAME RENAME VM VM We now have two physical servers acting as Hosts or Parents to a VM, using the same replication network. On Server One, open Hyper-V manager and select the VM you wish to replicate. Right-click on the VM, and select "Enable Replication". Unsurprisingly, this fires-up a wizard. In the Specify Replica Server Box, enter the FQDN of your second server. You will receive an error stating that the server is not ready to host replicas. There is a convenient Configure Server button – click this. ENABLE REPLICATION WIZARD --- X (FQDN) ERROR: CONFIGURE SERVER 1 SERVER SERVER VM VM This opens the Hyper-V Settings window for the second server, with the focus on the Replication configuration section. Check the Enable this Server for Replication box. Depending on your requirements, these settings allow for unencrypted HTTP traffic (port 80) or encrypted HTTPS communication (port 443), It also allows for authentication from a single server, a group or from any server. REPLICATION ENABLED HYPER-V SETTINGS ENABLE REPLICATION SERVER 2 SERVER SERVER VM VM USE KERBEROS AUTHENTICATION ENABLE REPLICATION You then want to check the Use Kerberos (HTTP) box, and the Allow Authentication From Any Server Radio button. Apply these settings. A warning points you to the correct firewall rules to enable. This screenshot shows which rule to set on both servers: REPLICATION ENABLED FIREWALL SERVER SERVER VM VM File Action View Help Windows Firewall with Advance Inbound Rules 3 Inbound Rules Outbound Rules N Connection Security Rules Hper-V- WMI (Arync-In) E Monitoring Actions OA Inbound Rules a New Rule. V Filter by Profile Y Filter by State Group File and Printer Sharing over. All Profile Enabled Action O File and Printer Sharing over SMBDirect (WARP-In) No Allow Hyper-V Hyper-V Hyper-V All Yes Allow OHyper-V- WMI (DCOM-In) OHyper-V- WMI (TCP-In) OHyper-V (MIG-TCP-In) OHyper V (REMOTE OESKTOP_TCP_IN) OHyper-V (RPC) OHyper-V (RPC-EPMAP) OHyper-V Management Clients - WMI (Async-In) OHyper-V Management Clients - WMI (DCOM-In) OHyper-V Management Clients - WM (TCP-In) OHyper-V Replica HTTP Listener (TCP-In) OHyper-V Replica HTTPS Listener (TCP-In) OiscSI Service (TCP-In) OKey Management Service (TCP-In) ONetlogon Service ONP-In) O Netlogon Service Authz (RPC) ONetwork Discovery ALMNR-UDP-In) ONetwork Discovery (NB-Datagram-In) All Yes Allow All Yes Allow All Yes Allow Hyper-V Hyper-V Нуper-V Hyper-V V Filter by Group All Yes Allow View All Yes Allow a Refresh E Export List All Yes Allow Allow Hyper-V Management Clients All Hyper-V Management Clients All Hyper-V Management Clients All Hyper-V Replica HTTP Hyper-V Replica HTTPS ISCI Service Yes Yes Allow 2 Help Yes Allow Selected Items O Enable Rule All No Allow All No Allow All No * Cut Key Management Service Netlogon Service Netlogon Service Network Discovery Network Discovery All No Allow N. e Copy X Delete All No Allow N Al No All No N 2 Help All No Allow Simply accept all the defaults for the rest of the wizard. There are also many areas for configuration, to allow for more flexible use of replication. 3 NOW DO IT ALL OVER AGAIN ---- Replication is now enabled, and the initial replication has started. If this is a small machine and the SERVER SERVER ---- network is quick, go to the second server and see if the replicated VM has appeared. If it has, in the bottom section of Hyper-V manager, you will see there is now a Replication tab. Select the replicated VM and click that Replication tab. You will see it is listed as a replica. INITIAL REPLICATION REPLICATION VM PRIMARY VM REPLICA VM SERVER SERVER INITIAL REPLICATION REPLICATION Repeat the above steps for the VM on Server Two. PRIMARY VM PRIMARY VM REPLICA VM ---- - REPLICA VM ---- SERVER SERVER Provided that you set the Firewall rules correctly, you now have a cross-replicated system, where each server hosts a primary and a replica VM. There is no cluster, no SAN, no shared storage, just replicas as shown below. INITIAL REPLICATION REPLICATION PRIMARY VM PRIMARY VM REPLICA + - REPLICA Hyper-V Manager HV1 Virtual Machines HV2 Name State CPU Usage Replication Health Assigned Memory Uptime I SOL Server HRAPP Sharepoint Server Intranet Off Nomal Running 0% Not Applicable 2098 MB 00.06:49 Snapshots SQL Server HRAPP Replication Type: Replication State: Primary Replication enabled Current Primary Server: HV1.Contoso.com Current Replica Server: HV2.Contoso.oom Replication Health: Nomal Last synchronized at: 12/11/2012 3:39:44 AM Summary Memory Networking Replcation Hyper-V Manager a HV1 I HV2 Virtual Machines CPU Usage Replication Health Name State Assigned Memory Uptime Stat SQL Server HRAPP Of Nomal Windows Server 2012 Sta ff Not Applicable Not Applicable Not Applicable Not Applicable Windows Server 2012 Sta. Off Win7 Clent Win 8 E server2012core I server2012 exch sc03 Sc02 Off Of Of Not Applicable Off Not Applicable Not Applicable Not Applicable Of Of Snapshots SQL Server HRAPP Replication Type: Replica Current Primary Server: HV1.Contoso.com Replication State: Replication enabled Current Replica Server: HV2.Contoso.com Replication Health: Nomal Last synchronized at: 12/11/2012 3:39:44 AM Summary Memory Networking Replcation It's possible to select a time period for replication - and whether it starts manually or automatically. VHDS can be included and excluded from the replication if required. Recovery points can be maintained, and the number of these to be stored is also configurable (between 1 and 15). The transmitted data can be compressed and encrypted if required. All of these settings can be managed in the VM Settings window. FAILOVER SCENARIOS Hyper-V replication allows for several different failover scenarios. From the replica copy itself, these options are available: While from the Primary VM, the below are available: Hypw-V Mnag 33 Hvaer Minager Virtual Machines Vrtual Machines a H7 HaHV Aanignid Menery Cate i zureaint Server inand of Comert. Snapsh Ssarsh bad vitual mactne he re pahot Meve. tec vetual rachire hena nphote Move. Fyrert Rarame Lelete ShareP Raplicaion Plarnid Falovr heCotos.com Mtra e Kepeca tilover VIorosc.co Hep Repiratn Reslication teathe Nom Vina kapkratin Haalth Remore Repitior Repk Tat Faibver. v2 Corda can Heb kang012 32027 AM Pause Rpicaten Vie Repatl RemeveRephation Sum Marery tng Rapleaan Smrary MenyNatvodeng Replctan So there are: TEST FAILOVER A FAILOVER This option ensures that your replica VM starts correctly, and is a viable DR solution. By selecting this, a new VM is created which allows the administrator to confirm its status: This is the one to use when the Primary VM has failed, and you need to get your virtualised workload up and running as soon as possible. H Hyper-V Manager a HV1 FO HV2 Simply select Replication and Failover. The standard warning appears, select your recovery point and click Failover. The replica remains the replica, but is the active VM. The Replication highlights the completed failover, and the warning that the primary is offline. Virtual Machines Name State CPUI ISQL Server HRAPP I Sharepoint Server Intranet Of Running 0% Once the Primary VM is up and running there are several options to return to normal. Though these are outside the scope of an infographic. Microsoft has published an 82-page Understanding and Troubleshooting guide for Hyper-V replicas, which will assist with this and any other unanswered questions. To ensure that your Test Failover doesn't interfere with your production machines, Hyper-V now has the ability to inject a different IP addressing scheme into your Replica. It can also start it using an entirely different network, using the virtual switch. PLANNED FAILOVER This is carried-out from the primary VM. Falover TOPP When selecting the option from the Replication sub-menu, a prerequisite check is carried-out to ensure that the replica can take over in the absence of the primary. And that all the necessary action is then set in motion; including reversing the replication to ensure the original primary is kept up-to-date when it comes back online. You can use these network setings to contral the satc IP address that a vrual D Procemor 1 Wrtual procemor DE Controller o a Hard Drive en started as part of a failover. If his virtual madhire is configured to use a dynanically assigned IP address, you do not need to configure these settings. Regardess of the falover type, ersure that you set these values on both the current primary server and Replica server. The affecied virtual nachine and the server itruns on must use the sene verson ofintegraton services. Py4 TCPPtng DVD Dve O use the foloing P4address schene for he vitual nachine: SSI Contraler Adepter Testhet Hardware Acceleration Falover TCP Advanced Peature Test Falover COM 2 O Use the folowing P6 address sdheme for the vetual nachine: In the VM Settings - under Network Adaptor - the configuration options cater for IPV4 , IPV6 and advanced options and test failover for networks. This flexibility allows an administrator to carry out failover tests regularly - this is best practice! Once tested, right-click the original replica VM and click Replication. Stop Test Failover, and the test VM will be deleted. SUMMARY This has been a short toe-dipping into what is set to be one of the Windows Server 2012 'Big Five' areas of functionality. The ability to carry out failovers and high-availability on a tiny budget is something small businesses have been crying-out for, and can now embrace with zero additional costs. FIREBRAND The fastest way to learn Windows Server 2012 HYPER-V REPLICA HYPER-V REPLICA HOW TO USE HYPER-V REPLICAS IN WINDOWS SERVER 2012 Updated every 5 minutes A replica is just what it says, a copy of a live VM stored on a remote server that is Until now if you wanted to implement High Availability in Virtual Machines (VMs), you would have to invest in cluster technology and some shared storage. updated every five minutes with any changes. Now the arrival of Windows Server 2012 brings with it a perfectly acceptable disaster recovery solution for VMs that is free, built into the product and easy to implement. At any point in time you can failover to the replica and bring the virtualised workload back online. WHAT YOU NEED TO GET STARTED Hyper-V Replicas can be implemented if you have any two physical Windows Server 2012 servers. These must both have the Hyper-V role installed. The location of the servers is not important – they can be in the same rack or on different continents. The only other requirements are: They can be connected by an IP network. They have sufficient storage to host the virtualised workloads to be replicated. The network bandwidth is sufficient to cope with the initial transfers. Replication is very flexible: in or out of domains, and in or out of failover clusters (same cluster or not). It also allows a completely standalone non- domain single replication model – which is the scenario that this infographic deals with. 2 WHERE TO BEGIN HYPER-V ROLE HYPER-V ROLE First install the Hyper-V role on both machines (using Server Manager, or PowerShell 3.0 if you are a command-line guru). INSTALL HYPER-V SERVER 1 SERVER 2 To prepare for replication, set-up an External Replication network using the virtual switch manager. This needs to be done on both servers, with the network name being the same on each. The only other step to prepare for the use of replicas is to have a VM configured on each server. This is because we are going to set both servers up to replicate each other. VIRTUAL SWITCH VRTUAL SWITCH RENAME RENAME VM VM We now have two physical servers acting as Hosts or Parents to a VM, using the same replication network. On Server One, open Hyper-V manager and select the VM you wish to replicate. Right-click on the VM, and select "Enable Replication". Unsurprisingly, this fires-up a wizard. In the Specify Replica Server Box, enter the FQDN of your second server. You will receive an error stating that the server is not ready to host replicas. There is a convenient Configure Server button – click this. ENABLE REPLICATION WIZARD --- X (FQDN) ERROR: CONFIGURE SERVER 1 SERVER SERVER VM VM This opens the Hyper-V Settings window for the second server, with the focus on the Replication configuration section. Check the Enable this Server for Replication box. Depending on your requirements, these settings allow for unencrypted HTTP traffic (port 80) or encrypted HTTPS communication (port 443), It also allows for authentication from a single server, a group or from any server. REPLICATION ENABLED HYPER-V SETTINGS ENABLE REPLICATION SERVER 2 SERVER SERVER VM VM USE KERBEROS AUTHENTICATION ENABLE REPLICATION You then want to check the Use Kerberos (HTTP) box, and the Allow Authentication From Any Server Radio button. Apply these settings. A warning points you to the correct firewall rules to enable. This screenshot shows which rule to set on both servers: REPLICATION ENABLED FIREWALL SERVER SERVER VM VM File Action View Help Windows Firewall with Advance Inbound Rules 3 Inbound Rules Outbound Rules N Connection Security Rules Hper-V- WMI (Arync-In) E Monitoring Actions OA Inbound Rules a New Rule. V Filter by Profile Y Filter by State Group File and Printer Sharing over. All Profile Enabled Action O File and Printer Sharing over SMBDirect (WARP-In) No Allow Hyper-V Hyper-V Hyper-V All Yes Allow OHyper-V- WMI (DCOM-In) OHyper-V- WMI (TCP-In) OHyper-V (MIG-TCP-In) OHyper V (REMOTE OESKTOP_TCP_IN) OHyper-V (RPC) OHyper-V (RPC-EPMAP) OHyper-V Management Clients - WMI (Async-In) OHyper-V Management Clients - WMI (DCOM-In) OHyper-V Management Clients - WM (TCP-In) OHyper-V Replica HTTP Listener (TCP-In) OHyper-V Replica HTTPS Listener (TCP-In) OiscSI Service (TCP-In) OKey Management Service (TCP-In) ONetlogon Service ONP-In) O Netlogon Service Authz (RPC) ONetwork Discovery ALMNR-UDP-In) ONetwork Discovery (NB-Datagram-In) All Yes Allow All Yes Allow All Yes Allow Hyper-V Hyper-V Нуper-V Hyper-V V Filter by Group All Yes Allow View All Yes Allow a Refresh E Export List All Yes Allow Allow Hyper-V Management Clients All Hyper-V Management Clients All Hyper-V Management Clients All Hyper-V Replica HTTP Hyper-V Replica HTTPS ISCI Service Yes Yes Allow 2 Help Yes Allow Selected Items O Enable Rule All No Allow All No Allow All No * Cut Key Management Service Netlogon Service Netlogon Service Network Discovery Network Discovery All No Allow N. e Copy X Delete All No Allow N Al No All No N 2 Help All No Allow Simply accept all the defaults for the rest of the wizard. There are also many areas for configuration, to allow for more flexible use of replication. 3 NOW DO IT ALL OVER AGAIN ---- Replication is now enabled, and the initial replication has started. If this is a small machine and the SERVER SERVER ---- network is quick, go to the second server and see if the replicated VM has appeared. If it has, in the bottom section of Hyper-V manager, you will see there is now a Replication tab. Select the replicated VM and click that Replication tab. You will see it is listed as a replica. INITIAL REPLICATION REPLICATION VM PRIMARY VM REPLICA VM SERVER SERVER INITIAL REPLICATION REPLICATION Repeat the above steps for the VM on Server Two. PRIMARY VM PRIMARY VM REPLICA VM ---- - REPLICA VM ---- SERVER SERVER Provided that you set the Firewall rules correctly, you now have a cross-replicated system, where each server hosts a primary and a replica VM. There is no cluster, no SAN, no shared storage, just replicas as shown below. INITIAL REPLICATION REPLICATION PRIMARY VM PRIMARY VM REPLICA + - REPLICA Hyper-V Manager HV1 Virtual Machines HV2 Name State CPU Usage Replication Health Assigned Memory Uptime I SOL Server HRAPP Sharepoint Server Intranet Off Nomal Running 0% Not Applicable 2098 MB 00.06:49 Snapshots SQL Server HRAPP Replication Type: Replication State: Primary Replication enabled Current Primary Server: HV1.Contoso.com Current Replica Server: HV2.Contoso.oom Replication Health: Nomal Last synchronized at: 12/11/2012 3:39:44 AM Summary Memory Networking Replcation Hyper-V Manager a HV1 I HV2 Virtual Machines CPU Usage Replication Health Name State Assigned Memory Uptime Stat SQL Server HRAPP Of Nomal Windows Server 2012 Sta ff Not Applicable Not Applicable Not Applicable Not Applicable Windows Server 2012 Sta. Off Win7 Clent Win 8 E server2012core I server2012 exch sc03 Sc02 Off Of Of Not Applicable Off Not Applicable Not Applicable Not Applicable Of Of Snapshots SQL Server HRAPP Replication Type: Replica Current Primary Server: HV1.Contoso.com Replication State: Replication enabled Current Replica Server: HV2.Contoso.com Replication Health: Nomal Last synchronized at: 12/11/2012 3:39:44 AM Summary Memory Networking Replcation It's possible to select a time period for replication - and whether it starts manually or automatically. VHDS can be included and excluded from the replication if required. Recovery points can be maintained, and the number of these to be stored is also configurable (between 1 and 15). The transmitted data can be compressed and encrypted if required. All of these settings can be managed in the VM Settings window. FAILOVER SCENARIOS Hyper-V replication allows for several different failover scenarios. From the replica copy itself, these options are available: While from the Primary VM, the below are available: Hypw-V Mnag 33 Hvaer Minager Virtual Machines Vrtual Machines a H7 HaHV Aanignid Menery Cate i zureaint Server inand of Comert. Snapsh Ssarsh bad vitual mactne he re pahot Meve. tec vetual rachire hena nphote Move. Fyrert Rarame Lelete ShareP Raplicaion Plarnid Falovr heCotos.com Mtra e Kepeca tilover VIorosc.co Hep Repiratn Reslication teathe Nom Vina kapkratin Haalth Remore Repitior Repk Tat Faibver. v2 Corda can Heb kang012 32027 AM Pause Rpicaten Vie Repatl RemeveRephation Sum Marery tng Rapleaan Smrary MenyNatvodeng Replctan So there are: TEST FAILOVER A FAILOVER This option ensures that your replica VM starts correctly, and is a viable DR solution. By selecting this, a new VM is created which allows the administrator to confirm its status: This is the one to use when the Primary VM has failed, and you need to get your virtualised workload up and running as soon as possible. H Hyper-V Manager a HV1 FO HV2 Simply select Replication and Failover. The standard warning appears, select your recovery point and click Failover. The replica remains the replica, but is the active VM. The Replication highlights the completed failover, and the warning that the primary is offline. Virtual Machines Name State CPUI ISQL Server HRAPP I Sharepoint Server Intranet Of Running 0% Once the Primary VM is up and running there are several options to return to normal. Though these are outside the scope of an infographic. Microsoft has published an 82-page Understanding and Troubleshooting guide for Hyper-V replicas, which will assist with this and any other unanswered questions. To ensure that your Test Failover doesn't interfere with your production machines, Hyper-V now has the ability to inject a different IP addressing scheme into your Replica. It can also start it using an entirely different network, using the virtual switch. PLANNED FAILOVER This is carried-out from the primary VM. Falover TOPP When selecting the option from the Replication sub-menu, a prerequisite check is carried-out to ensure that the replica can take over in the absence of the primary. And that all the necessary action is then set in motion; including reversing the replication to ensure the original primary is kept up-to-date when it comes back online. You can use these network setings to contral the satc IP address that a vrual D Procemor 1 Wrtual procemor DE Controller o a Hard Drive en started as part of a failover. If his virtual madhire is configured to use a dynanically assigned IP address, you do not need to configure these settings. Regardess of the falover type, ersure that you set these values on both the current primary server and Replica server. The affecied virtual nachine and the server itruns on must use the sene verson ofintegraton services. Py4 TCPPtng DVD Dve O use the foloing P4address schene for he vitual nachine: SSI Contraler Adepter Testhet Hardware Acceleration Falover TCP Advanced Peature Test Falover COM 2 O Use the folowing P6 address sdheme for the vetual nachine: In the VM Settings - under Network Adaptor - the configuration options cater for IPV4 , IPV6 and advanced options and test failover for networks. This flexibility allows an administrator to carry out failover tests regularly - this is best practice! Once tested, right-click the original replica VM and click Replication. Stop Test Failover, and the test VM will be deleted. SUMMARY This has been a short toe-dipping into what is set to be one of the Windows Server 2012 'Big Five' areas of functionality. The ability to carry out failovers and high-availability on a tiny budget is something small businesses have been crying-out for, and can now embrace with zero additional costs. FIREBRAND The fastest way to learn

How to use Hyper-V Replicas in Windows Server 2012

shared by Firebrand on Dec 19
423 views
1 shares
0 comments
In this Windows Server 2012 Infographic we take a look at how to use Hyper-V Replicas. Hyper-V forms one of the five big new features released with Windows Server 2012. The How-to was written by Fireb...

Category

Technology
Did you work on this visual? Claim credit!

Get a Quote

Embed Code

For hosted site:

Click the code to copy

For wordpress.com:

Click the code to copy
Customize size