How do I mount a .VDI filesystem under linux?

Post Reply
mister_v
Posts: 139
Joined: Sat Jun 20, 2009 5:42 pm

How do I mount a .VDI filesystem under linux?

Post by mister_v »

Hi,

I want to mount a harddisk of VirtualBox under linux.
How do I do that?

It has .vdi exetntion.
Filesystem was created by VirtualBox 4.0.4

thanks.
mister_v
Posts: 139
Joined: Sat Jun 20, 2009 5:42 pm

Re: How do I mount a .VDI filesystem under linux?

Post by mister_v »

I was able to create a clone and use it on another virtual machine with

Code: Select all

VBoxManage clonevdi /var/vm/test_drive.vdi /var/vm/test_drive_22.vdi
is the same as

Code: Select all

VBoxManage clonehd /var/vm/test_drive.vdi /var/vm/test_drive_22.vdi
But this isn't exactly what I want.

I know that the .vdi file is a complete harddisk,
and that I need to access the partition on it.
Chris
Site Admin
Posts: 129
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium
Contact:

Re: How do I mount a .VDI filesystem under linux?

Post by Chris »

For fixed-size VDI images,
you can follow this tutorial.
http://wiki.przemoc.net/tips/linux#moun ... size_image

For dynamic size VDI-images, it looks to be more difficult...
From what I read it is highly discouraged to mount it with a non-vdi aware application.
With the risk of corrupting the data.

You can get info of the VDI-image with:

Code: Select all

VBoxManage showhdinfo drive.vdi 
UUID:                 {UUID1}
Accessible:           yes
Logical size:         61440 MBytes
Current size on disk: 7041 MBytes
Type:                 normal (base)
Storage format:       VDI
Format variant:       dynamic default
In use by VMs:        {VBOXSYS} (UUID: {UUID2})
Location:             /var/driveb/share/os_sys/drive.vdi
Post Reply