The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
Mounting a Linux partition/USB device as an NFS share to an ESXi host (2035815)
This article provides steps to mount a Linux partition/USB device as an NFS share to an ESXi host.
You may want to mount a Linux partition/USB device as an NFS share to an ESX/ESXi host to:
- Copy files from local datastore to a USB device without using the datastore browser download option.
- Clone/copy a running virtual machine to a USB device.
To export the share/USB to an ESX/ESXi host as an NFS share:
- Connect a USB drive to a Linux machine
- Ensure that the USB device is detected and mounted to that machine.
For example, run this command to mount a USB device in Linux:
mount /dev/sdX /mnt/usb
- Create a file-share in that USB device.
- Verify and ensure that NFS services are running on the Linux machine.
Note: You can use this command to start the services:
apt-get install nfs-kernel-server
- Open the /etc/exports file in the Linux machine using a text editor.
- Add a line similar to:
/mnt/usb/fileshare IP_address (rw,sync,no_root_squash,no_subtree_check)
Where IP_address is the IP address of the host.
- Save and close the file.
- Run this command and ensure that you do not see any warnings/errors:
- Connect to the ESX/ESXi server using the vSphere Client.
- Click the Configuration tab.
- Click Storage.
Click Add Storage.
Select Network File System and click Next.
Enter these information:
Server – IP address of the Linux machine
Folder – NFS share path
For example, /mnt/usb/fileshare
Name – Any label of your choice
You should now be able to see the USB device as a datastore under Configuration > Storage > Datastores.
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.