Vmware disk recovery in linux

If you have ever had an issue with vmware or if you have been afraid of using vmware for fear that if something goes horribly wrong you may not be able to extract the information from your vmware image then this information should help you.

The ability to mount a vmware image has been around for a while. To do it in linux you just need Network Block Device support in your kernel.


Once you have that in your kernel you can use vmware-mount.pl to mount your vmdk disks.

Usage: /opt/vmware/workstation/bin/vmware-mount.pl
-p : Print the partition table
disk : Name of the Virtual Hard Disk file
disk : Name of the Virtual Hard Disk file
partition : Number of the partition
[-t type] : Partition type
[-o options]: Partition mount options(s)
mount-point : Directory where to mount the partition

Example usage:

/opt/vmware/workstation/bin/vmware-mount.pl fc5nessus.vmdk 1 -t ext3 /mnt/vmware/
VMware for Linux - Virtual Hard Disk Mounter
Version: 1.0 build-34685
Copyright 1998 VMware, Inc. All rights reserved. -- VMware Confidential

It has been reported that this program does not work correctly with 2.4+ Linux
kernels in some cases, and you are currently running such a kernel. Do you
really want to continue? [N] Y

No Network Block Device detected.

There is no Network Block Device defined on this machine. This script is about
to create the /dev/nb0 Network Block Device. Continue? [Y] Y

Creating the /dev/nb0 Network Block Device

Network Block Device driver detected.

Client: The partition is now mapped on the /dev/nb0 Network Block Device.

Using another terminal, you can now browse your Virtual Hard Disk partition in
/mnt/vmware/. Hit Control-C in this terminal when done.

As you can see I can now recover files from my vmdk by looking in /mnt/vmware/

neuron vmware # pwd
neuron vmware # ls
bin boot dev etc home lib lost+found media misc mnt opt poweroff proc root sbin selinux srv sys tmp usr var

No Comments

Leave a Reply

Your email is never shared.Required fields are marked *

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha