Disaster Recovery with Hyper-V Replica for Small Business on a Budget
I’ve been writing a number of blogs on Hyper-V Replica. A few questions were posed on the suitability of using HyperV Server in Core mode, or the free Microsoft Hyper-V Server 2012. The core configuration presents some challenges in configuring the system to be used as a Hyper-V Replica target. Configuring such a system will be a great benefit for small businesses on a budget, who may not be able to afford the hardware costs of having another full featured server. A small business could purchase a fairly inexpensive HP Proliant Microserver and install the free Hyper-V Server 2012. A decent configuration would comprise of a RAID 0 or RAID 1 set. One could put in 8GB of RAM, and 4 x 2TB hard drives for a really decent and inexpensive backup, and disaster recovery system.
Installing Hyper-V Server 2012 (free)
Once the hardware is in place, you can easily set up the new machine as follows.
Boot up the server via a bootable USB. Have a look at this blog post for more information on how to create one – http://blog.powerbiz.net.au/fixes/using-diskpart-to-create-a-bootable-usb-of-windows-8/
Then, it is a matter of following the prompts.
At the point of selecting the installation drive, you can use the tools provided to prepare and format all the drives in the system. Otherwise, you will need to brush up on DISKPART to do this after the system has been installed.
After a few reboots and some time, you will be prompted to change the Administrator password.
After logging in, you will be presented with a command prompt and the Server Configuration Menu.
At this point, we are now ready to configure the server for use as a replication target. The purpose of this section is to prepare the server to reach the point where we can Enable Replication via SSL certificate. The steps to set up replication are further detailed in my earlier post – http://blog.powerbiz.net.au/hyperv/how-to-set-up-hyper-v-replica-for-small-businesses/
We are going to assume that you have either configured the local DNS to resolve the FQDN we are about to set up, or that you will use HOSTS files on both the primary server and this server.
There are 3 important tasks to achieve in this preparatory stage. First, we need to configure the server with basic information, including the setup of the Fully Qualified Domain Name (FQDN) server name. Next, we need to configure the server to be able to be managed via Server Manager and the Hyper-V Manager from the primary server, or from a Windows. Finally, we need to add a trusted certificate. 8 PC.
Configuring the Server
Set up the server name. Select Menu item 2 and enter the server name. A restart will be required.
After the restart, go to the command prompt and open REGEDIT. Navigate to HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Paramaters.
Add or change the REG_SZ key named “NV Domain” and put in the DNS suffix to set the server with a FQDN.
Configure the server with a Static IP and DNS settings. (Menu item 8)
- You can also configure Remote Management if you like. (Menu item 4)
Configure the Hyper-V Server for Remote Management
In this scenario, I am going to set this up in a quick and easy way. Some may not full appreciate the fact that the firewall is disabled here. You can perform more granular management of the firewall using the NETSH command if you like.
Disable the Firewall using the command, NETSH AdvFirewall set AllProfiles
Next, you need to download and copy HVREMOTE from http://archive.msdn.microsoft.com/HVRemote. (Yes, there is a warning about this version not supporting Server 2012 and Windows 8). I read up on a blog post from Virtual Machine MVP Steve Jain (http://smudj.wordpress.com/2012/09/26/quick-and-dirty-managing-hyper-v-server-2012-from-windows-8/) and tested this myself. Yes, there are warnings and errors which you can ignore, but it does work. One would assume that the coming version of HVREMOTE will address these later.
Run the following commands.
- On the Replica Server, cscript hvremote.wsf /add:Administrator. If you are uncomfortable with this, you can then create another administrative user for this purpose.
- On the Primary Server, cscript hvremote.wsf /mode:client /anondcom:grant.
- On the Primary Server, cmdkey /add:servername /user:servername\Administrator /pass, where servername is the name of the Replica Server. You will need to type in the password.
Now, you should be able to open up Hyper-V Manager on the Primary Server and connect to the Replica Server.
Installing a SSL Certificate on Hyper-V Server
This part turned out to be the easiest part of all.
Purchase the certificate from your favourite vendor. Once you have your PFX certificate, copy it to the Replica Server. On the replica server, run the command as follows – certutil –importpfx certificatename.pfx, there certificatename is the name of the certificate file.
The certificate will be installed to the Personal Store on the Replica Server.
Once the set up is complete, you can follow the blog post http://blog.powerbiz.net.au/hyperv/how-to-set-up-hyper-v-replica-for-small-businesses/ to configure the replication. The firewall will not need to be configured on the Replica, since we disabled it earlier. If you configured it manually, you will have to remember to enable the Hyper-V Replica HTTPS Listener (TCP-In) rule.
Here are screenshots from my testing.
There you have it! If you have a Hyper-V server and want to implement disaster recovery using an inexpensive server, the best option would be to deploy Microsoft Hyper-V Server 2012 on a HP Proliant Microserver. This will give you an excellent disaster recovery scenario for small businesses on a tight IT budget.
Final Word: Don’t forget about data backups. Hyper-V Replica is not a replacement for good data backups.