Setup Microsoft Windows 2019/2016/2012 R2 Failover Cluster in VMware Workstation/VirtualBox

Note: I have added the latest Windows server versions in the title, but the below demonstration had been done with Windows 2008 R2 server version in VMware workstation. The key point is, the below steps are applicable for Windows 2012/2016 and even the latest Windows 2019 server cluster setup. Also, if you are a VirtualBox or Hyper-V on Windows 10 user, you can follow the same steps. Technically, you do not need many settings on the virtualization software to make this setup work. Mainly the VMs you are creating for this purpose should communicate among them to make the failover cluster work. They should be on the same virtual network.

You need to understand the requirements and configuration, then you can replicate the same setup either on VMware, VirtualBox or Hyper-V and with any version of Windows Server Operating Systems. You need to have a good physical computer to host these latest server virtual machines with minimal hardware requirements. Also, the latest FreeNAS version supports the iSCSI that can work with the Microsoft Failover cluster.

Here you can see how to setup Microsoft Windows 2008 R2 failover cluster in VMware Workstation. This article contains step by step method to install and setup Microsoft Windows 2008 R2 failover cluster with FreeNAS iSCSI disks in VMware workstation on a single physical computer.

Windows Cluster

Cluster disks are important to set up a failover cluster. The two (or more) servers should be able to see the storage which should run on a centralized place. In a production environment, it could be a SAN or NAS. In this example, we will use iSCSI disks with FreeNAS.

Windows Server failover clusters require SCSI-3 persistent reservation target disks as their cluster disks. Now the question is how to setup SCSI-3 persistent reservation cluster disks in VMware workstation or Oracle VirtualBox? Those steps are mentioned below.

Required Software

a) VMware workstation/VirtualBox/Hyper-V

b) Windows 2012/2016/2019 Operating System (or the latest Windows servers) as a virtual machine

c) FreeNAS as VM

Read more about Microsoft Windows 2008 R2 Failover cluster in the normal environment

Prerequisites setup

a) Install and configure Windows 2008 R2 (or 2012/2016/2019) Operating System in VMware Workstation (Minimum 3 servers are required. One will be the domain controller and other two will be cluster nodes). Do the same steps if you are doing it on VirtualBox.

b) Setup a domain (Active Directory) on a server and join other two servers with the domain. Use the domain administrator to log in to all servers. In this example, the domain name is sysprobs.net and cluster server names are vm-clus1 and vm-clus2. I assume you already have experience in setting up a domain controller in a virtual environment.

c) Install failover cluster feature on both Windows server VMs that we are going to set up a failover cluster in VMware workstation.

d) Add a 2nd network card to both cluster servers, it can be done in VMWare virtual machine settings. Give two separate IP addresses (not in the same range of other network cards), so both servers can communicate through this network also. This network will be the ‘heartbeat’ network for both servers. Make sure that all network cards/connections are identical in both servers. (in this example, heartbeat network named as ‘internal’ on both servers)

When you do the setup in VirtualBox, add second network adapter in VirtualBox settings for both cluster servers. This adapter will be configured for ‘Heartbeat network’.

Set the network type to ‘internal’ and assign separate IP address range than other networks. Make sure both nodes are communicating through this network also.

e) Create cluster disks in FreeNAS virtual machine. Read this guide about installing and configuring FreeNAS iSCSI disks in a virtual environment.

My setup is like below.
Qurom disk – 512MB,
Storage disk1- 2GB,
Storage disk 2- 2GB,
Storage disk 3 – 2GB,
and Backup disk 4GB)

FreeNAS disks for Windows cluster

Configure Windows R2 Failover Cluster in VMware workstation/VirtualBox

1) In the first cluster server, Open iSCSI initiator under administrative tools.  Click Yes, if it asks to start the iSCSI service.

2) Give FreeNAS VM IP address in Target and press Quick Connect. Let’s assume that the all 3 Windows servers (1 DC and 2 cluster nodes) and FreeNAS virtual machines can communicate via the network (It is one of the critical requirement).

