Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Virtualization / VMWare / How to Access VMFS Datastore from Linux, Windows, or ESXi?

July 1, 2022 LinuxUbuntuVMWareWindows Server 2022

How to Access VMFS Datastore from Linux, Windows, or ESXi?

Let’s look at several ways to access data stored on the datastore with the VMFS file system of the ESXi host (these are configuration files, data files, and snapshots of virtual machines) from Linux, Windows, and VMware hypervisor. Actually, this article is based on a real case of our client when a single VMware ESXi host has suddenly crushed.

If your ESXi host crashes, but the local disks (or LUNs) are still functional, you can copy the virtual machine files and run the VMs on another host (on VMware Workstation or even on Hyper-V). Common operating systems (Windows and Linux) by default won’t see data on a partition with a VMFS file system, because they don’t have a VMFS driver

Let’s consider three scenarios of accessing data on the VMFS datastore.

How to Mount VMFS File System on Linux (Ubuntu)?

Let’s look at how to mount a partition with the VMFS file system on a computer running Ubuntu 20.04 LTS installed. Install the vmfstools package depending on the version of the VMFS file system:

  • vmfs-tools – supports VMFS 3 (ESXi 3.x, 4x) andVMFS 5 (ESXi 5.x)
  • vmfs6-tools – VMFS 6 (used by default in modern versions of ESXi since vSphere 6.5)

In our example, the disk was connected to an ESXi 7.1 host, so you need to install vmfs6-tools to access data on a VMFS6 file system:

# apt-get -y install vmfs6-tools

install vmfs6-tools on linux

Create a mount directory:

# mkdir /mnt/vmfs

Get the disk name and partition type:

# fdisk -l

In our example, you can see that the /dev/sdb drive has an sdb1 partition with the VMware VMFS file system.

check vmware vmfs partiion on linux

Note. To access the GPT partition table on disks larger than 2 TB, use the parted command instead of fdisk:

# parted -l

To mount this VMFS partition on Linux, run the command:

# sudo vmfs6-fuse /dev/sdb1 /mnt/vmfs

The command returned that the specified partition contained a VMFS6 file system and mounted it to the target directory.

Virtual machine files on a VMFS disk are available for you in read-only mode and you can copy them or quickly run them with VMware Player/Workstation.

accessing vmware vm files on vmfs from ubuntu linux

An error may occur while mounting a partition:

VMFS Unsupported version 5
Unable to openfilesystem

In this case, you need to install vmfs-tools which supports VMFS3 and VMFS5:

# apt-get install vmfs-tools

It remains to mount the disk partition with VMFS 5 datastore:

#vmfs-fuse /dev/sdb1 /mnt/vmfs

Mounting VMFS Partition on a New VMware ESXi host

Above, we looked at how to mount VMFS partition using third-party VMFS drivers. However, the most universal way to access data on a VMFS data store of a failed server is to connect its disks to a new ESXi server (you can install ESXi on a new host in less than an hour). I think this is the easiest way to mount a VMFS volume from a physical hard drive or LUN on a storage array device (connected via Fiber Channel or iSCSI).

Follow the steps below to mount an existing VMFS datastore on a new ESXi host without formatting it:

  1. Connect to the new ESXi server (ESXi 6.7 in this example) using the vSphere Web Client;
  2. Connect the disk to the new host and perform Storage rescan (if your VMFS is located on an iSCSI LUN, you connect it according to the guide);
  3. Go to the Devices tab, and find your LUN in the list. Make sure ESXi sees the VMFS partition there; view vmfs partiton vsphere client
    If the VMFS datastore has been removed from the storage device, check the post “How to recover an accidentally deleted VMFS datastore?”
  4. Connect to the console of the ESXi host via SSH and run the command: vmkfstools -V vmkfstools: mount vmfs partition esxi cli
  5. This command should find available VMFS partitions on disks and mount them;
  6. Open vSphere Client and make sure your VMFS storage is now available. Click on it and select Mount;mount vmfs datastore in vsphere client
  7. Open the Datastore Browser. Now you can access all files on VMFS datastore. You can find the necessary vmx files, register them on the current ESXi host, and immediately run critical virtual machines.
