Installing VirtualBox Guest Addition & mount shared folder

Published by burgerboydaddy on Fri, 11/30/2012 - 11:01

Tags 

Step by step guide how to install VirtualBox guest addition and mount shared folder (Ubuntu 12.04)

1. Start the Ubuntu Server VM and insert the Guest Additions CD image (Devices menu, Install Guest Additions).
2. Install necessary build tools and build dependencies:

    $ sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
3. Mount guest addition
    $ cd /opt
    $ mkdir cdrom
    $ mount /dev/cdrom /opt/cdrom
    $ cd cdrom
    $ ./VBoxLinuxAdditions.run

4. reboot
    $ reboot
5. add next to /etc/rc.local file
    $ sudo su -
    $ cd /mnt
    $ mkdir vbox-shared
    $ cd /etc
    $ vim rc.local
        mount -t vboxsf -o uid=1000,gid=1000 vbox-shared /mnt/vbox-shared
    $reboot

6. now shared folder is inside /mnt/vbox-shared


If you receive error:
mount: unknown filesystem type 'vboxsf'
In that case just replace 'vboxsf' with 'vboxfs'

Add new comment