The English part of my blog is mainly technical. If you can read Italian, check the Italian section for articles of other kind.

Mount Flat VMWare Disk Images Under Linux

I use a VMWare virtual machine to run my favorite software anywhere. It is a very nice solution, nevertheless when I run it at home I feel quite frustrated for not being able to run it on real hardware.

The easiest solution is to mount it as a local drive and access files from a real Linux installation. VMWare server provides a tool to mount vmdk files, but I don't want to install it just to be able to use that command.

Fortunately, I'm using a flat VMWare image, and this makes possibile to mount the image vithout any special tool. After all, the flat vmdk file is just a raw image of the disk, so you just need to use it as a loopback device.

Let's assume that the disk image is located at /diskimage-flat.vmdk (quite unlikely, but it's OK for an example) and that there are no other loopback devices in use (i.e. /dev/loop0 and /dev/loop1 are free). The needed commands would be:

losetup /dev/loop0 /diskimage-flat.vmdk
losetup -o 32256 /dev/loop1 /dev/loop0
mount /dev/loop1…

Read more


Tag Cloud