In previous versions of ESXi (6.5, 6.0, 5.x), it was possible to mount an existing VMFS volume from the vSphere Client GUI. To do this, select the Keep the existing signature option when adding a new VMFS datastore.connect vmfs Keep the existing signature

Accessing VMFS Datastore from Windows

In order to mount the VMFS partition and access virtual machine files from Windows, you’ll need a special Java driver – Open Source VMFS Driver. This driver requires Java version 6 or later and allows to mount VMFS volumes in a read-only mode.

You can download Open Source VMFS Driver here: https://code.google.com/archive/p/vmfs/. This project has not been updated since 2010 and the latest version of the driver that is available on the site is VMFS Driver r95, which supports only VMFS 3 (< VMware ESXi 5.x).

Note. If you try to mount to a newer version of VMFS, you will receive an error message: No VMware File System detected.
  1. Download Open Source VMFS Driver (fvmfs_r95_dist.zip) and extract it to any directory (e.g., C:\vmfs);
  2. You can check the operation of the java-application fvmfs.jar as follows:
    cd \vmfs
    java -jar fvmfs.jar
  3. Next, you need to determine the number of the disk containing the VMFS datastore connected to your 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);
  4. Try to get information about this disk:
    java -jar fvmfs.jar  \\.\PhysicalDrive1 info

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

  5. Share this disk with WebDAV:
    java -jar fvmfs.jar \\.\PhysicalDrive1 webdav
  6. Make sure that the WebClient service is started. If the service is disabled, run it;start webdav service
  7. Mount the shared disk:
    net use * http://localhost:50080/vmfs
  8. A new disk containing read-only VMFS datastore will appear in Windows; vmware esxi vmfs partition show in windows
  9. Do not close the command prompt window while working with files on the VMFS datastore.

14 comments
4
Facebook Twitter Google + Pinterest
previous post
How to Deploy Windows 10 (11) with PXE Network Boot?
next post
Using PowerShell Behind a Proxy Server

Related Reading

Enable Single Sign-On (SSO) Authentication on RDS Windows...

May 23, 2023

Configure Windows LAPS (Local Administrator Passwords Solution) in...

April 25, 2023

Unmounting an NFS Datastore from VMware ESXi

April 21, 2023

How to Integrate Security Updates into Windows Image...

April 20, 2023

Turn Linux Computer into Wi-Fi Access Point (Hotspot)

April 14, 2023

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configuring Event Viewer Log Size on Windows

    May 24, 2023
  • How to Detect Who Changed the File/Folder NTFS Permissions on Windows?

    May 24, 2023
  • Enable Single Sign-On (SSO) Authentication on RDS Windows Server

    May 23, 2023
  • Allow Non-admin Users RDP Access to Windows Server

    May 22, 2023
  • How to Create, Change, and Remove Local Users or Groups with PowerShell?

    May 17, 2023
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

    May 16, 2023
  • View Success and Failed Local Logon Attempts on Windows

    May 2, 2023
  • Fix: “Something Went Wrong” Error When Installing Teams

    May 2, 2023
  • Querying Windows Event Logs with PowerShell

    May 2, 2023
  • Configure Windows LAPS (Local Administrator Passwords Solution) in AD

    April 25, 2023

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Using iPerf to Test Network Speed and Bandwidth
  • Installing an Open Source KMS Server (Vlmcsd) on Linux
  • How to Enable Two-Factor Authentication (2FA) for SSH on Linux?
  • Install and Configure SNMP on RHEL/CentOS/Fedor
  • How to Fix the ‘Too Many Open Files’ Error in Linux?
  • Installing PowerShell Core on Linux Distros
  • Adding Trusted Root Certificates on Linux
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top