Skip to content

TUTORIAL: Libvirt Host Fedora22

vlj91 edited this page Sep 18, 2015 · 6 revisions

#Fedora 22 Libvirt Host

Guide to building OpenStack ready images using a Fedora 22 libvirt host in an OpenStack environment.

##Prerequisites

  1. OpenStack Environment Access
  2. OpenStack User Networking Setup

##Fedora 22 Libvirt Host - OpenStack Compute Instance

###Creating a Fedora 22 OpenStack Compute Instance To begin creating the Fedora 22 OpenStack compute 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 Fedora 22 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 -> Fedora22
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 Fedora 22 build instance with the following:


nova boot VM-NAME \
--flavor 3 \
--image Fedora22  \
--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

###Fedora 22 Libvirt Host Preperation

#### Preparing via command-line

The following packages are required to begin building the OpenStack image:


$ sudo dnf update -y

$ sudo dnf groupinstall -y 'virtualization'

$ sudo dnf install -y libguestfs libguestfs-tools virt-manager libvirt

$ systemctl restart libvirtd


Clone this wiki locally