Steps to access VMFS Datastore from Linux Windows and ESXi



Are you trying to access VMFS datastore from Linux, windows, and ESXi?

This guide is for you.

The datastores that you deploy on block storage devices use the native vSphere Virtual Machine File System (VMFS) format.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to solve VMWare related queries.
In this context, we shall look into the steps to  access VMFS datastore.

How to access VMFS Datastore from Linux, Windows, and ESXi?

To access the data stored on the VMFS database of the ESXi host, simply follow the process below.
If the ESXi host crashes, but the local disk (disks) of the server are still functional, then it is always possible to copy the virtual machine files (both data drives and configuration files) from VMFS datastore and run VM on a different server (even on VMware Workstation or Hyper-V).
The main problem is that the common operating systems (Windows and Linux) by default do not recognize the partition with the VMFS file system, because they do not have a VMFS driver.
Now let us see the different ways of accessing data on the VMFS datastore.


How to Mount VMFS file system on Linux (Ubuntu)?

First, we connect to a physical disk with the VMFS file system to the computer (server) with Ubuntu.
In order to access the data on the VMFS volume, we have to install a special third-party vmfs-tools package. This package allows accessing VMFS from non-ESXi hosts. It is possible to access data on this partition in read-only mode.
To install the package, simply execute the following command;.

$ apt-get install vmfs-tools

Next, to install package dependencies, we run the below command.

$apt-get install vmfs-tools

After the package is installed, we need to create a mount point in which the VMFS partition will be mounted:

$mkdir /mnt/vmfs

The next step is to look into the partitions on the disks. Creates a number of service partitions when installed in addition to the partition for virtual machine files (VMFS partition).
If the ESXi version is 4 or earlier, or a VMFS storage has been updated from VMFS 3 to VMFS 5, and its size doesn’t exceed 2TB, then we can display the list of disks and partitions by executing below command.

$ fdisk -l

As a result of the above command, we found VMFS partition is /dev/sdb3
Now we only have to mount a partition with the VMFS storage:

$ vmfs-fuse /dev/sdb3 /mnt/vmfs

Then list the contents of the mounted partition:

$ls -all /mnt/vmfs

Now we see all the virtual machine files on the VMFS storage that is available in read-only mode. It means that we can now copy the directories and/or individual files of the necessary virtual machines to a separate drive and run them on another ESXi host.

How to access VMFS Volume from Windows?

In order to connect the VMFS volume and access virtual machine files from Windows, we’ll need a special Java driver – Open Source VMFS Driver. This driver requires Java version 6 or later.
It allows mounting VMFS volumes in read-only mode. Follow the steps;
1. First, we download Open Source VMFS Driver (fvmfs_r95_dist.zip and unpack it to any directory (e.g., C:\vmfs).
2. Next, we can check the operation of the java-application fvmfs.jar by running the below commands;

cd \vmfs
java -jar fvmfs.jar

3. Next, we determine the number of HDDs containing VMFS storage that is connected to the Windows computer. We 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).
4. Then we try to get information about this disk:

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

5. After that, we share this disk with WebDAV:

java -jar fvmfs.jar \\.\PhysicalDrive1 webdav

6. Then mount the shared disk:

net use * http://localhost:50080/vmfs

7. A new disk that contains VMFS datastore available for reading should appear in the system;
However, we don’t close the console window while working with files on the VMFS storage.

How to perform mounting an existing VMFS Datastore on a new ESXi host?

Basically, third-party VMFS drivers for Linux and Windows do not allow working with VMFS 6.0.
Therefore, the best way to access data on a VMFS partition of a failed server is to connect its disks to a new ESXi server.
The new ESXi host must correctly identify the attached VMFS datastore and then we will be able to access the files on it.
Here are the steps that we follow to connect an existing VMFS storage to a new ESXi host without formatting it:
i. First, we connect to the new ESXi server using the vSphere Web Client;
ii. Next, we connect the drive to the new server and run Storage rescan;
iii. Then we go to the Configure >> Datastores section and select Create a new datastore item;
iv. After that, we select the storage type: Disk or LUN;
v. In the list of available devices, we select the connected drive (LUN) with the VMFS storage;
vi. Then we select the connection mode. Select Keep the existing signature item;
vii. We click the Finish button.
viii. We go to the host’s storage section. Here we select the connected storage. Its contents can be displayed by clicking on the
ix. Datastore browser button;
x. Finally, now we can find the necessary vmx files, register them on the host, and immediately start the critical virtual machines.

[Need urgent assistance in fixing VMWare queries? – We are here to help you]


Conclusion

This tutorial will help you on the process to access VMFS datastore from Linux, Windows, and ESXi.


Related Post


Focus on your business, not your servers.

Click Here to Learn More






Keep In Touch

We hope to hear from you.

Accept File Type: jpg,jpeg,png,txt,pdf,doc,docx