This will be a series of posts in which I describe how I have put together my Home Lab ESXi server.
A Storage Virtual Machine – NexentaStor Community Edition
NexentaStor is a software defined storage solution. Instead of using a separate storage server, I will be installing NexentaStor as a virtual machine in the ESXi host. The Dell H200 SAS HBA is passed through directly to the VM, giving it direct access to the drives attached. From here, Nexenta can create a ZFS file system, providing the benefits of a hardware raid solution but with more flexibility. On top of this, an NFS share is created which the ESXi host will connect to, creating a Datastore. The community edition is free, however it does have some limitations, such as a maximum storage capacity of 18TB. I’m not sure anyone would ever need 18TB for a home lab, so this isn’t a problem.
NexentaStor documentation and download can be obtained HERE.
Note: Be aware that for this to work, the CPU must support Intel VT-d or AMD IOMMU.
In the vSphere client, go to Configuration – Advanced Settings, then click edit. Next, select the SAS HBA card and click OK. You will most likely need to reboot.
After restarting the SAS HBA card should be displayed in the list as shown below:
Create the VM
Now create a VM for NexentaStor. Choose Oracle Solaris 11 (64-bit) as the Operating System. The VM will require a minimum of 8GB of RAM.
Once the VM is created, open the hardware properties and click Add. Select PCI device and choose the SAS HBA card. The card is now directly attached to this VM. Two NICs are added, one connected to the physical (management) network, the other to the internal storage network.
The storage network consists of creating a vSwitch without a physical adapter assigned. A VM Network port group and VMkernel port are added to this vSwitch.
The console screen in Nexenta will display the IP address to connect to the web interface. If you don’t have DHCP, the IP address can be configured here. The first login will present a wizard where you configure the IP address for both the management and storage network adapters.
Configure NexentaStor ZFS volume and NFS share
Login to the web interface, then go to Data Management – Data Sets. Here we create the ZFS volume. In the screenshot below, I’ve created the equivalent of a RAID 10 setup.
Next, go to Data Management – Shares. Under NFS Server click configure. Enable the service and set the client and server version to 3 as ESXi 5.5 does not work with version 4.
Now we can create the share. I have modified some of the default settings. I set block size to 8K and disable sync. Disabling sync will improve speed but be warned, data corrupt will occur if power is lost! Finally, enable NFS for this share by ticking the box as show below.
Create the Datastore
We can now create the Datastore in ESXi. Select Network File System as the storage type, then enter the server IP address and folder path.
You should also enable the VM to automatically startup and shutdown with the host. Other VMs won’t be available until this VM starts and all VMs should be shutdown before this one.
We’re now ready to create Virtual Machines!
Note: For info on installing the VMware Tools inside Nexenta, click here.