Recovering Data from VMWare vSphere ESXi Virtual Machines

You can lose Datastore data through a user’s error or a hypervisor failure. How to recover data of a VMWare vSphere ESXi virtual machine? Below, we will try to explain what should be done in case it happened.

Recovering Data from VMWare vSphere ESXi Virtual Machines

Contents

  1. Where VMWare ESXi stores its virtual machine files
  2. Why VMFS Datastore can be deleted
  3. Connecting VMWare ESXi Datastore
  4. How to recover data from a VMWare ESXi virtual machine using data recovery software
  5. How to recover data from a virtual disk (VMDK) file

Where VMWare ESXi stores its virtual machine files

By default, ESXi keeps virtual machine files in the same directory as virtual machine configuration files. For this purpose, ESXi creates storage spaces (Datastore) on VMFS partitions of the hard disk.

You can use a browser to learn the location of such files.

When connected to ESXi, hypervisor storage elements are shown in the Storage tab.

Where does VMWare vSphere ESXi store machine files

Inside VMFS Datastore, you can find folders with the names of virtual machines that contain the files of such machines.

Select the storage element you need. Open Datastore browser. Among other files, you will see these:

  • .vmx – virtual machine configuration file;
  • .vmxf – additional virtual machine configuration files;
  • .vmdk — virtual disk parameters;
  • -flat.vmdk — virtual machine data disk;
  • .nvram — BIOS or EFI settings of the virtual machine;
  • .vmem – the virtual machine backup paging file;
  • .vmsd — virtual machine snapshots;
  • .vmsn — virtual machine snapshot data file;
  • .vswp — virtual machine paging file;
  • .vmss – virtual machine suspended state file ;
  • .log — current virtual machine log file;
  • #.log — old virtual machine log files (where # is the number beginning with 1).
Where does VMWare vSphere ESXi store machine files

You can find the location of virtual machine files by using certain commands. To do it:

  1. Connect to ESX with the help of Secure Shell (SSH)
  2. Run the command
    find /vmfs -name "*.vmx"
Where does VMWare vSphere ESXi store machine files

The saving path for a specific machine can be found in the Virtual Machines tab, in the machine settings. Click on the settings button. Switch to VM Options.

Where does VMWare vSphere ESXi store machine files

Under General Options, look for the line VM Working Location.

Where does VMWare vSphere ESXi store machine files

Why VMFS Datastore can be deleted

One of the reasons why a virtual machine on VMWare ESXi may refuse to boot is certain problems with its VMFS Datastore. It cannot be detected by the ESXi server because of:

  • A power failure;
  • Hardware issues related to hard disk connection;
  • Hard disk breakdowns;
  • RAID array breakdowns;
  • Or because initialization is impossible.

As a result, you can lose the VMFS Datastore and therefore lose all virtual machine data which it contains. In such cases you can try and recover the storage.

Let’s explore some options in detail.

Connecting VMWare ESXi Datastore

If your VMWare ESXi Datastore is lost, damaged, or cannot be detected – for example, after some RAID adapter settings were changed – you can mount it again.

To do it, you need to connect to the ESXi server by SSH. In the console, type this command:

esxcfg-volume -l

It brings out the Datastore list like this:

VMFS UUID/label: 01234567-01234567-abcd-0123456789ab/datastore1

Where 01234567-01234567-abcd-0123456789ab is the Datastore identifier.

Connect the Datastore with this command:

esxcfg-volume -M 01234567-01234567-abcd-0123456789ab

and paste your identifier instead of 01234567-01234567-abcd-0123456789ab.

If the operation is successful, you will see this notification: “Persistently mounting volume 01234567-01234567-abcd-0123456789ab.” And that is all. You don’t need to restart the ESXi server.

How to recover data from a VMWare ESXi virtual machine using data recovery software

Let’s explore data recovery from Datastore with the use of RS Partition Recovery. In its virtual environment, the program mounts VMDK virtual disks used by ESXi machines, and provides access to their contents, including deleted files.

This program allows you to recover data from dynamic and fixed-size virtual hard disks, restore points and operating system snapshots.

To recover data from an ESXi machine, you need to connect the physical disk of its storage to a computer with a desktop-type operating system.

Note: if a RAID array is used as ESXi storage, you need to connect all disks within this array to the computer and use a software product that supports RAID – RS RAID Retrieve.

RS Partition Recovery lets you recover data from VMFS partitions.

Start RS Partition Recovery.

RS Partition Recovery

RS Partition Recovery

All-in-one data recovery software

In the Drive Manager, choose the VMFS volume containing Datastore, or the entire hard disk.

How to recover data from a VMWare vSphere ESXi virtual machine

To analyze it and search for files, right-click on the VMFS volume and choose the scan type.

How to recover data from a VMWare vSphere ESXi virtual machine

When you see the search results, go to the partition where virtual machine files used to be stored.

How to recover data from a VMWare vSphere ESXi virtual machine

Select the required data and click Recover to save the data.

How to recover data from a VMWare vSphere ESXi virtual machine

When the recovery operation is over, the virtual machine files will be placed into the directory according to the path you have given.

The recovered data can be imported to an existing virtual machine, or you can create a new one and select the .vmdk file as the hard disk for such new virtual machine.

How to recover data from a virtual disk (VMDK) file

In the main window of RS Partition Recovery, select Tools – Mount Disk, or click on the Mount Disk button.

How to recover data from a VMWare vSphere ESXi virtual machine

Select the virtual machine disk format – VMWare Workstation/vSphere ESXi (*.vmdk).

How to recover data from a VMWare vSphere ESXi virtual machine

Choose the folder containing the files of the recovered virtual machine.

How to recover data from a VMWare vSphere ESXi virtual machine

Select virtual machine disks and snapshots if necessary.

How to recover data from a VMWare vSphere ESXi virtual machine

All selected disks and snapshots will be displayed in the program’s window.

How to recover data from a VMWare vSphere ESXi virtual machine

Choose the one you need and perform the same sequence of actions for data recovery as you did to extract the virtual machine files.

Frequently Asked Questions

VMFS hosts files in a storage container, called a datastore, a separate file system that runs on top of a volume.
VMFS is a block level file system while NFS is a file level file system.
You can use VMFS datastores on Fiber Channel, iSCSI, FCoE, and local storage devices.
VMware 6 supports a maximum storage size of 64TB.
Leave a comment

Related Posts

DIY NAS or building NAS with an old computer
DIY NAS or building NAS with an old computer
One of the most pressing issues of today in the IT field is data storage, which involves information security and multi-user access. To solve this issue, there are SAN and NAS systems. What is a NAS, what purpose does it … Continue reading
Swap file in Windows 10: optimal size, how to change, move, disable or delete it?
Swap file in Windows 10: optimal size, how to change, move, disable or delete it?
Windows users have often heard about some page and swap file. In this article, we will discuss what it is, what it is used for, and how to set it up correctly.
Recovering Data with Read/Write Errors
Recovering Data with Read/Write Errors
If you cannot access data stored on a properly configured computer, receiving errors or having your computer freeze for several seconds (or hang up completely), you may have a problem with the hard drive (assuming you’re not having a virus, … Continue reading
Recovering Data from VMFS Partitions
Recovering Data from VMFS Partitions
How to recover data from VMFS partitions – that is, the partitions having VMFS file system used by type 1 hypervisor VMWare vSphere ESXi? Let’s explore possible solutions for such situation.
Online Chat with Recovery Software