VMware Cloud Community
markzz
Enthusiast
Enthusiast

Browsing the contents of a VMDK from Windows

Hi All,

We are trying to browse the contents of a VMDK file which we have copied locally to a NTFS volume from an ESX 3.5 VMFS volume.

We have tried both the mountvm and vmware-mount utilities but continually get errors as below.

We understand that VMDK's which have been restored from a VCB have viewable contents, but what is the deal if we copy a VMDK straight from a VMFS to a local NTFS

Errors as follows:

Mountvm error

Error while opening disk c:\*******.vmdk: A virtual disk could not be opened.

Details:

Cannot open disk file: Error : Disk library failed (The specified feature isn't supported by this version). Unable to open 'c:\*******.vmdk'. Failed to configure disk scsi0:0.

vmware-mount error

Unable to mount the virtual disk. The disk may be in use by a virtual machine or mounted under another drive letter.

If not, verify that the disk is a virtual disk file, and that the disk file has not been corrupted.

Reply
0 Kudos
12 Replies
IB_IT
Expert
Expert

how did you copy the vmdk off? Are you using vmkfstools cmd?

Reply
0 Kudos
markzz
Enthusiast
Enthusiast

The copy in this case has been done via the VI Client to my local XP workstation

Reply
0 Kudos
esloof
Expert
Expert

VMware DiskMount Utility

The Virtual Disk Development Kit contains a tool called the VMware DiskMount Utility. This utility mounts VMware virtual disks under Microsoft Windows. VMware DiskMount is a utility for Windows and Linux hosts that allows you to mount an unused virtual disk as a separate drive or partition without needing to connect to the virtual disk from within a virtual machine. You can mount specific volumes of a virtual disk if the virtual disk is partitioned. After you mount a virtual disk, you can read from and write to a mounted disk as if it were a separate file system with its own drive letter or mount point on your computer. For example, you could scan the disk for viruses or transfer files between the host system and a powered off virtual machine. When you are finished using a mounted virtual disk, you should unmount it so the virtual disk can be used by virtual machines again. Here's the output :

vmware-mount.exe /?

VMware-mount

VMware DiskMount Utility version 3.0.3 build-84675

Copyright (c) 1998-2008 VMware, Inc.All rights reserved.

This utility mounts VMware virtual disks under Microsoft Windows.

Use "VMware-mount" without arguments to list the currently-mounted volumes.

/v:N mounts volume N of a virtual disk (default=1)

/d deletes the mapping to a virtual drive volume

/f forcibly deletes the mapping to a virtual drive volume

/p displays the partitions (volumes) on a virtual disk (local disks only)

/L lists the currently-mounted volumes

/i:InventoryPath inventory path of the VM owning the virtual disk

/m:[w|n] mount in read-'w'rite or 'n'on-persistent mode

/h:host name or address of server to access managed virtual disk

/u:userid user name on the server

/s:password password on the server

/P:port# port number to access the server (default=902)

/? displays this usage

Reply
0 Kudos
markzz
Enthusiast
Enthusiast

Arr I see.

Thanks esloof

Another point to clarify.

If I mount a guest session that's been VCBed it works a treat no options required.

Seems I have a later version of the diskmount util, but it has an older build date than the one you are using.

C:\Program Files\VMware\VMware DiskMount Utility>vmware-mount.exe /?

VMware-mount

VMware DiskMount Utility version 5.5.0 build-18463

Copyright (c) 1998-2003 VMware, Inc. All rights reserved.

This utility mounts VMware virtual disks under Microsoft Windows.

Use "VMware-mount" without arguments to list the currently-mounted volumes.

/d deletes the mapping to a virtual drive volume

+ /f forcibly deletes the mapping to a virtual drive volume+

+ /v:N mounts volume N of a virtual disk+

+ /p displays the partitions (volumes) on a virtual disk+

+ /y open the virtual disk whether or not a snapshot is in effect+

+ /n do not open the virtual disk if a snapshot is in effect+

+ /? displays this usage information+

Here I am. I've now downloaded the development kit as you have suggested.

C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>vmware-mount.exe /?

VMware-mount

VMware DiskMount Utility version 3.0.3 build-99018

Copyright (c) 1998-2008 VMware, Inc.All rights reserved.

This utility mounts VMware virtual disks under Microsoft Windows.

Use "VMware-mount" without arguments to list the currently-mounted volumes.

/v:N mounts volume N of a virtual disk (default=1)

+ /d deletes the mapping to a virtual drive volume+

+ /f forcibly deletes the mapping to a virtual drive volume+

+ /p displays the partitions (volumes) on a virtual disk (local disks only)+

+ /L lists the currently-mounted volumes+

+ /i:InventoryPath inventory path of the VM owning the virtual disk+

+ /m:[w|n] mount in read-'w'rite or 'n'on-persistent mode+

+ /h:host name or address of server to access managed virtual disk+

+ /u:userid user name on the server+

+ /s:password password on the server+

+ /P:port# port number to access the server (default=902)+

+ /? displays this usage information+

Now we have the version correct lets try again.

So I've downloaded via the VI client one of my Guest session. The entire VM directory and all files contained within.

This is now on my local PC on the E:\ volume

Path to this is E:\Win2kseSP4TemplateUP\Win2kseSP4TemplateUP-flat.vmdk (it's not truely a template, it's just the name I've given it.)

C:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>vmware-mount.exe f: "E:\Win2kseSP4TemplateUP\Win2kseSP4TemplateUP-flat.vmdk"

Unable to mount the virtual disk. The disk may be in use by a virtual

machine, may not have enough volumes or mounted under another drive

letter. If not, verify that the file is a valid virtual disk file.

Unfortunatly it still doesn't open the vmdk.

I have been playing with VDK.exe by Ken Kato http://chitchat.at.infoseek.co.jp/vmware/vdk.html

It's quite old but it works

C:\Program Files\VMware\VDK>vdk help

Virtual Disk Driver for Windows version 3.1

http://chitchat.at.infoseek.co.jp/vmware/

Usage:

+ VDK.EXE command http://options...+

Commands:

+ INSTALL Install the Virtual Disk Driver.+

+ REMOVE Uninstall the Virtual Disk Driver.+

+ START Start the Virtual Disk Driver.+

+ STOP Stop the Virtual Disk Driver.+

+ DRIVER Print Virtual Disk Driver status.+

+ DISK Set the initial number of virtual disk devices.+

+ CREATE Create a new virtual disk device.+

+ DELETE Delete a virtual disk device.+

+ VIEW Print disk image information.+

+ OPEN Open a disk image as a virtual drive.+

+ CLOSE Close a disk image.+

+ LINK Assign a drive letter to a partition.+

+ ULINK Remove a drive letter from a partition.+

+ IMAGE Print opened image file information.+

+ HELP Print command help.+

All commands and options are case insensitive.

Try "VDK.EXE HELP command" for detailed help for each command.

And YES it opens my vmdk after a few commands

eg.

C:\Program Files\VMware\VDK>vdk install

C:\Program Files\VMware\VDK>vdk start

C:\Program Files\VMware\VDK>vdk open 0 "E:\Win2kseSP4TemplateUP\Win2kseSP4TemplateUP-flat.vmdk" /L:F:

C:\Program Files\VMware\VDK>vdk open 0 "E:\Win2kseSP4TemplateUP\Win2kseSP4TemplateUP-flat.vmdk" /L:F:

Virtual Disk Driver for Windows version 3.1

http://chitchat.at.infoseek.co.jp/vmware/

Started the Virtual Disk Driver.

Failed to decide type of 'E:\Win2kseSP4TemplateUP\Win2kseSP4TemplateUP-flat.vmdk'.

Open as a simple sector image file.

Virtual Disk 0

Access Type : Read-Only

Disk Capacity : 25165824 sectors (12288 MB)

Geometry : (C) 12288 * (H) 64 * (S) 32

Number Of Files : 1

Type Size Path

+ -


-


-


+

+ FLAT 25165824 E:\Win2kseSP4TemplateUP\Win2kseSP4TemplateUP-flat.vmdk+

Partitions :

+ # Start Sector Length in sectors Type+

+ -- -


-


-


+

+ 0 0 25165824 ( 12288 MB) <disk>+

+ F: 1 63 16755732 ( 8181 MB) 07h:HPFS/NTFS+

+ I: 2 16755795 8385930 ( 4094 MB) 07h:HPFS/NTFS+

Sorry about the excessive gaff around this guys and girls but for the community we do need to clarify what works and how.

I would much preferr to use the VMWare-Mount util to ensure at least we are all using the same tools and therefore can draw on each other experience. So I will persist with VMWare-Mount.exe ( ver 3.0.3)

Any additional input is greatly appreciated.

By the way we are using the latest ESX build V3.5 release2 (the one that works) and the latest version of the VC.

Reply
0 Kudos
esloof
Expert
Expert

I think VMware DiskMount Utility only mounts VMDK files who are hosted on an ESX server in a powered off VM.

Reply
0 Kudos
markzz
Enthusiast
Enthusiast

That could well be an explanation.

I can confirm the VMWare-mount.exe util can mount read/write a VCB'ed vmdk. This works a treat.

But as you say maybe the limitation is that the VMWare-mount.exe can only mount a native (non-VCB'ed) vmdk if it resides on a VMFS volume.

This would be a bit of a ****** and would add an additional level of complexity to our intended backup and recovery strategy.

To elaborate a little. We are using a NetApp Filer. The idea is to use OSSV to backup the guests via the host. For file level recovery we would then present the backed up guest vmdk's via a CIFS share..

If this is the case I best learn how to mount a VMFS to my Windows PC.. Any tips on this esloof would be much appreciated.

I wonder if I should open a case with VMWare support on this. It seems a bit silly if this is the case. They have given us the ability to copy files and directories from a VMFS to a PC something we use to use WinSCP to do), but they don't give us a tool to view the most important of files once we have copied them. Being the vmdk's

Thanks esloof

Message was edited by: tom howarth to removed slightly offensive word.

Reply
0 Kudos
esloof
Expert
Expert

Consider the following when you mount virtual disks:

You cannot mount a virtual disk that is currently being used by a running or suspended virtual machine.

You can only mount disks that are in a powered off virtual machine, or disks that are not are not associated

with a virtual machine.

You can mount and read Windows virtual disks on Windows hosts (with at least one NTFS volume) or

Linux virtual disks on Linux hosts. Cross‐mounting is restricted as described below.

You can use Disk Mount with virtual disks created by VMware ESX Server 3.x and 2.x (preallocated disks

only), VMware Workstation 6, 5, or 4, VMware Player, VMware ACE, VMware Fusion, VMware Server 2

or 1, and VMware GSX Server 3.x and 2.5. However you cannot mount encrypted virtual disks.

You cannot mount a virtual disk if any of its .vmdk files are compressed or have read‐only permissions.

Change these attributes before mounting the virtual disk.

On Windows hosts, you must mount virtual disks as drive 😧 or greater. You cannot specify a drive letter

already in use on the host.

On Windows hosts, you can mount volumes formatted with FAT (12/16/32) or NTFS only. If the virtual

disk has a mix of partitions or volumes where, for example, a partition is unformatted or is formatted with

a Linux operating system and another partition is formatted with a Windows operating system, you can

mount the Windows partition with Disk Mount.

If you specify a virtual disk with snapshots, this command locates and mounts the last snapshot. On

Windows you can mount previous snapshots read‐only. On Linux you cannot mount previous snapshots.

Reply
0 Kudos
esloof
Expert
Expert

Found this on http://www.vmwarez.com/2005/11/new-vmdk-mount-utility.html

This one works with files created with workstation. I remember seeing this before, but I don't think that it worked with workstation, only ESX or GSX... correct me if I'm wrong.

Here's a screen capture of the help info:

[http://www.vmwarez.com/uploaded_images/mountcap-709610.gif]

Basically, you just type this in:

vmware-mount x: "c:\virtual machines\vm1\virtualdisk.vmdk" /v:1

to mount the first volum of that vmdk file as your x: drive.

To list all the volumes in a vmdk file, you would do this:

vmware-mount "c:\virtual machines\vm1\virtualdisk.vmdk" /p

To unmount your x: drive you would type this:

vmware-mount x: /d

It works like a champ... here's my explorer window of a windows xp pro disk:

[http://www.vmwarez.com/uploaded_images/mountcap2-745482.gif]

Reply
0 Kudos
RDPetruska
Leadership
Leadership

Found this on

This one works with files created with workstation. I remember seeing this before, but I don't think that it worked with workstation, only ESX or GSX... correct me if I'm wrong.

There's been a Windows vmware-mount utility since March 2004. I've written a Windows GUI wrapper for it - since March 29 2004. My most recent version added the parameters for the remote disks (the vmware-mount.exe from the VDDK), but since I don't have any ESX servers around, I can't test that part. I'd love it if somebody can, and give me feedback.

Robert

Reply
0 Kudos
esloof
Expert
Expert

UFS Explorer software is the powerful, comprehensive and yet easy of use application for Data Access and Data Recovery it can mount VMware VMDK files. It is designed to give you simple alternative way to access or recover your data. With UFS Explorer you can read-only (in non-destructive way) access data on partitions of different Operation Systems: Windows, Linux, BSD, MacOS (FAT12, FAT16, FAT32, NTFS, NTFS5, Ext2, Ext3, ReiserFS, XFS, UFS, UFS2, HFS, HFS+); different types of Storages: most Windows OS-pluggable disk drives, including PATA/SATA disks, SCSI drives, USB storages (flash, digital devices, external hard disks), RAID arrays (even disassembled), image files of these storages, as well as virtual storages, created by Virtualization Software of leading vendors: VMWare, Microsoft, Parallels. Along with own alternative data access engine, UFS Explorer products has extended functions to recover your lost data due to software/hardware faults, file deletion, disk format, disk re-partitioning or virus attack. The software suits even to Professionals in Data Recovery and gives comprehensive tool set for Data Access, Files Undelete, lost partitions recovery, disk backup and RAW, 'Ultimate Data Recovery': the last resort in recovering data from severely corrupted partitions, basing on set of heuristic analysis and signature-based algorithms.

bogdan_s
Contributor
Contributor

Yes, UFS Explorer should support ESX VMDK; be sure only you are opening *_flat.vmdk file, not *.vmdk descriptor.

However I think there are solution without it:

try is to open small *.vmdk text descriptor file (few KB of text at most) with any text editor and replace word 'vmfs' with 'flat'; this should make VMware tools think that it is usual non-sparse virtual disk.

This should work if there were no additional conversion on ESX copying stage.

--

PS: Does anybody know any data recovery software/services for ESX? Or there are only service from SysDev Laboratories?

Reply
0 Kudos
gtyrer
Contributor
Contributor

Hi along with the development kit you also get a vmware-vdiskmanager.exe. Have you tried splitting your vmdk file into 2gb chunks and then running the vmware-mount.exe util.

vmware-vdiskmanager.exe -r sourceDisk.vmdk -t 1 destinationName.vmdk

Haven't tried it, but it might help.