Installing Ubuntu under VirtualBox

From MetaWiki
Jump to: navigation, search

Ubuntu 9.10 in VBox 3.1:

  • Install VBox, download Ubuntu ISO, mount iso, create new machine (first starting from CD-ROM, installation manual!).
  • Install Guest additions inside Ubuntu: a) Host menu Devices, Install Guest additions. b) Open terminal, type "sudo /media/cdrom0/VBoxLinuxAdditions-x86.run". 2. Fixing Screen color issue: Increase graphics mem to 16 MB, allow 3d, but then disable in ubuntu appearances: effects. (Note: VBox 3.1.0 had problems with Ubuntu Screen sizing and color. Problems disappear when Updating to VBox 3.1.2 and reinstalling Guest additions inside Ubuntu).
  • Add additional repositories as of https://help.ubuntu.com/community/Medibuntu
  • Create shared folders like C_DRIVE using the VirtualBox graphical user interface. In ubuntu root terminal:
 gedit /etc/fstab

and add

C_DRIVE  /mnt/c  vboxsf defaults 0 0
users_gh /mnt/gh vboxsf defaults 0 0

It is often desirable to hide at least the statusbar, perhaps also the menu bar of the VBox window around Ubuntu. In principle, the commandline methods described on the net might work, but in our case they did not (VBox 3.1.2):

(open CMD)
cd C:\Program Files\Sun\VirtualBox
VBoxManage setextradata global GUI/Customizations noMenuBar,noStatusBar
# (instead of global one can put the machine name)
# getextradata for machine ubuntu:
VBoxManage getextradata ubuntu enumerate

What did work, was to edit the global xml file manually: C:\Users\YOURNAME\.VirtualBox\VirtualBox.xml then add the line

<ExtraDataItem name="GUI/Customizations" value="noStatusBar"/>

after <ExtraData>.

Networking from Host system (Vista) into the Guest system

One option is to keep the NAT default networking setup, and configure port forwarding with NAT. Note, however, that this does not support all options (no ping from inside machine, many other protocols don't work). To setup port forwarding:

  • Execute in commandline in Host (e.g. C:\Program Files\Sun\VirtualBox):
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/HTTP/Protocol" TCP
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/HTTP/GuestPort" 80
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/HTTP/HostPort" 8080
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
  • Set Windows Firewall to allow Application Virtualbox
  • Install Firewall Firestarter under Ubuntu
  • Install ssh using apt-get under Ubuntu
  • Start putty or WinSCP (127.0.0.1 and Port 2222 - localhost does not work with WinSCP) and allow in Firestarter

A better option may be to set up "Bridged networking" see chapter "6.4" (for VBox 3.1.2) of user manual. To quote: "To enable bridged networking, all you need to do is to open the Settings dialog of a virtual machine, go to the “Network” page and select “Bridged network” in the drop down list for the “Attached to” field. Finally, select desired host interface from the list at the bottom of the page, which contains the physical network interfaces of your systems."

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox