VMware is one of the coolest virtualization software. It supports most of the operating systems as guest operating system. Microsoft Server operating systems such as windows 2008 and windows 2008 R2 also can be installed in VMware workstation. Here I’m going to show how you can install FreeNAS server onVMware Workstation with iSCSI disks which can be used for your host and guest operating systems. This method will be used to install and configure MS Windows 2008 or Windows 2008 R2 cluster in VMware workstation.
What is NAS (Network Access Storage)?
Physically NAS is a hardware device with hard drives, and its accessible via network port. In production environment there are famous NAS brands, such as,
These NAS devices support iSCSI, which is required for cluster and high availability setup for servers. But for the testing purpose in VMware we can’t have expensing physical NAS devices to configure cluster ot high availability servers in VMware. So, there is some free open source NAS software where you can use a computer as NAS. These free storage virtualization software make your computer hard disk as network access storage and allow other clients to access the disk directly through network.
I found these two free NAS softwares can be installed in computer and make NAS.
This article explains how you can install FreeNAS on VMware workstation virtual machine to enable iSCSI target disks. Why I avoided Openfiler is, because of we will be using this NAS for Windows 2008 or Windows 2008 R2 server clusters. Openfiler doesn’t support SCSI-3 persistent reservation disks which is required for Windows 2008 and windows 2008 R2 server clusters but FreeNAS supports SCSI-3 persistent reservation disks.
How to Install FreeNAS Server on VMware workstation?
1) Download the stable FreeNAS live CD ISO file here. It’s just 75MB ISO file.
2) Create a virtual machine in VMware workstation, with following configuration.
Guest Operating System – Other – FreeBSD
Maximum disk size – 2GB
Maximum disk size – 2GB
Memory – 2GB
Processor – 1 or 2 ( it doesn’t matter)
Network Adapter – Which ever work with your client computers.
Network Adapter – Which ever work with your client computers.
3) Select the downloaded FreeNAS ISO file under ISO image file in CD/DVD settings, and boot the virtual machine with CD drive as first boot device.
4) Boot the system with first option ( default)
5) If the virtual machine settings and downloaded file is correct, then you next screen will the below one. That’s it, NAS operating is loaded and ready to use.
You can see the network address on NAS which will be given by VMware DHCP. Since this is Live CD version, its running from CD and RAM only. When you boot the NAS operating next time, it will disappear. So we have install it permanently on the virtual machine hard disk. It can be installed on external devices also, including flash device and USB drives.
6) To install FreeNAS permanently on hard drive, type number 9 and press enter in above screen.
7) Select the first option in first screen and press OK.
8) Press OK for warning/instruction message.
9) Installation media will be your virtual machine CD drive where we mounted the ISO file. Press OK in the next screen.
10) Select the 2GB hard disk we created during the virtual machine setup. Once we installed FreeNAS on this hard disk, then it cannot be used for create volumes or share data. So how to create disks for cluster or as iSCSI targets. Do not worry; we will add hard disks later to virtual machine in live.
11) Confirmation message will be shown as below after the installation succeeded.
12) Shutdown the system by pressing number 8. Then un mount the installation ISO file under CD/DVD drive, then start the FreeNAS virtual machine.
13) Now you can’t see the number 9 option. Type number 2 and press enter to change the IP address of FreeNAS network virtualization software.
14) Select ‘No’ for DHCP option, give IPv4 address, you can select the Subnet mask by typing 24 or 16 or 8 in the next screen. Gateway, DNS and IPv6 are optional setup as per your requirements.
15) One network settings confirmation message will be shown as below with accessible address.
Installation of NAS on VMware workstation and network setups is done. Now, interesting part; configuring disks, volumes and LUNs in your Network Access Storage (NAS).
16) Access the above address in internet explorer from other client computer. You will be getting login screen for FreeNAS.
User Name is – admin
Password is – freenas
FreeNAS user name and password can be reset in console setup by selecting number 3.
17) Welcome screen will give the information of NAS. Still no disks configured in your NAS.
18) Let’s add the disks to FreeNAS now. Just for example we will add two disks. One with 512MB for quorum disk and other one 10GB for data share.
19) Add the above hard disks to FreeBSD virtual machine where we installed FreeNAS. You do not need to shutdown the FreeNAS. It can be added when it’s working. I’m assuming you know how to add additional hard disks to a virtual machine is VMware. (Select SCSI disk type, better select ‘Allocate disk space now’ to improve the performance.)
20) To add a disk in NAS, Click on Disks on the menu and select management. Click + sign at right side in next screen.
21) Select the newly added disk to virtual machine from drop down box. Lets add our quorum disk 512MB.
You can give any description also for your reference. Since we are preparing NAS on VMware workstation as iSCSI target for Windows 2008 server cluster, select ZFS Storage pool device in file system as shown above. Press Add.
22) Every time after any changes in FreeNAS you have press Apply changes button. Press the button in next screen.
23) Once the disk added successfully, the below screen can be seen.
24) Go to Disks in main menu and select ZFS.
25) Click on Virtual devices in next screen menu and Press + sign at right side. Give a name, leave the type as Stripe, and select the disk under devices. Then apply changes.
26) Click on Management tab next to Virtual Device in same screen. Give a name; leave others options blanks (you can add description). Press Add and Apply.
27) Now go to iSCSI Targets in Services (main menu)
28) Enable the check box at right side and press save and restart button. It will start the iSCSI service in your FreeNAS virtual machine.
29) Click on portals tab. It will pick up your FreeNAS IP address with 3260 port number. Do not change anything here. Just press add and apply changes buttons.
(I’m writing this article from two computers, so IP address of my FreeNAS is different than installation and configuration, ignore it)
30) Now click on initiators tab and leave the all settings as it is and press add, apply changes.
31) No go back to Targets tab and press + at right side under Extend. Press browse button as shown below.
32) It will bring the pool you created as a directory. Click on it and press OK button at top right side.
33) You have to type a name for the extending disk. In this example I have typed ‘ quorum’ after the selection. It better to give slightly lesser the actual size. That’s why I have given 500 MB.
Press add and apply changes.
34) To add the iSCSI target and LUNs in NAS, click on + mark at the right side under target in targets. Give a name for target, make sure Read/Write is selected under flags. Under LUNs, select the extended disk you created in earlier step. Leave the other settings and press add, apply changes.
35) iSCSI target in your NAS VMware workstation settings will be appeared as below if all setup are correct.
Other clients including Windows 2008 server and windows 2008 R2 servers looking for iSCSI disks will be finding the disks in the name mentioned above.
Repeat the same steps to add disks to FreeNAS and configure NAS iSCSI targets in VMware workstation.
I will be updating soon about how to do windows 2008 R2 cluster in VMware workstation using this iSCSI targets.