VMWare のディスクイメージ ".vmdk" を Linux から mount する

※ このエントリは、はてなグループ終了に伴う、サブブログからの引越エントリ(2010/09)です。
※ 情報が古い可能性もありますので、ご留意ください。


マウント

# yum install fuse-libs -y
# modprobe fuse
# vmware-mount /path/to/test.vmdk 1 /mnt/

"1"の部分は、パーティションナンバー。

アンマウント

# vmware-mount -d /mnt

vmware-mount: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory

必要なライブラリをインストール。

# yum install fuse-libs -y

fuse: device not found, try 'modprobe fuse' first

文字通り。

# modprobe fuse

参考

# vmware-mount
VMware DiskMount Utility version 2.0.1, build-156745

Usage: vmware-mount diskPath [partition num] mountPoint
       vmware-mount [option] [opt args]

There are two modes for mounting disks.  If no option is
specified, we mount individual partitions from virtual disks
independently.  The filesystem on the partition will be
accessible at the mount point specified.

The -f option mounts a flat representation of a disk on a
user-specified mount point.  The user must explicitly unmount
the disk when finished.  A disk may not be in both modes at once.

diskID is an identifier of the form username@hostname:/path/to/vm
for remote disks and just the path for local disks.  Options that
mount a remote disk also require -h -u -F and optionally -v options.
The -v option is required when connecting to a Virtual Center.

Options: -p <diskID>      list all partitions on a disk
         -l <diskID>      list all mounted partitions on a disk
         -L               list all mounted disks
         -d <mountPoint>  cleanly unmount this partition
                          (closes disk if it is the last partition)
         -f <diskPath> <mountPoint> mount a flat representation of the disk
                          at "mountPoint/flat."
         -k <diskID>      unmount all partitions and close disk
         -K <diskID>      force unmount all partitions and close disk
         -x               unmount all partitions and close all disks
         -X               force unmount all partitions and close all disks
Options for remote disks:
         -v                inventory path of the vm
         -h                hostname of remote server
         -u                username for remote server
         -F                file containing password
         -P                optional TCP port number (default: 902)