Setting up Ubuntu virtual machine in Oracle Virtualbox

VirtualBox is a free virtualization software offered by oracle for running virtual machines inside it. We are going to walk through creating a virtual machine inside virtualbox and installing Ubuntu server 12.04 LTS (Precise Pangolin) which comes with Openstack Folsom release .

Step 1: Creating a new virtual machine in virtulbox.

  1. Download and install Oracle Virtualbox from https://www.virtualbox.org/wiki/Downloads .
  2. Open Virtualbox .
  3. Click “New” button to create new virtual Machine .
  4. Give a name to the virtual machine. Select Type as “Linux” and version “Ubuntu (64 bit)” .1
  5. Select memory(RAM) as 1GB .select ram
  6. Press Next with default option on “Create a new virtual hard drive now” .create_vdisk
  7. Select disk type as “VMDK” which is also compatible with Vmware Workstation.createvdisk2
  8. Select “Dynamically allocated” option which will allocate the space as and when data is created.If you select the option “Fixed size”, it will allocate the total disk space at once. createvdisk3
  9. Allocate the disk space . I have selected 32GB to be the vm disk space. createvdisk4
  10. VM is created now, but it does not have any operating system installed inside it. We will now install ubuntu 12.04 inside this newly created virtual machine.vmcreated

Step 2 : Installing ubuntu 12.04 inside Virtualbox virtual machine.

  1. Download Ubuntu server 12.04 LTS iso from http://www.ubuntu.com/download/server .
  2. Power on the vm and select “Choose a virtual CD/DVD disk file” from “Devices->CD/DVD Devices”.8
  3. Attach the download iso to the VM and reset the VM from “Machine->Reset”.
  4. VM will boot with the attached ISO. Select “English” as language.10
  5. select “Install Ubuntu Server” .11
  6. Select installation language as “English” .12
  7. Select your country.13
  8. Configure your keyboard Layout. 141516
  9. Enter the hostname. This will be name of the system.17
  10. Create user for accessing the machine as a non root user .18 19 20 21
  11. Configure system clock.22
  12. Partition the disk. Use default options.2324252627
  13. Configure the proxy if your network is behind a proxy server.28
  14. Select update policy.29
  15. Install “OpenSSH server” with the OS so that we can directly login via ssh. Press space to select the option.30
  16. Install GRUB boot loader. 31
  17. Ubuntu installation is now complete.32
  18. Ubuntu vm is ready to use now. Login with the user created above.33

Note  :  If you cannot ping/ssh to the VM from the Host Machine then change the Network Settings to “Bridged Adapter”

  • Power Off the Virtual Machine
  • Right Click on the VM and select settings
  • Select “Attached to:” to Bridged Adapter
  • Power On the VM
Advertisements

7 Responses to Setting up Ubuntu virtual machine in Oracle Virtualbox

  1. Pingback: Setting up a Single Node Openstack Environment | iLearnStack

  2. Dinesh Hakande says:

    nice explanation. Very resourceful indeed.

  3. sayaksaha says:

    Brief and to the point article. A must to have in the bookmarks !!

  4. Rads says:

    Thank you very much for the instructions!

  5. sri says:

    I have a question at step 16, creating grub boot. While creating grub boot, will it overwrite my existing master windows 7 bootable? i skiped step 16, how do i boot ubuntu in virtualbox. is there any way to create grub boot again.

  6. kalai says:

    User friendly, clear explanation

  7. ServerON says:

    So neat. Now these people should be awarded.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: