James Thew - Fotolia
Once you are finished with the early stages of setting up a virtual test lab geared toward nested virtualization, you have to deal with the underlying storage infrastructure. It's important to remember that it's just a test lab and there will be single points of failure and perhaps better ways to do things.
Storage makes up the final part of the setup after finishing the virtualized hardware and software setup. In my virtual test lab, my infrastructure includes a small amount of ISCSI-based storage for shared virtual machine (VM) use. This allows for experimentation with items that require shared storage such as DRS/HA and to get to grips with technology. Being able to break it without damaging the important stuff is useful. There are many proprietary and open source distributions that support usage as an ISCSI target. I prefer to use Openfiler; it works out the box with little configuration.
Working with Openfiler
To set up Openfiler to achieve maximum performance, I placed it on the real physical host rather than virtualized host where the rest of the VMs are situated. Accidentally turning off your virtualized storage at the wrong time means broken VMs.
Next, set up a virtualized Openfiler system by creating a VM with two disks. The first one should have approximately 16 GB for OS and the second one should be a larger one for your VMs that need shared storage. Be sure to size appropriately.
I would recommend giving the machine 3 GB of RAM as a minimum -- more if you can spare it -- and a NIC. Install the Openfiler onto the first disk and the second disk will be used for holding all the machines that need to utilize shared storage. I recommend making the second disk as large as you can spare. Starting with 150 GB would be optimal. Additionally, a small amount of the disk will be split off to provide a chunk of storage to hold ISO installation media to make your life a little easier.
Installing Openfiler is easy enough. The installation is similar in nature to most standard Linux distributions. You are also well advised to use a static IP address and a DNS.
After installing Openfiler, log in to the VM console and install VMware Tools in the same manner as you would with any other Linux distribution. Once completed, open the Openfiler management Web page as noted on your console screen using the default username and password of Openfiler /password.
Go to the system tab and scroll down to Network Access Configuration and create a new entry/mask for your network and select Share from the Type drop-down. This is a requirement for the ISCSI infrastructure to be started.
Next, enable the ISCSI Initiator service by going to the services tab, then enable the ISCSI Target service and start the service by clicking on the Start hyperlink. Once the service is running, go to the volumes tab and click the hyperlink to create a physical volume. You should see two volumes, SDA -- which contains the Openfiler system contents -- and SDB which is our disk to use for data. Check to make sure it shows 0 partitions before you create the partition as a sanity check.
Click the link to \dev\sdb and scroll down to Create Partition. Leave the mode and partition type and size as is -- assuming we want to allocate the entire disk -- and then click Create. Next, click Volume Groups and enter an appropriate name in the Volume group name field and tick the volume to add. Select the button and you should see it created.
Go to Add Volume on the right and browse down to the last portion of the page Create a volume in and give it a name and description. Push the slider right to set the amount for ISO storage. From the File system/Volume Type, select Block and then select Create. Repeat the above add volume process to add ISO storage.
Go to ISCSI Targets (right-hand sidebar) and then Target configuration. Add a new target by clicking Add. On the LUN mapping tab, select the option to map LUN to target.
One that is done you can log in and create the ISCSI storage. After the storage is created you still need to present it to the cluster.
Configuring the vSphere portion
On the vSphere client side, add a software adapter by going to Configuration>Storage>Add>Enable ISCSI Software adapter. You should see the ISCSI adapter. Click Configure and add in the IP address of your ISCSI target into the Dynamic Discovery tab. You will be prompted to rescan. Once complete, click Add storage, select Disk/LUN for storage types and you should see the storage to be presented.
You will need to click on properties and add the address you gave the ISCSI server. Don't forget to do this step for all of your fake hosts. Then pick one host in the cluster, perform a rescan and then repeat the scan at the cluster level. Once this is done you should see the new storage across all cluster members. Use this storage for your VMs that need to have shared storage.
Adding an external server
One change I have made to my setup since the first part of this series is that I have now included an external NFS server based on CentOS. This can easily be accomplished with a bit of reading up on any good Linux admin guide.
In summary, nested virtualization is a great option for experimentation and the great thing is that you can add as much virtual hardware as you need. Should the need arise, you can add additional virtual hosts.
Use a nested hypervisor to set up a home vSphere lab
Tips for selecting hardware and software for your home virtualization lab
Would your IT staff use a virtual training lab?