Is it possible to mount vdi like for example iso? Or open it with some archive program? If yes, how?
edit: My vdi is dynamically expanding storage and i have snapshots too.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
For both fixed and dynamic-sized images:
On Linux you can use
qemu-nbd. On Debian it's in the qemu-tools package. It's likely in a similar package for other distros. It will let you mount any disk image recognised by qemu, which includes VDI.
modprobe nbd to make sure it's loaded, then do a
qemu-nbd -c /dev/nbd0 <vdi-file> to make it available. It will show up as /dev/nbd0p? for each of the partitions in the image unless told to do otherwise. See the man page for further details.
When finished, a
qemu-nbd -d /dev/nbd0 will detach it.
Be sure you don't have it attached in multiple places at once! This WILL cause problems!
Tool for fixed size Disk Drives:
It can be done with static vdi images (Fixed Size, not dynamically expanding). It is a matter of finding the offset in the image where the partition starts.
Here is page that has a shell script that automates the process for you.
If you are using a dynamically size image, convert it to a fixed size image (make sure you have the HD space) and then use the above tool (reference):
vditool COPYDD myDynamicDisk.vdi static_dump.vdi
Reading up it seems vditool is no longer included. A simple way to create the partition image would be to use gparted iso as a boot disc inside of the Virtualbox VM to create the image of the partition to a location on your network, and then mount that image.
If we knew why you wanted this you might get better answers. Is virtualbox no longer working? Are you trying to get faster transfers to the virtual?
Simplest method for dynamic + snapshots without "running" the virtual is to boot the virtual to a livecd iso image. Then you can use sshfs, smbfs, nfs, etc. to mount the running virtual machine's drive(s) on the host.
If static and no snapshots you could also leave the disk in vmware format (virtualbox supports it) and mount using vmware's vmmount.pl.
If transfer speed is the issue make sure your host and virtuals are in the host's and virtual's host files or have name resolution through another method. (DNS, etc.)