[an error occurred while processing this directive]
Accessing Virtual Hard Disks Outside of VMware Workstation for Linux
The easiest way to read or write files on a hard disk of a virtual machine
is to start VMware Workstation, boot the virtual machine, then use a floppy disk drive
or the network file system protocols (NFS, SMB/CIFS, etc.) to exchange data
via your physical machine.
Sometimes, the amount of data you want to transfer is too large for a
floppy, you don't have the appropriate driver to run the network inside the
virtual machine, or you cannot run a virtual machine because your license
has expired For these reasons, you need a way to access the hard
disk of the virtual machine directly from the host operating system,
without having to run VMware Workstation.
When the hard disk of the virtual machine is a raw device or a raw disk
(see Installing
an Operating System onto a Raw Partition from a Virtual Machine or Configuring
Dual/Multiboot Systems to Run With VMware Workstation), the problem is already
solved: you can access the partition the same way you would access any other
partition by first mounting it to a directory, then browsing the directory.
But when the hard disk of the virtual machine is a virtual disk (which
is just a file when seen from your host operating system), you need the
help of a program called vmware-mount.pl. This document describes
how to use this program.
vmware-mount is a program that runs on the host operating system.
It makes a virtual disk file appear as a hard disk to the operating system.
Requirements to run vmware-mount
vmware-mount requires a Linux kernel version 2.1.101 or higher
(including the stable 2.2.x series) because this version introduced the
concept of network block devices, which is heavily used by
vmware-mount. vmware-mount is available as an add-on to
VMware Workstation for Linux for both evaluation users and licensed customers. To
install vmware-mount:
Say, for example, that your virtual hard disk file is
~/vmware/vhd.dsk. Follow these steps:
Now, find the partition number (first column) you want to export. Let's
say it is 1.
You can now browse /mnt/vhd as usual. It works as if a physical
device were mounted on the directory When you are finished, simply kill
vmware-mount.pl by typing Ctrl-C in its terminal.
By using the vmware-loop binary directly, you can map the partition
of a virtual hard disk to any network block device (which you can then
mount). This mapping can be done in read-only mode if you use the -r
command line option of vmware-loop.
Currently, a virtual hard disk can not be accessed in read/write mode by more
than one application (VMware Workstation or vmware-mount for example) at a time.
vmware-mount claims that my Linux kernel is too old
See the Requirements section. You need to upgrade to a newer kernel. To
do so, the easiest way is to upgrade your Linux distribution (installing
the package corresponding to the most recent kernel). If you are
able, you can also grab the latest kernel sources and compile your own
kernel. Take a kernel version 2.1.101 or higher and set the
CONFIG_BLK_DEV_NBD option (which you can find under Block devices >
Network block device support) to "y" or "m" If you
don't want to mess with kmod (the kernel module loader formerly known as
kerneld), we recommend to use "y".
Once you have rebooted your new kernel, rerun vmware-mount.pl.
vmware-mount keeps saying that it cannot open my virtual hard
disk because it is locked by other VMs. What does that mean?
See the Notes for Advanced Users section. vmware-mount.pl has
detected that several applications (VMware Workstation or vmware-mount.pl)
are trying to access your virtual disk at the same time. First, be sure
that this is not true If you are certain that two processes (including
processes running on some remote machine) are not trying to simultaneously
access your virtual hard disk, then it is probably a stale lock that
hasn't been cleaned up as it should have been. You can remove it safely.
If you experience further problems, please file a report.
Be sure to select the "vmware-mount" category, and to include the
output of your session with your report.
Under severe load, your host operating system may hang (lock solid) if
you are writing to a virtual disk using vmware-mount.pl.
VMware is aware of the problem and is working on a solution.
To avoid this problem, either use the read-only mode (see
Notes for Advanced Users) or try to limit the
throughput of data you write to your virtual disk.
|