0

Is there any way to mount the .vdi image that is running on a Virtual Box in the local drive.

1
  • Actually two same copies of the same .vdi are running on two different Virtual Box and i have to sync their home directory. So i was thinking of mounting the .vdi and then synchronizing the home directory.
    – sekhu cool
    Mar 17, 2012 at 16:29

1 Answer 1

0

This post explains how to mount VDI images using qemu-nbd, which exposes images as a Network Block Device. Note that this must not be done while the image is being used by a running VM. The following will mount the first partition of the image on /mnt/myvm1:

sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 myvm.vdi
sudo mkdir /mnt/myvm1
sudo mount /dev/nbd0p1 /mnt/myvm1

You must log in to answer this question.