VirtualBox Host Drive Access

Posted by JD 10/26/2008 at 11:24

VirtualBox has a way to share host file directories with client VMs. Under Windows, it is fairly intuitive. Under Linux client OSs, the steps are less than clear. I don’t know whether they are documented in the users guide or not. I don’t recall it however.

  1. Load the Client OS Extensions.
  2. Verify that `lsmod | grep vbox` shows the vboxfs module.
  3. Configure the extension to export a directory – I told it to share c:\Data from my Vista-64 host as “Data”
  4. sudo mount -t vboxsf Data /Data – yes, the device is just the plain “Data” and it doesn’t show up in /dev like it should.

Run that last command and BAM, it mounted. I updated the /etc/fstab with the necessary info, dismounted the drive and ran `mount -a` to test it. Yippy!

I have access to 150GB+ of data storage on my laptop that is shared with the host and all guest machines. Sweet! This Virtual Box thing is good, but you already know that I’m easily amused.

I’m currently running VirtualBox 2.0.4.

Trackbacks

Use the following link to trackback from your own site:
https://blog.jdpfu.com/trackbacks?article_id=261