It will detect your target disks. Press Done.

Discovered targets

3) The disks will be shown as Inactive. Click on each target and press connect until all targets show as connected.

Quick connect iscsi disks

4) Go to Volumes and Devices tab, and press the Auto-Configure button. All targets will be displayed as disks under this tab.

Volume and devices for MS cluster in VMware

5) All iSCSI disks will be listed under disk management. Right Click on each disk, make them online and Initialize.

Listed disks in disk management

6) Create simple volumes by right-clicking and selecting on each unallocated space. Format the drives and give a name for each disk.

7) Once all disks are formatted and named successfully, right-click on each drive and make them offline again like below.

Formatted disks

8) Just to remind you, we have done these steps in one server only. Now go to second cluster server. Start iSCSI services and detect all target disks as we did in the first server. But you do not need to format and give the name the disks in the second server. This step is to make the connectivity from the 2nd server to iSCSI disks.

9) Now, start failover cluster manager in features under the server manager. Before creating the cluster, better to validate cluster configuration, especially the tricky part of SCSI-3 persistent reservation iSCSI disks which we configured with FreeNAS. All Windows servers have a similar interface to do the setup, hence it will not confuse you here.

10) Click on Validate a configuration under management.

Cluster validation in VirtualBox

11) Click Next and browse the cluster servers from the directory or enter full name of servers.

Browsing servers

12) Run all tests and wait for the results. All main tests passed in my setup. We are ready to create Windows 2008 or R2 cluster in VMware workstation. The interface and steps almost remain the same on recent Windows server versions such as 2016 and 2019.

Validate Progress

13) Final validation report will look like below.

Final cluster validation report

Create the cluster now. Other steps are very easy. I don’t need to explain here since the cluster validation already succeeded.

14) I gave the cluster name as ‘ vm-cluster’ and separate IP address 192.5.2.250 for the cluster.

Cluster name

15) That’s it. We have successfully created a Windows 22019/2016/2012 R2 failover cluster in VMware workstation (or VirtualBox) using FreeNAS.

Created Windows cluster in VMware/VirtualBox

Unfortunately, it took one of my 2GB disks as a quorum disk. But no problem, we can change it later. That option is available in Windows cluster manager.

Now we have a working Windows failover cluster on VMware workstation which is running on our single physical computer. For testing purpose, you can install file-sharing or IIS server on the cluster and check the failover of the service. It will work well. It is the ideal way for testing and learning purpose if you are preparing for any Microsoft certifications.

Feel free to share your comments and problems with this. If you are satisfied with this post and blog, please share with others.

If any of the above solutions did not fix the Windows PC issues, we recommend downloading the below PC repair tool to identify and solve any PC Issues.

Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.

31 thoughts on “Setup Microsoft Windows 2019/2016/2012 R2 Failover Cluster in VMware Workstation/VirtualBox”

  1. Yes, it can be done in VirtualBox if you install Windows 2008 R2 and FreeNAS, and setup network among guest machines properly. Then Windows 2008 R2 cluster will work fine in Sun VirtualBox.

  2. Hi Dinesh,

    Great article.

    Thought I’d share my experience of using your technique (incl. FreeNAS) and confirm that I have this working using VMware Server v2.0.2 with a Win2008 Ent R2 host and two Win2008 Ent R2 guests, the guests sitting in a virtual domain with another Win2008 Ent R2 guest as Domain Controller.

    Only one issue I came up against. When creating volume names in FreeNAS, beware of using characters such as underscore ‘_’, as these are invalid characters for the Windows iSCSI initiator. Apart from that, the rest worked straight off.

    Again, thanks for sharing your work.

    HTH

    Rgds

    virtualDBA

  3. On my validation of the cluster I receive the following error on List Potential Cluster Disks section:

    Failed to access sector 11 on disk with identifier 6c60acfd from node xxxxx.

    Do you know where could be the problem?

    • Sorry, strange problem. I think may be some issues with iSCSI creation in FreeNAS. Try to give disk name without space and any characters in FreeNAS. Also while adding disk to FreeNAS VMware virtual machine, allocate the space completely.

  4. Just quick note to thank you for your hard word creating this post. I found it to be perfectly detailed and everything I need to know for my first setup seems to be included. I write my own blog so I know how much work goes into being accurate and detailed. So thanks again for such a good job and helping me on me first Windows Clustering project.

    I have one question, How do you import a program like MS Exchange 2007 from one server to another? Do you have to completely reinstall Exchange on the second and third servers in your Cluster? Do you have any references on how to do that? Please advise…

    Dale Allen

    • @Dale Allen,
      Thanks for your comment.
      I’m not that great in Exchange 2007, but we are using on our company and have some experience.
      If you are going to move your existing Exchange 2007 to cluster server, then you have to re install the program. Then you can import the information storage from old server to new cluster server.
      Thats the only one way I know.

      Let me know if this is useful, also correct me if I’m wrong.

      Good luck.

  5. I have noticed having set up the iscsi facility in two machines on vmware that the disks do not update until after a reboot. am i doing something wrong or i have missunderstood something in this article

  6. Hey,

    nice article(s).

    I’ve successfully set up this solution (two R2, one FreeNAS) and is working ok.

    I have one question though.

    Why do we need a domain controller server? (the third machine).

    If the nodes are not in the same domain (but in the same group) will it fail the solution?

    I am trying to understand and find a definitve argument for this.

    Thanks,
    Ducoci.

  7. I may sound silly, but I was able to install the cluster without the heartbeat network, is this something possible in win2k8r2 or it is mandatory to have a heartbeat network.

  8. Manju – I too have been able to setup the cluster without a heartbeat network interface, however, the cluster validation report has reported this as a “warning” because I only have 1 network card per node.
    It says “It is possible that this network path is a single point of failure for communication within the cluster. Please verify that this single path is highly available or consider adding additional networks to the cluster.”

    Dinesh – thank you very much for posting this, it’s been a great help.

  9. Very Nice article, perhaps I would name it as a SOP – Std. Operating Procedure.

    Thanks, much appreciated !

  10. Dear
    In step 8 when connect clus2 server to starwind server, iSCSI INITIATOR show “server unavailable” message and don’t connected to starwind. plz help me?

  11. hi Dinesh
    Thanks for your great article I Have problem joining two cluster,
    validation process has no error.

    An error occurred while creating the cluster.
    An error occurred creating cluster ‘Vlab2’.
    This operation returned because the timeout period expired

  12. Thank you so much creating this wonderful article, I will certainly try this cluster layout using vmware.

  13. Very amazing details which ever seen .. I like your style of posting dear .. Microsoft windows 2008 related questions and answers will motivate for getting more knowledge .. keep Posting with good articles

  14. Hi,

    I just tried out free NAS configuration and 2008 cluster build and its working fine, thank you for your post, its really awesome

  15. Great post, Just set this up using Virtual Box and it’s working a treat. Needed to test a 2008 cluster migration to a new domain and having a virtual environment setup has saved me a lot of grief.

    Cheers!

  16. I have worked this using FreeNAS 8 as well, and works wonderful, but I do have a question for the masses.

    I have run into the same situation where instead of using the 500mb quorum drive for cluster configuration it stole one of the 2GB drives. Surfing through all the options I have not found the method of adjusting the drives for the clustering configurations.

    The only way I have found around this is to connect to only the quorum drive first, create the cluster without an storage drives. Afterwards, connecting to each of the remote drives and then added them as storage to the cluster. Just seeing if this is the only way to accomplish this or is there a proper work around internally within the cluster management console.

  17. Dear All

    At last all trouble I have been facing are no longer. This article I can say is a Heaven sent. One quick question I have. Will me required to have Exchange server 2007 Enterprise to be able to set up Cluster environment for exchange at this stage. As of now I have exchange 2007 Standard. Will it support this cluster mode I’m envisioning.

    Thanks

Comments are closed.