If you’ve got a some hardware lying around for your lab, Windows Server 2012 may be a great solution for a home storage device. You can now do both block (iSCSI) and NAS (NFS) on the same server, as well as having an OS to install some management apps on it. In my lab, I use this management server to run Veeam for my backups, PRTG network monitor for bandwidth tracking, as well as using this server for both iSCSI targets and NFS mounts.
Installation
Installing the necessary components on the server is very simple.
Go to the Server Manager and choose the “Add roles and features” link.
Choose a role-based or feature-based installation.
Select your localhost if your installing from the same machine, or use the remote host option if installing from a group member.
Scroll down the list of roles and add:
- iSCSI Target Server
- iSCSI Target Storage Provider (VDS and VSS hardware)
- Server for NFS
Confirm your selections and click install
You’ve got the services installed now. The next steps are to setup an iSCSI target and and an NFS Mount. Obviously both of these are not necessary, but if you can setup both, why not do both.
NFS Setup
NFS is pretty easy to get setup for a VMware ESXi lab. Create a folder in the Windows file system; this is where your NFS mount point will be set. Right click on that folder and choose properties. Here you’ll see a tab called “NFS Sharing”. You can click on the “Manage NFS Sharing…” button to setup the properties.
Click the box to “Share this folder”. Please note that this does not share the folder for Server Message Block (SMB) like you may be used to doing for standard Windows File Shares. This is only the NFS Sharing setup. If you want, you can share this as a Windows share as well but I recommend keeping your NFS shares separate to avoid accidentally deleting files used by your ESXi lab.
Click the “Permissions” button to allow readwrite access to the NFS Share. Change the “Type of access” box to “Read-Write” and be sure to tick the check box to “Allow Root Access”
DONE! You can now setup your vSphere environment to access this NFS mount.
iSCSI Setup
To setup the iSCSI Targets, go to the “File and Storage Services” section of the Server Manager. Click on the Hyperlink to create an iSCSI virtual disk.
Choose the server and physical disk location that you’d like to create a virtual disk on. This virtual disk will be the iSCSI target so be sure to place it on the right sized and speed disk you’d like to use. In my lab i’ve got a pair of mounts, one on an SSD and one on a traditional spinning disk.
Name the virtual disk. This will end up being the file name.
Give the virtual disk a size. Obviously you’re restricted to the size of the physical disk that it’s on.
Now you need to create an iSCSI Target. Click the “New Target” section if it’s your first time running through this setup.
Give the target a descriptive name.
Now we need to list the initiators that will have access to this target. We don’t want to allow all machines to access this iSCSI disk, so we’ll limit it to our ESXi host initiators. Click the “Add” button.
Add the iSCSI initiators at the bottom. If you’ve run through this before, you can look at the initiators that are cached in the middle section.
When you’re done you’ll see all of the initiators that have access. Click “Next” to continue on.
If you are interested in setting up additional security, you can enable CHAP andor Reverse CHAP. My lab is super secure so I’ve left it disabled. :)
Confirm your selections and click “Create”.
The creation process will complete.
DONE! Now you have an iSCSI Target on the Windows 2012 Server. Add this target to your vSphere environment and you’ve now got block storage for your hosts.





















