Thursday, December 26, 2013

How to mount Virtualbox Disk .vdi

1- Basically, you'll have to install qemu if needed:
sudo apt-get install qemu
2- Then you'll need to load the network block device module:
sudo modprobe nbd max_part=16
3- Attach the .vdi image to one of the nbd you just created:
sudo qemu-nbd -c /dev/nbd0 drive.vdi
4- Now you will get a /dev/nbd0 block device, along with several /dev/nbd0p* partition device nodes.
sudo mount /dev/nbd0p1 /mnt
5- Once you are done, unmount everything and disconnect the device:
sudo qemu-nbd -d /dev/nbd0

No comments:

Post a Comment