Deploying Openstack With Multiple Hypervisors
Deploying Openstack With Multiple Hypervisors
Deploying Openstack With Multiple Hypervisors
With Openstack gaining lot of momentum, each of its release is able to address some unanswered
questions. One of the many questions that enterprises or service providers ask is Can Openstack
work on Multi-hypervisor?
Answer is YES. It DOES!
Before jumping right on how to set multi-hypervisor environment using Openstack, one should know
what is multi-hypervisor environment?
KVM Kernel-based Virtual Machine. The virtual disk formats that it supports is inherited
from QEMU since it uses a modified QEMU program to launch the virtual machine. The
supported formats include raw images, the qcow2, and VMware formats.
LXC Linux Containers (through libvirt), use to run Linux-based virtual machines.
UML User Mode Linux, generally only use for development purposes.
VMware vSphere 4.1 update 1 and newer, runs VMware-based Linux and Windows images
through a connection with a vCenter server or directly with an ESXi host.
Xen XenServer, Xen Cloud Platform (XCP), used to run Linux or Windows virtual
machines. You must install the nova-compute service in a para-virtualized VM.
Hyper-V Server virtualization with Microsofts Hyper-V, use to run Windows, Linux, and
FreeBSD virtual machines. Runs nova-compute natively on the Windows virtualization
platform.
Ironic Not a hypervisor in the traditional sense, this driver provisions physical hardware
through pluggable sub-drivers (for example, PXE for image deployment, and IPMI for power
management).
As the figure shows, VMware vCenter cannot be added directly to the Openstack environment. We
need to have separate compute-node dedicatedly for each VMware vCenter environment. You may
have any number of ESXI host added in the single vCenter. If you want to add two different vCenter
environments, you need two compute-node with VMware vCenter driver in it. Since, a VMware
vCenter driver in compute-node can manage only one vCenter environment at a time.
The VMware vCenter driver enables the nova-compute service to communicate with a VMware
vCenter server that manages one or more ESX host clusters. The driver aggregates the ESX hosts
in each cluster to present one large hypervisor entity for each cluster to the Compute scheduler.
Because individual ESX hosts are not exposed to the scheduler, Compute schedules to the
granularity of clusters and vCenter uses DRS to select the actual ESX host within the cluster. When
a virtual machine makes its way into a vCenter cluster, it can use all vSphere features. The VMware
vCenter driver also interacts with the OpenStack Image Service to copy VMDK images from the
Image Service back end store.
Unlike Linux kernel based hypervisors, such as KVM, vSphere with vCenter on OpenStack
requires a separate vCenter Server host and the VM instances to be hosted in an ESXi
cluster run on ESXi hosts distinct from a Nova compute node. In contrast, VM instances
running on KVM can be hosted directly on a Nova compute node.
Although a single OpenStack installation can support multiple hypervisors, each compute
node will support only one hypervisor. Hence, multi-hypervisor OpenStack cloud requires at
least one compute node for each hypervisor type.
Configuration overview
Prerequisites and limitations
Use the following list to prepare a vSphere environment that runs with the VMware vCenter driver:
1. DRS: For any cluster that contains multiple ESX hosts, enable DRS and enable fully
automated placement.
2. Shared storage: Only shared storage is supported and data stores must be shared among
all hosts in a cluster. It is recommended to remove data stores not intended for OpenStack
from clusters being configured for OpenStack.
3. Clusters and data stores: Do not use OpenStack clusters and data stores for other
purposes. If you do, OpenStack displays incorrect usage information.
4. Networking: The VMware driver supports networking with the nova-network service or the
OpenStack Networking(neutron) Service, Depending on your installation.
Lets take nova-network. Follow the below configuration settings:
[DEFAULT]
compute_driver=vmwareapi.VMwareVCDriver
[vmware]
host_ip=
host_username=
host_password=
cluster_name=
datastore_regex=
wsdl_location=file:///vmware-sdk/SDK/vsphere-ws/wsdl/vim25/vimService.wsdl
#(optional)
3. (optional) Mirror WSDL from vCenter : It is not necessary to add wsdl location path while
using Vcenter 5.1 or later but In some cases it will not work. So you may need to add WSDL
entry in VMwareVCDriver configuration of nova.conf file.
Download VMware vSphere Web Services SDK from VMware and unzip it in /vmwaresdk on novavmware1, then referencing it in nova.conf file
as wsdl_location=file:///vmware-sdk/SDK/vsphere-ws/wsdl/vim25/vimService.wsdl
5. Dont forget to add all other common entries like database path, AMQP credintials, VNC
details, authtoken details,etc into the nova.conf file.
1. You must have ubuntu cloud image that work in KVM hypervisor. So lets convert the qcow2
Ubuntu cloud image into VMDK format that can be used in VMware ESXI host.
$ qemu-img convert -f qcow2 /Downloads/ubuntu.img -O vmdk ubuntu.vmdk
2. VMDK disks converted through qemu-img are always monolithic sparse VMDK disks.
$ glance image-create name ubuntu is-public=True container-format=bare diskformat=vmdk property vmware-disktype=sparse property vmware-adaptertype=lsiLogic
property hypervisor_type=vmware < ubuntu.vmdk
Note:
In a multi-hypervisor environment, OpenStack Compute uses the hypervisor_type tag to match
images to the correct hypervisor type. For VMware images, set the hypervisor type to vmware. Other
valid hypervisor types include: xen, qemu, kvm, lxc, uml, and hyperv.
Now, your multi-hypervisor Openstack environment is all set .
Log On to Openstack horizon and choose the right glance image with respective to the hypervisor
you want to run the VM and launch the instance.