VirtualBox

Set up VirtualBox Guest Additions


If you are attempting any of these tutorials in VirtualBox, you may want to install the VirtualBox Guest Additions at this stage to enable full screen resolution, USB 2 support, shared folders and clipboard and seamless mouse integration. Skip this if you are installing on real hardware.

For Debian Testing (Jessie)
  1. Add contrib repository to debian jessie main.
    1. Open a terminal and su to root
    2. Nano /etc/apt/sources.list
    3. Find the line starting:
      deb http://ftp.debian.org/debian jessie main
    4. Add contrib to the end
    5. Ctrl + O to save, then enter to confirm
    6. Ctrl X to exit
  2. apt-get install virtualbox-guest-utils = 38.3MB
  3. Reboot and try and alter the screen resolution beyond 1024x768.
  4. Keep your eye on the boot message for any red text concerning VirtualBox - this could mean they have failed to install correctly.
If this doesn't work and/or you are getting red errors on boot, check that the kernel and kernel headers are at the same version:
  1. Login to a terminal as root
  2. dpkg --list | grep linux-image
  3. dpkg --list | grep linux-headers
  4. apt-get install linux-image-xxxx or apt-get install linux-headers-xxxx
    (basically upgrade either the image (the kernel) or the headers to the highest version you have).
  5. Then you can remove the older kernels and headers:
    apt-get remove linux-image-xxxx linux-headers-xxxx
  6. Update grub so it it picks up the changes
    update-grub2
  7. apt-get install --reinstall virtualbox-guest-dkms
  8. shutdown - r now
If you still encounter problems it may be because your version of VirtualBox does not meet the same version as the Guest Additions supplied by Debian (this can be the case if your host system is Windows or not Debian Testing). In that case, you can install them manually from VirtualBox itself:
  1. Make sure you are using the latest version of VirtualBox. On Windows download and install from the website, for Linux check what is in your distro's repositories first and upgrade or download from the VirtualBox website.
  2. Launch the virtual machine.
  3. Log in as root.
  4. Use the VirtualBox menu (ie on the host systems) to ensure you get the right additions for your version of virtualbox (ie don’t use the ones in the Debian repos):
    1. Right-Ctrl+home
    2. Devices| Insert guest additions CD image
    3. If the CD shows up on the desktop you can try and run the file VBoxLinuxAdditons.run.
    4. If the CD doesn't show up or you get a permissions denied error, try the following:
      1. Reboot
      2. Log back in as root
      3. Open the CD image from the desktop
      4. Create the directory /root/temp
      5. Select all the files from the CD image and copy into /root/temp
      6. Right-click VBoxLinuxAdditons.run --> Execute
      7. Check for any error messages
      8. Enter to close Window
      9. Permanently delete the temp directory (shift+del) and reboot.

No comments:

Post a Comment