Archive

Posts Tagged ‘Hyper-V Replica’

Hyper-V DR Solution

July 23, 2012 1 comment

DR is a key component of the Business Continuity Plan.

When considering DR options, virtualization is a game changer. Virtualization makes DR affordable to companies that could not afford it before. But in order to understand how DR can be optimized in a virtualized environment, it is important to understand the technical aspects, like replication functionality.

Remember : even though high availability can be achieved with clustering, this will not safeguard your businessfrom the entire data center or hosting facility going down (in case of a fire or a flood, for example). In this case you need a DR solution geographically dispersed.

Last week I started writing about Hyper-V DR solution in Windows 2012:

https://virtualisationandmanagement.wordpress.com/2012/07/19/windows-2012-hyper-v-replica-deployment-scenarios-functionality-and-step-by-step-by-using-ssl-certificate-part-i/

Keep watching this blog for the part 2…

Also, there is a good DR solution document for Windows 2008R2 here :

http://download.microsoft.com/download/3/6/1/36117F2E-499F-42D7-9ADD-A838E9E0C197/SiteRecoveryWhitepaper_final_120309.pdf

and here : Hyper-V in the Real World –Multi-Site DR with the System Center Suite of Products http://www.techdays.ca/contentlibrary/video/en/2011-hyper-v-in-the-real-world-–multi-site-dr-with-the-system-center-suite-of-products.aspx

 

Advertisements

Windows 2012 Hyper-V Replica : Deployment Scenarios, Functionality and Step by Step by using SSL Certificate Part I

July 19, 2012 12 comments

With Windows 2012 around the corner ( first week of august 2012 ), you probably started planning the deployment already.

I am starting a series of blog posting with step by steps. The first one is about Hyper-V Replica, a real nice feature.

Hyper-V Replica. what is ?

Hyper-V replica is a new feature of Windows 2012 that enables you to replicate any Virtual Machine (yes, copy the entire VM: VHD/VHDX and configuration ) from one Hyper-V Server to another, without storage or any special hardware. You only need 2 servers running Windows 2012 Hyper-V.

You can replicate the content over the LAN or WAN (without compromising the link) by using HTTP or HTTPS protocols using SSL certificates inclusive.

Once you enable the Hyper-V Replica on the VM, the source host starts to maintain a HRL (Hyper-V Replica Log file) for the VHDs.  Every 1 write by the VM = 1 write to VHD and 1 write to the HRL.  Depending on bandwidth availability, the logfiles are sent to the target host every 5 minutes(setting not configurable).  On the target the Hyper-V Replica mechanism run asynchronous, processing the log file in reverse order, allowing  it only to store the latest writes. It replicates only the changes.

Note: After 5 minutes, if the replay hasn’t happened then you get an alert.  The replica log file replication will take up to 30min to complete before going into a failed state where your intervention will be required to look at the issue and fix it.

The configurations at each site do not have to be the same with respect to server or storage hardware. Hyper-V Replica provides  the option to restore virtualized workloads to a point in time depending on the Recovery History selections for the virtual machine.

Really easy to deploy and use.

Deployment Scenarios:

–         Between 2 sites (DataCenter replication to small offices)

–         Cross premises DR solution

Cluster

Hyper-V Replica works with clusters.  In fact you can do the following replications:

  • Standalone host to cluster
  • Cluster to cluster
  • Cluster to standalone host

NOTE : Hyper-V Replica is NOT an alternative to clustering. It is not intended for High Availability purposes.

Functional description

•    Replication Engine:  Manages the replication configuration details and handles initial replication, delta replication, failover, and test-failover operations. It also tracks virtual machine and storage mobility events and takes appropriate actions as needed (i.e. it pauses replication events until migration events complete and then resumes where they left off).

•    Change Tracking:  Provides a virtual machine level change tracking mechanism on the primary server by keeping track of the write-operations, which happen in the virtual machine.

•    Network Module: The Networking Module provides a secure and efficient compressed network channel to transfer virtual machine replicas between Primary and Replica site.

•    Hyper-V Replica Broker role:  The Hyper-V Replica Broker role is configured in a Windows Server 2012 Failover Cluster. This functionality supports seamless replication even in the event of a migration of a replica virtual machine from one cluster node to another.

•    Management Experience:   Hyper-V Manager UI; Failover Cluster Manager UI; PowerShell scripting; Hyper-V Replica APIs.

