Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Mounting a Linux partition/USB device as an NFS share to an ESXi host (2035815)

Purpose

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.

Resolution

To export the share/USB to an ESX/ESXi host as an NFS share:
  1. Connect a USB drive to a Linux machine
  2. 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

  3. Create a file-share in that USB device.

    For Example:

    /mnt/usb/fileshare

  4. 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

  5. Open the /etc/exports file in the Linux machine using a text editor.
  6. 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.


  7. Save and close the file.
  8. Run this command and ensure that you do not see any warnings/errors:

    exportfs -a

  9. Connect to the ESX/ESXi server using the vSphere Client.
  10. Click the Configuration tab.
  11. Click Storage.
  12. Click Add Storage.
  13. Select Network File System and click Next.
  14. 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

  15. Click Next.
  16. Click Finish.

    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.

Feedback

  • 4 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 4 Ratings
Actions
KB: