After long absence I’m starting my work on this blog and other projects. For the first post I’d try to summarize the step needed to install and configure iSCSI or NFS server by using “Microsoft Windows Server 2012” for home lab based on “VMware ESXi 5.x” but for step-by-step visual guide “Windows Server 2012 – File and Storage Services” page can be check. 😉
Virtual/Physical server with Windows Server 2012
Host/vHost with VMware ESXi 5.x
Server should have some free space to be able to present them as NFS or iSCSI storage.
Config #1 – iSCSI implementation
First of all make sure “VMware ESXi” hosts can use and connect to iSCSI storage, for more information on “Basic software iSCSI setup”, KB1008083 can be checked.
On the server side, “iSCSI Target Server” role should be install from “Server ManagerManageAdd Roles and FeaturesFile And Storage ServicesFile and iSCSI Services” and then configured.
After installation of role completed successfully, open the “Server Manager” and select “File and Storage Services”; now by selecting “iSCSI” option, server can create new virtual disk and present them (as LUN) to other server (initiators) or simply edit/delete existing iSCSI virtual disks and targets.
For creating new iSCSI virtual disk and target, right click on free space area of “iSCSI VIRTUAL DISKS” and select “New iSCSI Virtual Disk”; in the first step of wizard window select one drive with sufficient disk space and press “Next”.
In “iSCSI Virtual Disk Name” type file name for new virtual disk and for future use and simplicity enter short description for it and press “Next”. for example:
Description: iSCSI virtual disk for production server on cluster 01
Now, based on free space showing and space needed to present to other servers enter the disk size.
It’s possible to create new iSCSI Target or use the existing one;
By creating new one, new virtual disk would be presented as LUN0 on new target.
By selecting from existing “Targets”, the new virtual disk would be other LUN on that target, for example LUN2 on Target1.
Check the confirmation information and if everything is correct press the “Create” button, after short time new virtual disk (LUN) would be ready to present.
Microsoft Windows Server 2012 is like other iSCSI servers/targets and VMware ESXi host can connect to this “iSCSI Target” as well and work.
Please note that “Microsoft Windows Server 2012” would create one file on selected drive for each virtual disk and would assign disk space to that file based on size which would be configure later! for example if 40 GB selected for size of one virtual disk, one file with 40 GB size would be created. (Pre-allocate)
Config #2 – NFS implementation
Creating and using NFS on Windows Server is easy and straight forward process; bellow steps can help to prepare and present NFS Storage to the VMware ESXi 5.x.
First of all, install “Server for NFS” role from “Server ManagerManageFile And Storage ServicesFile and iSCSI Services” and then few clicks is needed to make this feature up and running.
After successful installation of NFS role, right click on selected drive or folder and select “Properties”. then select “NFS Sharing” tab and press the “Manage NFS Sharing …” button; as this share would be presented to VMware ESXi, few changes should be made to the default settings.
Make sure the “Allow unmapped user Unix access (by UID/GID)” radio button should be selected.
If this “NFS Share” should be able to be written by VMs and Hosts, the “Type of access” on the “NFS Share Permission” window should be change from “Read-Only” to “Read-Write”.
The last step would be adding NFS Share to the VMware ESXi hosts and it can be easily done by pressing “Add Storage …” from “HostConfigurationStorage”; in the new window select the “Network File System” and in the next step provide the server name/ip and “NFS Share” address.
“NFS Share” address or “Folder” would be the name of NFS starting with “/“; for example, if I made folder on Windows with name of NFS_Share and share that with same name on “NFS Share Tab” I should give “/NFS_Share” as the folder or address here.
And the last part would be “Datastore Name” which would be appear on the “Datastores” list.
One drive can be selected for NFS share and the whole process is the same as for folders, but if the drive is selected for be done simply for one or more folder with same process.
If drive is selected for being shared as “NFS Share” two or more hidden folders might be visible on the “Datastore Browser”; folders like “$RECYCLE.BIN” or “System Volume Information”.
Kerberos option can be checked or unchecked and this change don’t prevent hosts from adding and using “NFS Share”.
Also it’s possible to use “NFS Shares” with both “Root Access Disallowed” and “Root Access Allowed” configuration.