VirtualBox/Guest Additions/Ubuntu

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Here we install the Guest Additions.[1]

  1. Go back to the host operating system. At the top of the "testUbuntu14 [Running] - Oracle VM VirtualBox" window, choose Devices >> "Insert Guest Additions CD image..."
  2. (VirtualBox simulates inserting a CD into the simulated optical drive of the VM, and Ubuntu auto-mounts that CD under "/media/a/").[2]
  3. When Ubuntu gives the "VBOXADDITIONS... automatically started. Would you like to run it?..." pop-up window, hit "run".
  4. Hey, remember that password we wrote on a sticky note earlier? Type it in and hit the Authenticate button.
  5. Ubuntu pops up a new terminal window and takes a minute to install and start up "VirtualBox Guest Additions". When the last line of that terminal window says "Press Return to close this window...", click inside that window and press Return.
  6. Go back to the host operating system. At the top of the "testUbuntu14 [Running] - Oracle VM VirtualBox" window, most people find it convenient to enable Devices >> Shared Clipboard >> Bidirectional.
  7. Shut down the virtual machine from the "gear" icon in the upper right corner, "Shut down..." >> Shut Down.
  8. Open up the Oracle VM VirtualBox manager. The "testUbuntu1" VM currently has the "Powered Off" icon, right? Select the VM, and hit the green arrow "start" icon.
  9. (The next time you restart after installing the guest additions, the "virtual monitor" window should now be 800x600 pixels).
  10. (Now when you look under "/media/a/", the "Guest Additions CD image" is still there -- do I need to do something to "take it out of the (virtual) drive"? If so, how?)
  11. (optional) To automagically resize the size of the virtual monitor to fill the "testUbuntu14 [Running] - Oracle VM VirtualBox" window whenever you stretch or shrink that window,
    1. At the top of the "testUbuntu14 [Running] - Oracle VM VirtualBox" window, choose View >> Auto-resize Guest Display.
    2. When you installed the Guest Additions (as described above), that option should have been enabled. There is apparently two separate bugs that can keep it greyed out even after installing the Guest Additions and rebooting:[3][4]
    3. Some people suggest editing a "/etc/X11/xorg.conf" file, but that file apparently no longer exists in Ubuntu14.
    4. Some people suggest using apt-get to (re)install guest additions, uninstalling that version, and then re-install the guest additions again from the VirtualBox ISO:[5]
      1. Inside the virtual machine, open a terminal window and run "sudo apt-get install build-essential dkms virtualbox-guest-additions-iso". Hit "y" to continue.
      2. Next, uninstall the guest additions: "sudo apt-get remove --purge virtualbox-guest-additions-iso". (We only installed it to pick up a bunch of dependencies; it's probably the wrong version for whatever version of VirtualBox you have running on your host).
      3. At the top of the "testUbuntu14 [Running] - Oracle VM VirtualBox" window, choose Devices >> "Insert Guest Additions CD image..." and re-install it, as described above.
      4. Reboot
      5. wait a minute until the GUI desktop comes up
      6. At the top of the "testUbuntu14 [Running] - Oracle VM VirtualBox" window, choose View >> Auto-resize Guest Display.

References[edit]