Skip to main content
  1. Linux kernel upgrade
  2. When the update manager of your Linux distribution installs a new kernel, you must install again the Guest Additions (see below).
    The symptoms may be : network down, graphical problems (virtual machine window does not resize or uses low resolution), no shared folders, no mouse).

  3. Sharing folders
    • Windows host :
      1. Start VirtualBox and Ubuntu virtual machine.
      2. Install the Guest additions
      3. In VirtualBox VM menu, go to Devices / Install Guest additions ... .

        In your Ubuntu window, you should see a CD named VBOXADDITIONS_4.0.nnn is USB peripherals. Open it with file manager.
        In a terminal, type :
        cd /media/VBOXADDITIONS_4.0.nnn (nnn according to the version of the Guest Additions).
        sudo sh VBoxLinuxAdditions.run
        enter elan password (elan.pw)


        After the installation, you can reboot.
        Log in again.

      4. Choose which Windows directory to share with your Linux (virtual machine).
      5. In VirtualBox VM Menu, go to Devices / Shared Folders ....
        Add a shared folder with the folder with + icon.
        Choose a directory of you MAC (for example /Users/myname) and gives it a name in the Folder Name field (for example mywin_shared). Set it to "Make Permanent" to find it every time you start your Linux virtual machine.

      6. Configure Linux to mount it at boot time.
      7. Now in the virtual machine, create the directory where you will see your Windows files (for example /mywin_data) :
        if you create the directory on / :
        sudo mkdir /mywin_data
        enter elan password (elan.pw)

        if you create it in your home :
        mkdir /home/elan/mywin_data

        Edit the file /etc/fstab :
        sudo gedit /etc/fstab
        enter elan password (elan.pw)

        And add the following line at the end of the file :
        mywin_shared /mywin_data vboxsf defaults,uid=elan,gid=elan,umask=002,rw,exec 0 0

        Adapt this line to your needs (in my example, the user name is elan, its group is elan too).
        Save the file.
        Try the mount by typing :
        sudo mount -a
        ls /mywin_data
        You should see the files of your Windows directory. You can write files here and use it with your Windows softwares.

        Each time you restart you virtual machine, you will find your Windows data in /mywin_data directory.

        If one day you upgrade Linux, you may loose the sharing. In this case, install again the guest additions (see at top), because the guest additions are the driver for Linux to use VirtualBox specificities.

      8. Repeat points 3 and 4 for each folder you want to share.
    • Mac OS X host :
      1. Start VirtualBox and Ubuntu virtual machine.
      2. Install the Guest additions
      3. In VirtualBox VM menu, go to Devices / Install Guest additions ... .

        In your Ubuntu window, you should see a CD named VBOXADDITIONS_4.0.nnn is USB peripherals. Open it with file manager.
        In a terminal, type :
        cd /media/VBOXADDITIONS_4.0.nnn (nnn according to the version of the Guest Additions).
        sudo sh VBoxLinuxAdditions.run
        enter elan password (elan.pw)


        After the installation, you can reboot.
        Log in again.

      4. Choose which MAC directory to share with your Linux (virtual machine).
      5. In VirtualBox VM Menu, go to Devices / Shared Folders ....
        Add a shared folder with the folder with + icon.
        Choose a directory of you MAC (for example /Users/myname) and gives it a name in the Folder Name field (for example mymac_shared). Set it to "Make Permanent" to find it every time you start your Linux virtual machine.

      6. Configure Linux to mount it at boot time.
      7. Now in the virtual machine, create the directory where you will see your MAC files (for example /mymac_data) :
        if you create the directory on / :
        sudo mkdir /mymac_data
        enter elan password (elan.pw)

        if you create it in your home :
        mkdir /home/elan/mymac_data

        Edit the file /etc/fstab :
        sudo gedit /etc/fstab
        enter elan password (elan.pw)

        And add the following line at the end of the file :
        mymac_shared /mymac_data vboxsf defaults,uid=elan,gid=elan,umask=002,rw,exec 0 0

        Adapt this line to your needs (in my example, the user name is elan, its group is elan too).
        Save the file.
        Try the mount by typing :
        sudo mount -a
        ls /mymac_data
        You should see the files of your MAC directory. You can write files here and use it with your MAC OS softwares.

        Each time you restart you virtual machine, you will find your MAC data in /mymac_data directory.

        If one day you upgrade Linux, you may loose the sharing. In this case, install again the guest additions (see at top), because the guest additions are the driver for Linux to use VirtualBox specificities.

      8. Repeat points 3 and 4 for each folder you want to share.
  4. Install Guest Additions errors :
    1. on Debian guest
      If you encounter this error (The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason.) while trying to install Guest Additions, install the kernel headers and compilation tools with the following command (run as root) :
      apt-get install gcc build-essential linux-headers-$(uname -r)
      Then try to run VBoxLinuxAdditions again.
    2. on OpenSuse guest :
      If you encounter this error (The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason.) while trying to install Guest Additions, install the kernel headers and compilation tools with the following commands :
      sudo zypper in gcc automake kernel-source kernel-syms
      cd /usr/src/linux
      sudo make oldconfig && sudo make prepare && sudo make scripts
      Then try to run VBoxLinuxAdditions again.