Step by Step – Part I

On the source Hyper-V Server

1. Open the Hyper-V Server Manager and click on the Hyper-V server. Then in the right pane, click on Hyper-V settings

2. On the Hyper-V settings page, click on Replication Configuration on the left pane

3. On the Replication Configuration, click on Enable this computer as a Replica Server

4.You have now the choose how the replication will occur : by using HTc.TP (port 80) or HTTPS (port 443, with encryption).

HTTPS: If you select HTTPS, I recommend you to buy an SSL Certificate from a trusted Certification Authority (CA), then :

a. Create an INF file for an Wildcard certificate request. Use the following example and replace the subject with the hyper-v servers domain name. Save the content in a text file as cert.inf for example.

  [Version]
Signature=”$Windows NT$”
[NewRequest]
Subject = “CN=*.YOURDOMAIN.local”
Exportable = TRUE                   ; Private key is exportable
KeyLength = 2048                    ; Common key sizes: 512, 1024, 2048, 4096, 8192, 16384
KeySpec = 1                         ; AT_KEYEXCHANGE
KeyUsage = 0xA0                     ; Digital Signature, Key Encipherment
MachineKeySet = True                ; The key belongs to the local computer account
ProviderName = “Microsoft RSA SChannel Cryptographic Provider”
ProviderType = 12
RequestType = CMC[EnhancedKeyUsageExtension]
OID=1.3.6.1.5.5.7.3.1 ;Server Authentication
OID=1.3.6.1.5.5.7.3.2 ;Client Authentication

b. Create a request. Open the command prompt with Administrative rights  ( run as Administrator ) and type the following:

certreq –new CERT.inf  CERT.req

c. Create the CSR to submit the certificate request to an external CA

certutil -encode CERT.req  CERT.csr

d.Upload the ENTIRE content of the text file CERT.csr into the external CA webpage. (could be any external trusted CA)

e.After the certificate is issued and you received the email with the certificate, open the command prompt and type the following commands to import and store the certificate on all Hyper-V servers ( source and target )

certreq -accept CERT.cer

certutil –store my

HTTP: Select : Use Kerberos HTTP

5. Configure the Authorization and storage.  This includes designating a specific location to store replica virtual machine files if the default location is not to be used. Should you not desire to allow all Primary servers to be serviced, there is an option to allow only specific servers (Primary servers) to send replication requests.

If you want to allow all servers within the domain, a wildcard character can be used (e.g. *.yourdomain.local). When using a wildcard, only one storage location can be specified.  If individual server entries are used, different storage locations for replica files can be configured.  Complete all entries for the Primary Server, Storage Locations, and Security Tag information.

6.  Click Apply or OK when finished.

Next article : configuring the target server

Hyper-V Replica Setup (Step by Step)

October 12, 2011 Leave a comment

Let’s start by configuring the Hyper-V Replica on the Recovery Server

( Quick note: Hyper-V Replica it is only possible on Windows 8 Server version. It does not exist on Desktop Version )

1. Open the Hyper-V Manager, under Replication Configuration, Select Enable this computer as replica server2. Specify Authentication mode :Integrated Windows(Kerberos) or Certificate
3. Configure Authorization list :
     – Type the name of the primary server
     – Specify the location to be used as primary VM Configuration (can be local or an smb share)

4. Configure the Firewall by adding the inbound rule for the used ports
5. Enable Remote WMI

Now let’s configure the Primary Server

1. Open the Hyper-V Manager and Select the VM to replicate and click on Settings. Under Management, Replication

 
2. Specify the Recovery Server Name to replicate to ( e.g. hypervreplica.mylab.local)
3. Specify the Autentication mode ( selected when you configured the Recover Server )
4. Specify if Compression will be enabled or disabled
5. Select the VHD’s that will be excluded of the process
6. Select the Replication Parameters:
– Recovery ( in hours )
– Application Consistent frequency


7. Select the Initial Replication Mode:
– Over Network : once sucessfully connection established, the primary server will sends the VHD files to the Recovery Server. ( can be scheduled )
– Off the Network : ( my recomendation ) The Hyper-V Replica will copy the VHD’s to a specified location which can be an external Hard Disk. You can after that copy the files back to the storage location specified during the Recovery Server Setup
– Using Backup

That’s it. The VM will then be created (powered off) on the recovery server once finished and after that the Primary Server, based on replication frequency will send the changes to the Recovery Server