Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Apr 16 '12 at 1:54

This question came from our site for professional and enthusiast programmers.

    
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 '12 at 16:29

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.