Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

THIS PAGE IS UNDER CONSTRUCTION

Get Ubuntu

Get the Ubuntu ISO image from ubuntu.com. The recommended version is 16.04 LTS (Long Term Support).  You can use the server or desktop edition.  I used the server edition.

Get VirtualBox Guest Additions

Make sure you have the VirtualBox Guest Additions ISO for your version of VirtualBox.  I'm using VirtualBox 5.0.16.  Save the Guest Additions ISO on your host computer along with the Ubuntu ISO.  Get the Guest Additions ISO from here:

http://download.virtualbox.org/virtualbox

Create a new VM in VirtualBox for Ubuntu

Type: Linux

Version: Ubuntu (64-bit)

At least 2048 MB memory

At least 40 GB VDI

Network: Attached to: NAT

Create a port-forwarding rule for SSH

Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM.

Go to "Network" settings in VirtualBox, add a port forwarding rule:

Name: SSH

Protocol: TCP

Host IP: 127.0.0.1

Host Port: 1022

Guest IP: <leave blank>


Create Shared Folder

This is for Windows users.  If you're using a MAC or a Linux host, things may be quite different.  The shared folder allows you to easily transfer files between the guest VM and the host computer.

Go to "Shared Folders" settings in VirtualBox, add a share:

Folder Path: C:\Users

Folder Name: Users

Auto-mount: <checked>

Read-only: <unchecked>


Install Ubuntu in the VM

On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image".  Select your Ubuntu ISO image.

After selecting the image, start the VM.

Proxy Configuration (optional)

If you're behind a corporate firewall, configure some proxy settings.  The examples here show a username and password in the proxy URL.  You can omit them if your proxy server doesn't require them.

Ubuntu system proxy setting:

System Settings → Network → Network proxy

apt proxy setting:

Edit /etc/apt/apt.conf and add one line at the top:

Acquire::http::Proxy "http://username:password@proxyhost:port";

Install SSH Server

sudo apt update

sudo apt install openssh-server

Connect to the VM from your host computer

The PuTTY SSH client is popular.  A connection to localhost:1022 will go to the VM.

Install VirtualBox Guest Additions

On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image".  Select your VirtualBox Guest Additions ISO image.

In a terminal window on the VM:

Get a root shell:

sudo bash

Mount the cdrom:

mkdir -p /media/cdrom

mount /dev/cdrom /media/cdrom

Install necessary dependencies:

apt update

apt install gcc g++ dkms linux-headers-generic

Install the guest additions:

cd /media/cdrom

./VBoxLinuxAdditions.run



Create Shared Folder

This is for Windows users.  If you're using a MAC or a Linux host, things may be quite different.  The shared folder allows you to easily transfer files between the guest VM and the host computer.


  • No labels