• About Altaro
  • About Altaro VM Backup
  • 101 Free VMware Tools
  • facebook
  • twitter
  • google+
  • linkedin
  • rss
  • About Altaro
  • About Altaro VM Backup
  • 101 Free VMware Tools
Automation and Management
Altaro.com » Altaro's VMware Hub and blog » Automation and Management » How to Extract Content from VMDK Files
Jason Fenech
by Jason Fenech in Automation and Management, vSphere
Tags: Storage, virtual machines, vmdk
How to extract vmdk files

How to Extract Content from VMDK Files

27 Nov 2017 by Jason Fenech
2 Automation and Management, vSphere
 

Sometimes, you’ll find yourself needing access to the contents of a VM’s virtual disk (VMDK), perhaps to retrieve data due to a VM biting the dust. Maybe, a recent update is preventing you from booting the guest OS and you have no backups to rely on. It happens!

In this post, I’ll go over 4 different ways you can use to extract content from VMDK files.

Download Altaro VM Backup

Download Altaro VM Backup

Start your free 30-day trial of Altaro VM Backup today and see why it's trusted by 40 000+ organizations worldwide. Get started now and run your first backup in under 15 mins!

Download Now

 

Before we move on, just a reminder that a VMDK is comprised of 2 parts; the descriptor and the flat file. The descriptor file contains disk information such as its geometry, ids and virtual hardware version. It is, in fact, nothing but a text file viewable in any text editor. The flat file is where the actual data lives. For further details why not have a look at The Anatomy of a VMware Virtual Machine.

Viewing a VMDK descriptor file in a text editor
Viewing a VMDK descriptor file in a text editor

 

Note: The descriptor file is not listed under datastore browser but it can be viewed from the ESXi shell while SSH’ed using a client such as putty or directly from the console.

For this post, I’ve used the VMDKs of both Windows and Linux VMs copying the descriptor and flat files to a folder on my Windows PC, given that some methods covered require both files. Note that you can also use tools like VMFS Recovery to remotely mount VMDKs without having to download them locally.

 

Method 1 – Attaching a VMDK to an existing VM


As trivial as it may sound, an easy way to access the contents of a VMDK, is simply to attach it to another functional VM. It does not really matter whether the VM is hosted on ESXi, Workstation or some other hypervisor.

The following video shows how to attach the VMDK of a Windows 7 VM hosted on ESXi 6.5 to a VM running under VMware Workstation Pro just to demonstrate cross-hypervisor functionality.

https://www.altaro.com/vmware/wp-content/uploads/2017/06/Attaching-a-VMDK-to-a-VM-hosted-in-Workstation.mp4

 

TIP: As shown in the video, when using Workstation, you may run into compatibility issues that could prevent you from attaching the VMDK to the VM. The issue is usually related to an unsupported virtual hardware version. This is easily fixed by changing the hardware version value in the descriptor file, to that supported by VMware Workstation. To do this, have a look at the descriptor file of any VM’s VMDK running under Workstation. This will give you the supported hardware version or else refer to the online documentation.

Inspecting or changing the hardware version for a VMDK
Inspecting or changing the hardware version for a VMDK

 

Method 2 – Using 7-Zip


7-Zip is probably the most popular compression tool out there not in the least because it’s freely available for Windows, Linux and other operating systems. It will pretty much extract any type of archive you throw at it.

This is all good news since it will happily open VMDKs without even needing the descriptor file. To do this, just right-click on the VMDK flat file and select Open Archive to copy the VMDK contents to a folder of your choosing. Alternatively, extract the entire disk contents using the Extract to folder functionality. The method works for VMDKs previously attached to either Windows or Linux.

Opening a VMDK as an archive using 7-Zip
Opening a VMDK as an archive using 7-Zip

 

Using 7-Zip to copy the contents of a VMDK to a Windows folder
Using 7-Zip to copy the contents of a VMDK to a Windows folder

 

Method 3 – VMware Workstation Player


If you have VMware Workstation Player or PRO installed, you will be able to mount VMDK directly as volumes under Windows. For this method to work, you must put the descriptor and flat files in the same folder. The VMDK can then be mounted as a Read-Only or a Read-Write volume by right-clicking on it in Windows Explorer, choosing one of two options.

This works for both Windows and Linux VMDKs, however, Windows cannot natively read Linux file systems, so you’ll need to use some third-party tool like Explore2fs or Ext2Read that does.

Mounting a VMDK in Windows using VMware Workstation functionality embedded in Windows Explorer
Mounting a VMDK in Windows using VMware Workstation functionality embedded in Windows Explorer

 

A Windows VMDK is easily mounted and mapped as a drive using VMware Workstation's functionality
A Windows VMDK is easily mounted and mapped as a drive using VMware Workstation’s functionality

 

When you’re done using the VMDK, dismount the volume from Explorer by right-clicking and selecting Disconnect Virtual Disk.

Unmounting a VMDK when done using it
Unmounting a VMDK when done using it

 

Method 4 – Linux Reader


