Deploy and Launch Virtual Machines in OpenStack
Deploy and Launch Virtual Machines in OpenStack
Machines in OpenStack
In this guide we will learn how to create images and launch an instance of an image
(virtual machine) in OpenStack and how to gain control over an instance via SSH.
Choose external Pool and hit on Allocate IP button and the IP address should appear
in dashboard. It’s a good idea to allocate a Floating IP for each instance you run.
Once you have installed the OS, just convert the file to raw and upload it to your
OpenStack cloud infrastructure.
To deploy official images provided by major Linux distributions use the following
links to download the latest packaged images:
1. CentOS 7 – http://cloud.centos.org/centos/7/images/
2. CentOS 6 – http://cloud.centos.org/centos/6/images/
3. Fedora
23 – https://download.fedoraproject.org/pub/fedora/linux/releases/23/
Cloud/
4. Ubuntu – http://cloud-images.ubuntu.com/
5. Debian – http://cdimage.debian.org/cdimage/openstack/current/
6. Windows Server 2012 R2 – https://cloudbase.it/windows-cloud-
images/#download
Official images additionally contain the cloud-init package which is responsible with
SSH key pair and user data injection.
On this guide we’ll deploy a test image, for demonstration purposes, based on a
lightweight Cirros cloud image which can be obtained by visiting the following
link http://download.cirros-cloud.net/0.3.4/.
The image file can be used directly from the HTTP link or downloaded locally on
your machine and uploaded to OpenStack cloud.
To create an image, go OpenStack web panel and navigate to Project -> Compute -
> Images and hit on Create Image button. On the image prompt use the following
settings and hit on Create Image when done.
Name: tecmint-test
Image Source: Image Location #Use Image File if you’ve downloaded the file
locally on your hard disk
Public: unchecked
Protected: unchecked
OpenStack Images
Move to Project -> Instances and hit on Launch Instance button and a new window
will appear.
Launch Image Instance in Openstack
4. On the first screen add a name for your instance, leave the Availability Zone to
nova, use one instance count and hit on Next button to continue.
Choose a descriptive Instance Name for your instance because this name will be used
to form the virtual machine hostname.
Select one of the floating IP created earlier and hit on Associate button in order to
make the instance reachable from your internal LAN.
Add Associate Floating IP to OpenStack Instance
Use the instance View Log utility to obtain Cirros default credentials as illustrated on
the below screenshots.
To solve this issue, first stop the instance and go to Project -> Network -
> Networks and edit the proper subnet by hitting the Subnet Details button.
Add the required DNS name servers, save the configuration, start and connect to the
instance console to test if the new configuration has been applied by pinging a domain
name. Use the following screenshots as a guide.
Shutdown Instance
Modify Instance Network Subnet
# vi /etc/nova/nova.conf
ram_allocation_ratio=3.0
Configure Physical Resources in Nova Configuration