Tuesday, June 18, 2013

Install VirtualBox Guest Additions in Ubuntu Server

Run the following commands:
$ sudo apt-get install dkms
$ sudo apt-get update
$ sudo apt-get install build-essential linux-headers-`uname -r`
$ sudo shutdown -r now
$ sudo apt-get install virtualbox-guest-additions

Inside the host OS, in the VirtualBox menu, select 
Devices > Install Guest Additions

Run the following command:
$ sudo lsblk -f 
NAME   FSTYPE  LABEL                      MOUNTPOINT
sda                                       
├─sda1 ext4                               /
├─sda2                                    
└─sda5 swap                               [SWAP]
sr0    iso9660 VBOXADDITIONS_4.2.12_84980 

Using data from the line above (highlighted in yellow):
$ sudo mkdir -pv /mnt/cdrom
$ mount /dev/sr0 /mnt/cdrom
$ ls
$ mkdir -pv ~/build/virtualbox-guest-additions
$ sudo cp -vr * ~/build/virtualbox-guest-additions
$ cd /build/virtualbox-guest-additions
$ ls
$ sudo su
# ./VBoxLinuxAdditions.run
# shutdown -r now

Verification:
Run the following commands as root:
$ sudo su
# X -configure
# cd
# less xorg.conf.new
Under the Section "Device" area for Identifier "Card0", you should see the "vboxvideo" driver available:
Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        Identifier  "Card0"
        Driver      "vboxvideo"
        BusID       "PCI:0:2:0"
EndSection

No comments:

Post a Comment