vmware

How to Mount Windows Folder into VMware ESXi


In this article we will take a look on how to connect a network folder from Windows 2012 R2 Server as a datastore on the VMware ESXi host and use it to store files of your virtual machines (VMs) or ISO images. VMWare ESXi cannot work directly with Windows shares (over SMB protocol), so we have to use it in another way.

ESXi host can use 2 types of storages as a datastore:

  • Local disk or LUN from external storage device connected over Fibre Channel or iSCSI
  • Network File System (NFS) – network protocol for remote access access to file systems, commonly used in Unix/Linux environment

Firstly Microsoft implemented basic NFS server functionality in Windows Server 2003 R2 and it is still present in Windows Server 2012 R2.

Tip. NFS directory usage as a storage for VMWare VM’s files should be considered only for the test or non-critical production environment.

So, at first we first need to configure NFS share on Windows 2012 R2 and then connect it as a datastore on ESXi host. We already have a server with configured role File and Storage Services. To install NFS Server feature:

  1. Open Server Manager console and select Manage -> Add Roles and Features
  2. On the Server Roles tabs expand section File and Storage Services  -> File and iSCSI Services
    server for nfs
  3. Tick the item Server for NFS
  4. After installation is finished, click on “Close”
    server for nfs installation
READ ALSO  Antimalware Service Executable: Fix High CPU and Disk Usage

Tip. You can install Server for NFS Features even easier with a single Powershell command:

Add-WindowsFeature "FS-NFS-Service"

Next you need to create a new Windows directory that will be used as an NFS mount point. In this example we created folder c:\nfs , and it is not the best practice :).

Switch to the Server Manager console and go to File and Storage Services-> Shares. Run New Share Wizard (Tasks -> New Share) and then select NFS Share-Quick.

nfs share

Specify share path and desired name. In this example we are using share name nfs. In this case, full NSF path (Remote path to share), that can be used on Unix environment looks like this: srv_fs01:/nfs

new share wizard

On authentication method page disable Kerberos authentication methods and select only “No Server authentication” and “Enable unmapped user access”.

enable unmapped user

To configure share permissions enter your ESXi host FQDN name / IP address, select Read/Write permissions and tick Allow root access.

add permissions

Tip. Also you can restrict access to NFS service using Windows Firewall by denying access except the required IP address or subnet

You can create an NFS share and restrict access to it via PowerShell:

New-NfsShare -Name "NFS " -Path "c:\nfs" -AllowRootAccess $true -Permission Readwrite -Authentication sys
Grant-NfsSharePermission -Name “NFS” -ClientName 192.168.1.111  -ClientType host -LanguageEncoding ANSI

So we have created a new network NFS share on Windows Server 2012 R2. It remains to connect it as a datastore to VMWare host.

READ ALSO  Windows Administrator Account Guide

Tip. Make sure that vmkernel port is configured on your ESXi host.

  1. Login to your vSphere server / ESXi host and select your host. From Action menu select StorageNew > Datastore
    vsphere new datastorage
  2. Select NFS as a datastore type
    datastore type nfs
  3. Select NFS 4.1 (supported on Windows Server starting from Server 2012)
    nfs version
  4. Give your Datastore a name (WindowsNFS), enter NFS Folder (/nfs) and NFS server name (IP address or DNS name)
    nfs share details

After successfull adding the NFS datastore, it appears in the list of available host datastores. You can use this datastore (yet empty) to place the VM files or store operating systems ISO images.

vmware windows nfs


You may also like:

Active Directory auditing: No simple road to succe... Auditing Active Directory almost always finds place at the top of the administrator’s to-do list. There are a number of pressing needs that make audit...
Configure Virtual Machine Automatic Startup on VMw... By default, virtual machines located on VMWare ESXi or VMware Hypervisor is not starting automatically at the host boot. This means that after the ESX...
Boot Straight to the Desktop in Windows 8.1 Boot Straight to the Desktop With the release of Windows 8.1 you now have the option available to you to boot straight to the desktop instead of Metr...
Trouble deleting c:winpe_x86 directory – DI... If you forget to unmount a .WIM file it will lock itself on your HDD and you will be unable to delete it, or the C:winpe_x86 directory. This process ...
Upgrade to Windows 10 Using MDT 2013 Update 1 Hello guys. In this article we are going to be dealing with MDT 2013 Update 1 and pushing out a Windows 10 upgrade. So let’s start. This time we...