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.

I am running Fedora on a VirtualBox. Sometimes to allow for performing some real hardware testing, I need to run my development environment on a physical machine. So I need the hard disk of the virtual machine (the .vdi file) to be interchangeably working on both the virtual machine itself and my physical PC by booting a bootable image, mounting the vdi file, and then chrooting to it.

I thought this was easy to achieve but it seems not. I hope to find an answer here.

share|improve this question
add comment

migrated from stackoverflow.com Jul 1 '10 at 8:28

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

1 Answer

up vote 4 down vote accepted

You can mount it as a loopback device. Tools you can use are just 'mount' or 'losetup'. The trick is knowing the required offset. For that you need 'vditool' or 'vdiinfo'.

Here is a nice article that explains it well:

http://muralipiyer.blogspot.com/2008/02/mounting-virtualbox-vdi-disk-authentic.html

share|improve this answer
1  
Is this for fixed drives only, or will it work for expanding type VDI's (has anyone tried?) –  Scott Szretter Jun 18 '11 at 14:25
    
This is for fixed disks only. This method will not work with dynamic disks. –  Goyuix Jun 18 '11 at 16:43
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.