- Setup a ubuntu virtual machine in 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.
- Download and install Oracle Virtualbox from https://www.virtualbox.org/wiki/Downloads .
- Open Virtualbox .
- Click “New” button to create new virtual Machine .
- Give a name to the virtual machine. Select Type as “Linux” and version “Ubuntu (64 bit)” .
- Select memory(RAM) as 1GB .
- Press Next with default option on “Create a new virtual hard drive now” .
- Select disk type as “VMDK” which is also compatible with Vmware Workstation.
- 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.
- Allocate the disk space . I have selected 32GB to be the vm disk space.
- 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.
Step 2 : Installing ubuntu 12.04 inside Virtualbox virtual machine.
- Download Ubuntu server 12.04 LTS iso from http://www.ubuntu.com/download/server .
- Power on the vm and select “Choose a virtual CD/DVD disk file” from “Devices->CD/DVD Devices”.
- Attach the download iso to the VM and reset the VM from “Machine->Reset”.
- VM will boot with the attached ISO. Select “English” as language.
- select “Install Ubuntu Server” .
- Select installation language as “English” .
- Select your country.
- Configure your keyboard Layout.
- Enter the hostname. This will be name of the system.
- Create user for accessing the machine as a non root user .
- Configure system clock.
- Partition the disk. Use default options.
- Configure the proxy if your network is behind a proxy server.
- Select update policy.
- Install “OpenSSH server” with the OS so that we can directly login via ssh. Press space to select the option.
- Install GRUB boot loader.
- Ubuntu installation is now complete.
- Ubuntu vm is ready to use now. Login with the user created above.
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
- Add a second NIC to the VM.
- Power Off the Virtual Machine
- Right Click on the VM and select settings
- In the Network Section select Adapter 2 tab
- Select “Attached to:” to internal
- Power On the VM
- When the VM boots up configure to network for second NIC
- Edit /etc/network/interfaces to something like
- Restart Network service
service networking restart
- You can verify your network setting using “ ifconfig ”
Deploying Openstack
- Login to the ubuntu VM.
- Change the user to root.
sudo -i
- If your network is behind proxy then please export proxy variables.
export http_proxy=<proxy-server>
export https_proxy=<proxy-server>
export no_proxy=”localhost,127.0.0.1″
export https_proxy=<proxy-server>
export no_proxy=”localhost,127.0.0.1″
- Install git on the machine
apt-get update -y
apt-get install git -y
git clone https://github.com/ilearnstack/cloudgear.git
- Execute the script to set up openstack
cd cloudgear/
python cloudgear.py
python cloudgear.py
- Open Openstack Dashboard in browser from URL http://<controller-ip>/horizon
- Login with credentials admin/secret
- Add a image into Glance
- Create Network for Virtual Machines.
- Create subnet for the network created above.
- Launch a instance from the Project Tab , Instances page.
- Once VM is successfully spawned it will show as ACTIVE in Instances page.
- Select Console tab to view VM console.
0 comments:
Post a Comment