Mount a VirtualBox shared folder inside a guest VM

by
on
September 9, 2010

VirtualBox makes it easy to share folders between the host OS and various guest virtual machines, but it can be difficult to remember the exact way to go about mounting the shared folder within a guest VM. Here is the way to do it correctly.

First off make sure you have installed VirtualBox guest additions.

Switch to root or use sudo.
$ su -

Create the directory and mount the shared folder to the mount point of your choice. Use the shared name you assigned to it when you originally created the shared folder, in this case it is “virtualbox_share”.
# mkdir /media/share
# mount virtualbox_share -t vboxsf /media/share

You can have this automatically mounted by adding the following line in /etc/fstab
virtualbox_share /media/share vboxsf defaults 0 0

Unfortunately the share will be owned by root. To make it owned and therefore writeable by a user use the following line instead. Replace the uid and gid with your information.
virtualbox_share /media/share vboxsf defaults,uid=500,gid=500 0 0

Here’s how to find your uid:
id -u username

And gid:
id -g username

No Comments
virtualbox
, , , , , , , , , , , , , ,

Related posts:

  1. Install VirtualBox Guest Additions on Fedora 12
  2. Clone a VirtualBox Guest VM
  3. Setup SSH access between VirtualBox Host and Guest VMs
  4. Setup USB support in Oracle VirtualBox
  5. VirtualBox 4.0 upgrade and the Oracle VM VirtualBox Extension Pack

Comments (0)

No comments yet

Trackbacks (0)

No trackbacks yet

Leave a Comment

(displayed with your post)
(will not be published)
(optional)

Copyright 2008-2010 WiredRevolution.com. All rights reserved.