This website is preserved for historical and scholarly reference and is no longer actively maintained.
Instructions for installing VirtualBox and then installing and setting up a Ubuntu 14.04 LTS VM. You will need to be familiar with Chapters 1-6 of the VirtualBox Users Manual. Other helpful documentation:
Installing a VM on VirtualBox
Step 1. Installing VirtualBox and setting up a Guest OS (i.e., a VM).
- Download to your laptop the latest version of VirtualBox.
- Before installing, read chapters 1-4 of the Users Manual.
- Install VirtualBox.
- Download and install the recommended extension pack.
- Download and ISO of the Ubuntu release 14.04.5 LTS (Trusty Tahr)....download the 64-bit AMD64 desktop image from here:http://mirror.pnl.gov/releases/trusty/.
- This specific distribution and release is REQUIRED!!
- You do NOT need to burn an install CD...you will point VirtualBox to the location of the ISO you just downloaded.
- Summary of steps to create a VM
- Make sure to read the installation discussion for your specific Host OS.
- There are some decent youtube videos that can help if you get stuck.
- When creating the VM, specify at least 1 GBytes of memory and
a max disk space of 10GBytes that is allocated
dynamically and file type VDI.
Step 2. Once you install the VM, you should install the VMs set of
helpful drivers referred to as "Guest Addtions"
- In your VM window (not the VirtualBox Manager), select Devices and then 'Insert Guest Additions CD'. Then change directories to where the CD image is located. On your VM, in a term session, issue a 'df -k' to find the mount location of the CD (on my system it is /media/jjm/VBOXADDITIONS_5_0.12_104815 ). Issue 'sudo runasroot.sh' or 'sudo ./VboxLinuxAdditions.run' or 'sudo VboxLinuxAdditions-amd64.exe'
- An alternative way to install the 'Guest Additions' : on your VM, in a term session, issue 'sudo apt-get install virtualbox-guest-utils'
- See this page for help: https://www.virtualbox.org/manual/ch04.html
Step 3. Tweak your VM settings to :
- To allow the VM to operate on >1 physical CPUs
- On Virtual Box Manager, select Settings, and then System, and then you should see how to set the number of processors.
- To make it easy to transfer files between VMs and Host OS, create a Shared Folder
- On your VM, select Devices and Shared Folder.
- Make sure to create a folder on your Host OS first, and then specify this as the shared folder. Indicate it is permanent.
- On your VMs, issue a 'df -k' and you should see the folder mounted. Note that you might need to use sudo to access the folder.
- To allow cut and paste across your Host and Guests, enable Bidirectional Drag and Drop in each VMs Devices configuration.
- When running youtube in your VM, you might be able to improve performance by (note....some of these might not apply depending on your computer)
- Set the VM Configuration Audio setting 'Audio Controller' to 'Intel HD Audio'
- In VM Settings, select Display and increase Video Memory (try 32MB)
- In VM Settings, select System and increase Base Memory to 2Gbytes
Step 4 : Network setup:
The first step is to read Ch 6 of the VirtualBox Users Manual. After an initial install of the Ubuntu VM, you should first perform the steps in 'Initial Network Settings'.
Initial Network Settings and System Validation
The default network mode is Network Address Translation (NAT). The network diagram is roughly as follows:
Internet ----host os ------'hard wired link'---- Ubuntu VM
------------ ....10.0.2.2 .................................10.0.2.15
VirtualBox setups up a 'hard wired link' allowing a VM (any number) to communicate through the Host using NAT. Don't be alarmed when you see all VMs are assigned the same IP address.
The VM will show a NAT network (Settings --- Networks ). Click Advanced and it will show the MAC address. VirtualBox uses a somewhat strange network scenario-it assigns all VMs to use NAT with an IP of 10.0.2.15.
To complete step 1, validate the network is as expected by:
- On the VM, issue ifconfig and make sure the IP is 10.0.2.15
- On the VM, ping google.com - this should work
- On the VM, once you install some software (see Step 5 below), you can issue 'traceroute google.com' and this should confirm that the first hop router IP is 10.0.2.2
Explanation: Host OS is performing NAT on behalf of flows intiated by VM1. Let's say our Host OS has an IP of 172.23.0.1. When VM1 issues a ping to a machine like netlab.cs.clemson.edu, the netlab host will think its interacting with a host with a source IP of the Host OS's IP address to the outside world.....when really the source is VM1!!
Step 5: Packages to install after a fresh install of ubuntu 14.04. Issue 'sudo apt-get install pkgname' from a term session on the VM.
- inetutils-traceroute and tcptraceroute
- xutils-dev
- iperf
- iperf3
- sysstat (provides mpstat)
- openssh-server
- restart: sudo /etc/init.d/ssh restart
- to provide a complete development environment: install build-essential
- for maintaining/contributing code: install cvs subversion git-core mercurial
- to build any application that uses the pcap library, install 'libpcap0.8-dev
- packet trace tools
- tcptrace (apt get install tcptrace)
- capinfos (to install, apt get install wireshark-common)
And other packages you might find helpful
- dos2unix
- Chrome: (if you need to remove an installation : sudo apt-get --purge remove google-chrome-stable
- Method 1: download from using .deb
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome-stable_current_amd64.deb
- Method 2: download from PPA
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- sudo apt-get update
- sudo apt-get install google-chrome-stable
To setup your VM so that it can be directly accessed from an outside Host:
host A ---- Network ------- HostOS---|----VM1
..................................................... Bridge ...........
The network effectively is as shown below. In the VM Machine setup, change Network from NAT to Bridge. By default, it requires a DHCP server to provide an IP address.
10/12/2016