Repository navigation
TUTORIAL: Libvirt Host Ubuntu14
#Ubuntu 14 Libvirt Host Guide to building OpenStack ready images using a Ubuntu 14 libvirt host in an OpenStack environment.
##Prerequisites
##Ubuntu 14 Libvirt Host - OpenStack Compute Instance
###Creating a Ubuntu 14 OpenStack Compute Instance To begin creating the Ubuntu 14 Nova instance to build OpenStack ready images, log in to the preferred method of creating OpenStack instances (Horizon GUI or CLI).
####
Creating via Horizon
To begin creating a libvirt build host, navigate to the Compute -> Instances tab within Horizon, then click the Launch Instance button.
Several options are available, we have included our recommended settings for creating a Ubuntu 14 libvirt host:
| Option | Recommended Setting |
|---|---|
Details -> Availability Zone |
regionOne |
Details -> Instance Name |
User preference - sets hostname of instance |
Details -> Flavor |
m1.medium |
Details -> Instance Count |
1 |
Details -> Instance Boot Source |
Boot from image -> Ubuntu14 |
Access & Security -> Key Pair |
Select Nova keypair to insert to instance |
Access & Security -> Security Groups |
Select Neutron Security Groups to use, to access via SSH ensure a security group with incoming port 22 (SSH) enabled |
Networking -> Selected Networks |
Select which networks to use |
Post-Creation -> Customization Script Source |
Blank, or provide cloud-init for automated setup |
Advanced Options -> Disk Partition |
Automatic |
Once the instance has started booting, assign a Floating IP address
####
Creating via CLI
SSH to the login node of the OpenStack environment using the provided credentials, and source the appropriate OpenStack RC file to begin using OpenStack services (e.g. . OpenStackRC.sh.
If no RC file is available, please contact your system administrator for assistance with obtaining the appropraite OpenStack RC file.
Once appropriate OpenStack networking features have been set up, we can create our Ubuntu 14 build instance with the following:
nova boot VM-NAME \
--flavor 3 \
--image Ubuntu14 \
--key-name KeystoneKeyPair appropriate keypair previously created \
--nic net-id=NETWORKID # use the unique network ID through neutron net-list\
--security-groups SECGROUP1,SECGROUP2 # security groups required
###Ubuntu 14 Libvirt Host Preperation
####
Preparing via command-line
The following packages are required to begin building the OpenStack image:
$ sudo apt-get update -y
$ sudo apt-get install -y qemu-system qemu-kvm kvm libvirt-bin virt-manager virt-viewer libguestfs-tools
####Cloud-init
The following can be provided as cloud-init input to customize the image with the required packages. Cloud-init can be provided through the Horizon User customisation setting, or through the nova boot command with the --user-data /path/to/cloudinit option.
#cloud-config
package_upgrade: true
packages:
- kvm
- qemu-kvm
- qemu-system
- libvirt-bin
- virt-manager
- virt-viewer
- libguestfs-tools
Copyright (c) 2008-2015 Alces Software Ltd