Posted on October 24, 2014 · Posted in VMWare

How to access VMFS Datastore from Linux / Windows

Today we’ll discuss two easy ways of getting access to the data stored on VMFS datastore of ESXi hypervisor (these are configuration files, data and snapshots of virtual machines) from Linux and Windows. Actually, this article is based on a real case of our customer when the only productive server with VMware ESXi hypervisor has stopped booting.

The issue was that backup of VMware virtual machines  hadn’t been configured as well as there was no time to detect and solve booting problems. Therefore, it was decided to manually copy the files of critical virtual machine form VMFS storage and run it on another computer to urgently raised for this purpose hypervisor ESXi.

Let’s deal with two scenarios of accessing data in the VMFS

How to Access VMFS from Ubuntu

In this section we’ll show how to mount a VMFS partition on a PC with Ubuntu (Ubuntu Live CD won’t suit us in this case).

Firstly, you have to connect a physical disk with VMFS to a PC with Ubuntu.

To get access to the data on the VMFS partition, you have to install a special package vmfs-tools. This package allows to get access to VMFS from non-ESX/ESXi hosts. The access is available in read-only mode.

Install the package with the following command

apt-get install vmfs-tools

Note. In Ubuntu repository, only vmfs-tools 0.2.1 is available, and its main drawback is that it can work only with VMFS v4. If you need to mount a VMFS 5 datastore, you will have to download and install vmfs-tools 0.2.5 or higher, for instance, here:

  1. – a package for a 32-bit system
  2. – a package for a 64-bit system

Download the corresponding package version as follows:<


And install it:

#dpkg -i vmfs-tools_0.2.5-1_amd64.deb

If you have to meet dependencies, use this command:

#apt-get install vmfs-tools

After the package is installed, make a directory for a mounting point:

#mkdir /mnt/vmfs

The next step is to look into the directories on the disks. Alongside the section for virtual machine files (VMFS), the ESXi hypervisor creates a number of service partitions during its installation. If the ESXi version is 4 or earlier, or a VMFS storage has been updated from VMFS 4 to VMFS 5, and its size doesn’t exceed 2TB, display the list of disks and partitions like this:

#fdisk -l

fdisk show esxi partitions in ubuntu

As you can see, the VMFS partition is /dev/sd3 (label VMware VMFS)

Important. Since ESXi 5 uses VMFS v5 with GPT (GUID Partition Table is used instead of MBR, and allows to create larger storages, as well as connect RDM-disks (<2TB) in the physical compatibility mode). So to see the partition table you have to use the command parted instead of fdisk.

So, display the partition information as follows:

#parted -l

Now you only have to mount a partition with the VMFS storage:

#vmfs-fuse /dev/sdb3 /mnt/vmfs

Show the contents of the mounted partition:

#ls -all /mnt/vmfs

Thus, we can see all virtual machine files in the VMFS storage, which is read-only, and it means that we can copy the directories and/or separate files of the necessary virtual machines to a separate disk and run them on another ESXi host.

How to Access VMFS from Windows

To access the data on the VMFS partition from Windows, you’ll need a special driver Open Source VMFS Driver on Java. This driver requires Java version 6 or later and allows to mount VMFS volumes only for reading

  • So, download Open Source VMFS Driver here and unpack it in the optional directory (e.g., C:\vmfs)
  • You can check the work of  fvmfs.jar as follows:
    cd \vmfs
    java -jar fvmfs.jar
  • Determine the number of the disk containing VMFS storage that is connected to our Windows computer. You can find the disk number in the Disk Management Console or using diskpart. (In our example, the connected disk has the index 1 – Disk1. For fvmfs driver, this disk has the following name: \\.\PhysicalDrive1)
  • Try to get information about this disk:
    java -jar fvmfs.jar  \\.\PhysicalDrive1 info

    java -jar fvmfs.jar  \\.\PhysicalDrive1 info

  • Share this disk with Webdav:
    java -jar fvmfs.jar \\.\PhysicalDrive1 webdav
  • Make sure that WebClient runs webdav. If it doesn’t work, start it.start webdav service
  • Mount the shared disk:
    net use * http://localhost:50080/vmfs

A new disk that contains VMFS datastore available for reading should appear in the system. vmware esxi vmfs partition show in windows

Related Articles