Linux Reader is a free tool distributed by DiskInternals. It is used to mount, or provide access, to a number of file systems configured on Linux machines. These include Ext2/3/4, HFS and ReiserFS. It is also capable of mounting VMDKs right out of the box, which is the one feature we’re after.

You can download Linux Reader from here. Once you’ve installed it, select Mount Image option from the Drives menu. Then, select Containers -> VMware virtual disks and press Next.

Mounting VMDK disks using Linux Reader from DiskInternals
Mounting VMDK disks using Linux Reader from DiskInternals

 

Next, navigate to the folder containing the VMDK files and press OK to select it. On the screen that follows, check the boxes next to the VMDKs you want to be mounted and click on Mount. As per the next screenshot, I selected two VMDKs; an ext4 formatted disk from a Centos VM and an NTFS one from a Windows VM.

Selecting multiple VMDKs to mount as disks in Linux Reader
Selecting multiple VMDKs to mount as disks in Linux Reader

 

The software will first scan for Raid Arrays. The  VMDKs previously selected, are then mounted and conveniently highlighted in red as shown next.

Mounted VMDKs are highlighted in red
Mounted VMDKs are highlighted in red

 

Clicking on a mounted volume will give you access to the drive’s contents. These can be saved by right-clicking on the file selection and hitting Save. Alternatively, use CTRL-A to select all the content and click on the Save icon to export everything to a folder of your choice.

Saving and exporting content from a VMDK to an external location
Saving and exporting content from a VMDK to an external location

 

Conclusion


While researching this post, I came across a few other methods which I still have to look into. These include utilities such as OSFMount and other ISO and imaging tools that can natively process VMDKs. VMware also provides a command line tool called vmware-mount which used to be included with the VDDK SDK. The tool is no longer included but you can still obtain it by downloading VDDK 5.1 or earlier versions. I also came across the VMware Disk Mount Utility which failed to install since, apparently, it is not supported on 64-bit operating systems because of an unsigned 32-bit driver.

All said and done, the methods outlined today should suffice in allowing you to inspect the content of a VMDK. In my opinion, using 7-ZIP – or any other compression tool with identical capabilities – is by far the easiest method.

To remain in theme, have a look at how to work with VMDKs attached to Linux virtual machines.

Have any questions or feedback?

Leave a comment below!

Backing up your VMware VMs

If you’d like to make backing up your VMware VMs easy, fast, and reliable, check out Altaro VM Backup. It’s free for up to 2 VMs, packed with features and the most affordable backup solution for SMBs around. Download a 30-day trial OR the free version at https://www.altaro.com/vmware-backup/ and get started in under 15 minutes.

Jason Fenech
Jason Fenech

An IT veteran for over 23 years, I covered various roles throughout my career. Prior to joining Altaro as a blog writer and QA tester, I was employed as an infrastructure engineer at a cloud services provider working exclusively with VMware products. The Altaro VMware blog enables me to share the experience and knowledge gained and, much to my surprise, is what got me the vExpert 2017 award. Besides being a techie and a science buff, I like to travel and play guitars. I also do some photography and love having a go at playing the occasional XBOX game, Halo being my absolute favourite. I am also a proud father of two and parent to a crazy Dachshund called Larry.

All Posts   WEBSITE   EMAIL

2 Comments on “How to Extract Content from VMDK Files”

  1. Alex November 27, 2017 at 11:25 pm

    You can also use poweriso.

    I am a loyal winrar user and not 7-zip. I never tried pening the vmdk file with winrar. If it does not work, we can ask Eugene, the developer of winrar to add it. He did add other file extensions to winrar in the past for me.

    Regards,
    Alex

    Reply
    1. Jason FenechJason Fenech Post authorNovember 28, 2017 at 8:19 am

      Hi Alex,

      Correct. I imagine there are many other tools one could use but it takes too long to test them all. Thanks for mentioning PowerISO. I was a winrar fan myself but somehow transitioned to using 7-zip. Both do a great job and any added functionality is always a win-win.

      Thanks

      Jason

      Reply

Click here to cancel reply.

Have a question or comment? We'd love to hear it! Cancel reply

Your email address will not be published. Required fields are marked *

XHTML: You can use these tags <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

 

Featured product

Download Altaro VM Backup

Download 30-day trial or Free Edition (free for 2 VMs, forever.)

Site categories

  • vSphere
  • Storage
  • Automation and Management
  • Altaro News
  • Desktop Virtualization
  • HyperConvergence
  • Cloud
  • Uncategorized

Altaro Software

  • About Altaro
  • Altaro VM Backup

Altaro VM Backup

  • Altaro VM Backup
  • Download Free Version
  • Download 30-day Trial

Our writers

  • Jason Fenech Jason Fenech
    142 Posts
  • Andy Syrewicze (Chief Editor) Andy Syrewicze (Chief Editor)
    24 Posts
  • Ryan Birk
    22 Posts
  • Luke Orellana Luke Orellana
    18 Posts

Copyright © 2018 Altaro Software.

  • facebook
  • twitter
  • google+
  • linkedin
  • rss
[contact-form-7 id="4731" title="Act-On subs"]