Migrate Instances and Images Guide
Migrate Instances and Images Guide
OpenStack Team
[email protected]
Legal Notice
Copyright © 2020 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is
available at
http://creativecommons.org/licenses/by-sa/3.0/
. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must
provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,
Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift,
Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States
and other countries.
Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and
other countries.
Node.js ® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the
official Joyent Node.js open source or commercial project.
The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks
or trademarks/service marks of the OpenStack Foundation, in the United States and other
countries and are used with the OpenStack Foundation's permission. We are not affiliated with,
endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
Abstract
The Instances and Images guide provides procedures for the management of instances, images of a
Red Hat OpenStack Platform environment.
Table of Contents
Table of Contents
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6. . . . . . . . . . . . .
PREFACE
.CHAPTER
. . . . . . . . . . 1.. .IMAGE
. . . . . . . SERVICE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7. . . . . . . . . . . . .
1.1. UNDERSTANDING THE IMAGE SERVICE 7
1.1.1. Image Signing and Verification 7
1.1.2. Image conversion 8
1.1.3. Image Introspection 8
1.1.4. Interoperable Image Import 9
1.1.5. Improving scalability with Image service caching 9
1.1.6. Image pre-caching 10
1.1.6.1. Configuring the default interval for periodic image pre-caching 10
1.1.6.2. Using a periodic job to pre-cache an image 10
1.2. MANAGE IMAGES 13
1.2.1. Creating an Image 13
1.2.1.1. Use a KVM Guest Image With Red Hat OpenStack Platform 13
1.2.1.2. Create Custom Red Hat Enterprise Linux or Windows Images 14
1.2.1.2.1. Create a Red Hat Enterprise Linux 7 Image 15
1.2.1.2.2. Create a Red Hat Enterprise Linux 6 Image 20
1.2.1.2.3. Create a Windows Image 25
1.2.1.3. Use libosinfo 26
1.2.2. Upload an Image 26
1.2.3. Update an Image 27
1.2.4. Import an Image 28
1.2.4.1. Import from a Remote URI 28
1.2.4.2. Import from a Local Volume 28
1.2.5. Delete an Image 29
1.2.6. Hide or Unhide an Image 29
1.2.7. Show Hidden Images 30
1.2.8. Enabling image conversion 30
1.2.9. Converting an image to RAW format 30
1.2.9.1. Configuring Image Service to accept RAW and ISO only 30
1.2.10. Storing an image in RAW format 31
.CHAPTER
. . . . . . . . . . 2.
. . CONFIGURING
. . . . . . . . . . . . . . . . THE
. . . . . COMPUTE
. . . . . . . . . . . .(NOVA)
. . . . . . . . SERVICE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
..............
2.1. CONFIGURING MEMORY FOR OVERALLOCATION 33
2.2. CALCULATING RESERVED HOST MEMORY ON COMPUTE NODES 33
2.3. CALCULATING SWAP SIZE 34
.CHAPTER
. . . . . . . . . . 3.
. . CONFIGURE
. . . . . . . . . . . . . .OPENSTACK
. . . . . . . . . . . . . .COMPUTE
. . . . . . . . . . .STORAGE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
..............
3.1. ARCHITECTURE OVERVIEW 35
3.2. CONFIGURATION 36
.CHAPTER
. . . . . . . . . . 4.
. . .VIRTUAL
. . . . . . . . . MACHINE
. . . . . . . . . . .INSTANCES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
..............
4.1. MANAGE INSTANCES 39
4.1.1. Add Components 39
4.1.2. Launch an Instance 39
4.1.2.1. Launch Instance Options 40
4.1.3. Update an Instance (Actions menu) 41
4.1.4. Resize an Instance 43
4.1.5. Connect to an Instance 43
4.1.5.1. Access an Instance Console using the Dashboard 44
4.1.5.2. Directly Connect to a VNC Console 44
1
Red Hat OpenStack Platform 16.0 Instances and Images Guide
2
Table of Contents
. . . . . . . . . . . 5.
CHAPTER . . MIGRATING
. . . . . . . . . . . . . VIRTUAL
. . . . . . . . . .MACHINE
. . . . . . . . . . .INSTANCES
. . . . . . . . . . . . BETWEEN
. . . . . . . . . . . COMPUTE
. . . . . . . . . . . .NODES
. . . . . . . . . . . . . . . . . . . . . . . . . .76
..............
5.1. MIGRATION TYPES 76
5.2. MIGRATION CONSTRAINTS 78
5.3. PREPARING TO MIGRATE 79
5.4. COLD MIGRATING AN INSTANCE 80
5.5. LIVE MIGRATING AN INSTANCE 81
5.6. CHECKING MIGRATION STATUS 82
5.7. EVACUATING AN INSTANCE 83
5.7.1. Evacuating one instance 83
5.7.2. Evacuating all instances on a host 84
5.7.3. Configuring shared storage 85
5.8. TROUBLESHOOTING MIGRATION 86
5.8.1. Errors during migration 86
5.8.2. Never-ending live migration 87
5.8.3. Instance performance degrades after migration 88
. . . . . . . . . . . 6.
CHAPTER . . .SCALING
. . . . . . . . . .DEPLOYMENTS
. . . . . . . . . . . . . . . . .WITH
. . . . . .COMPUTE
. . . . . . . . . . .CELLS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
..............
6.1. CELL COMPONENTS 89
6.2. CELL DEPLOYMENTS ARCHITECTURE 90
6.3. CONSIDERATIONS FOR MULTI-CELL DEPLOYMENTS 91
6.4. DEPLOYING A MULTI-CELL OVERCLOUD 93
6.5. CREATING AND PROVISIONING A CELL 98
6.6. ADDING COMPUTE NODES TO A CELL 100
6.7. CONFIGURING AN AVAILABILITY ZONE 100
6.8. DELETING A COMPUTE NODE FROM A CELL 101
6.9. DELETING A CELL 101
.CHAPTER
. . . . . . . . . . 7.
. . CONFIGURING
. . . . . . . . . . . . . . . . COMPUTE
. . . . . . . . . . . .NODES
. . . . . . . .FOR
. . . . .PERFORMANCE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
...............
7.1. CONFIGURING CPU PINNING ON THE COMPUTE NODE 103
7.1.1. Upgrading CPU pinning configuration 105
7.1.2. Launching an instance with CPU pinning 105
7.1.3. Launching a floating instance 106
7.2. CONFIGURING HUGE PAGES ON THE COMPUTE NODE 106
7.2.1. Allocating huge pages to instances 108
. . . . . . . . . . . 8.
CHAPTER . . .CONFIGURING
. . . . . . . . . . . . . . . VIRTUAL
. . . . . . . . . . GPUS
. . . . . . .FOR
. . . . .INSTANCES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
...............
8.1. SUPPORTED CONFIGURATIONS AND LIMITATIONS 110
8.2. CONFIGURING VGPU ON THE COMPUTE NODES 110
8.2.1. Building a custom GPU overcloud image 111
8.2.2. Designating Compute nodes for vGPU 112
8.2.3. Configuring the Compute node for vGPU and deploying the overcloud 115
8.3. CREATING THE VGPU IMAGE AND FLAVOR 116
8.3.1. Creating a custom GPU instance image 116
8.3.2. Creating a vGPU flavor for instances 117
8.3.3. Launching a vGPU instance 118
8.4. ENABLING PCI PASSTHROUGH FOR A GPU DEVICE 118
. . . . . . . . . . . 9.
CHAPTER . . .CONFIGURING
. . . . . . . . . . . . . . . REAL-TIME
. . . . . . . . . . . . .COMPUTE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
...............
9.1. PREPARING YOUR COMPUTE NODES FOR REAL-TIME 122
9.2. DEPLOYING THE REAL-TIME COMPUTE ROLE 125
9.3. SAMPLE DEPLOYMENT AND TESTING SCENARIO 127
9.4. LAUNCHING AND TUNING REAL-TIME INSTANCES 129
. . . . . . . . . . . .A.
APPENDIX . . IMAGE
. . . . . . . .CONFIGURATION
. . . . . . . . . . . . . . . . . . .PARAMETERS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
..............
3
Red Hat OpenStack Platform 16.0 Instances and Images Guide
. . . . . . . . . . . .B.
APPENDIX . . ENABLING
. . . . . . . . . . . . THE
. . . . .LAUNCH
. . . . . . . . . .INSTANCE
. . . . . . . . . . .WIZARD
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
..............
4
Table of Contents
5
Red Hat OpenStack Platform 16.0 Instances and Images Guide
PREFACE
Red Hat OpenStack Platform (Red Hat OpenStack Platform) provides the foundation to build a private
or public Infrastructure-as-a-Service (IaaS) cloud on top of Red Hat Enterprise Linux. It offers a
massively scalable, fault-tolerant platform for the development of cloud-enabled workloads.
This guide discusses procedures for creating and managing images, and instances. It also mentions the
procedure for configuring the storage for instances for Red Hat OpenStack Platform.
You can manage the cloud using either the OpenStack dashboard or the command-line clients. Most
procedures can be carried out using either method; some of the more advanced procedures can only be
executed on the command line. This guide provides procedures for the dashboard where possible.
NOTE
For the complete suite of documentation for Red Hat OpenStack Platform, see Red Hat
OpenStack Platform Documentation Suite.
6
CHAPTER 1. IMAGE SERVICE
A virtual machine image is a file which contains a virtual disk which has a bootable operating system
installed on it. Virtual machine images are supported in different formats. The following formats are
available on Red Hat OpenStack Platform:
QCOW2 - Disk format supported by QEMU emulator. This format includes QCOW2v3
(sometimes referred to as QCOW3), which requires QEMU 1.1 or higher.
VDI - Disk format supported by VirtualBox virtual machine monitor and the QEMU emulator.
VHD - Common disk format used by virtual machine monitors from VMware, VirtualBox, and
others.
While ISO is not normally considered a virtual machine image format, since ISOs contain bootable
filesystems with an installed operating system, you can treat them the same as you treat other virtual
machine image files.
To download the official Red Hat Enterprise Linux cloud images, your account must have a valid Red Hat
Enterprise Linux subscription:
You will be prompted to enter your Red Hat account credentials if you are not logged in to the
Customer Portal.
Sign an image using your private key and upload the image, the signature, and a reference to
7
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Sign an image using your private key and upload the image, the signature, and a reference to
your public key certificate (the verification metadata). The Image service then verifies that the
signature is valid.
Create an image in the Compute service, have the Compute service sign the image, and upload
the image and its verification metadata. The Image service again verifies that the signature is
valid.
Request a signed image in the Compute service. The Image service provides the image and its
verification metadata, allowing the Compute service to validate the image before booting it.
For information on image signing and verification, refer to the Validate Glance Images chapter of the
Manage Secrets with OpenStack Key Manager Guide .
As part of the import workflow, a plugin provides the image conversion. This plugin can be activated or
deactivated based on the deployer configuration. Therefore, the deployer needs to specify the
preferred format of images for the deployment.
Internally, the Image service receives the bits of the image in a particular format. These bits are stored in
a temporary location. The plugin is then triggered to convert the image to the target format and moved
to a final destination. When the task is finished, the temporary location is deleted. As a result, the format
uploaded initially is not retained by the Image service.
For more information about image conversion, see Enabling image conversion.
NOTE
The conversion can be triggered only when importing an image. It does not run when
uploading an image. For example:
$ glance image-create-via-import \
--disk-format qcow2 \
--container-format bare \
--name NAME \
--visibility public \
--import-method web-download \
--uri http://server/image.qcow2
# Disk DescriptorFile
version=1
CID=d5a0bce5
parentCID=ffffffff
createType="streamOptimized"
8
CHAPTER 1. IMAGE SERVICE
# Extent description
RDONLY 209714 SPARSE "generated-stream.vmdk"
ddb.adapterType = "buslogic"
ddb.geometry.cylinders = "102"
ddb.geometry.heads = "64"
ddb.geometry.sectors = "32"
ddb.virtualHWVersion = "4"
By introspecting this vmdk, you can easily know that the disk_type is streamOptimized, and the
adapter_type is buslogic. These metadata parameters are useful for the consumer of the image. In
Compute, the workflow to instantiate a streamOptimized disk is different from the one to instantiate a
flat disk. This new feature allows metadata extraction. You can achieve image introspection by calling
the task API while importing the image. An administrator can override metadata settings.
To configure Image service caching with the Red Hat OpenStack Platform director (tripleo) heat
templates, complete the following steps:
Procedure
1. In an environment file, set the value of the GlanceCacheEnabled parameter to true, which
automatically sets the flavor value to keystone+cachemanagement in the glance-api.conf
heat template:
parameter_defaults:
GlanceCacheEnabled: true
2. Include the environment file in the openstack overcloud deploy command when you redeploy
the overcloud.
3. Optional: Tune the glance_cache_pruner to an alternative frequency when you redeploy the
overcloud. The following example shows a frequency of 5 minutes:
parameter_defaults:
ControllerExtraConfig:
glance::cache::pruner::minute: '*/5'
9
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Adjust the frequency according to your needs to avoid file system full scenarios. Include the
following elements when you choose an alternative frequency:
The size of the files that you want to cache in your environment.
Because the Red Hat OpenStack Platform director can now pre-cache images as part of the glance-api
service, you no longer require glance-registry to pre-cache images. The default periodic interval is 300
seconds. You can increase or decrease the default interval based on your requirements.
Procedure
1. Add a new interval with the ExtraConfig parameter in an environment file on the undercloud
according to your requirements:
parameter_defaults:
ControllerExtraConfig:
glance::config::glance_api_config:
DEFAULT/cache_prefetcher_interval:
value: '<300>'
Replace <300> with the number of seconds that you want as an interval to pre-cache images.
2. After you adjust the interval in the environment file in /home/stack/templates/, log in as the
stack user and deploy the configuration:
Replace <ENV_FILE> with the name of the environment file that contains the ExtraConfig
settings that you added.
IMPORTANT
If you passed any extra environment files when you created the overcloud, pass them
again here using the -e option to avoid making undesired changes to the overcloud.
For more information about the openstack overcloud deploy command, see Deployment command in
the Director Installation and Usage guide.
Prerequisite
10
CHAPTER 1. IMAGE SERVICE
To use a periodic job to pre-cache an image, you must use the glance-cache-manage command
connected directly to the node where the glance_api service is running. Do not use a proxy, which hides
the node that answers a service request. Because the undercloud might not have access to the network
where the glance_api service is running, run commands on the first overcloud node, which is called
controller-0 by default.
You are running the glance-cache-manage commands from inside the glance-api container.
1. Log in to the undercloud as the stack user and identify the provisioning IP address of
controller-0:
$ ssh stack@undercloud-0
[stack@undercloud-0 ~]$ source ~/overcloudrc
(overcloud) [stack@undercloud-0 ~]$ openstack server list -f value -c Name -c Networks
| grep controller
overcloud-controller-1 ctlplane=192.168.24.40
overcloud-controller-2 ctlplane=192.168.24.13
overcloud-controller-0 ctlplane=192.168.24.71
(overcloud) [stack@undercloud-0 ~]$
4. On controller-0 as the heat-admin user, identify the IP address of the glance_api service.
In the following example, the IP address is 172.25.1.105:
11
Red Hat OpenStack Platform 16.0 Instances and Images Guide
-e OS_PROJECT_NAME=$OS_PROJECT_NAME \
-e OS_USER_DOMAIN_NAME=$OS_USER_DOMAIN_NAME \
-e OS_PROJECT_DOMAIN_NAME=$OS_PROJECT_DOMAIN_NAME \
-e OS_NO_CACHE=$OS_NO_CACHE \
-e OS_CLOUDNAME=$OS_CLOUDNAME \
-e no_proxy=$no_proxy \
-e OS_AUTH_TYPE=$OS_AUTH_TYPE \
-e OS_PASSWORD=$OS_PASSWORD \
-e OS_AUTH_URL=$OS_AUTH_URL \
-e OS_IDENTITY_API_VERSION=$OS_IDENTITY_API_VERSION \
-e OS_COMPUTE_API_VERSION=$OS_COMPUTE_API_VERSION \
-e OS_IMAGE_API_VERSION=$OS_IMAGE_API_VERSION \
-e OS_VOLUME_API_VERSION=$OS_VOLUME_API_VERSION \
-e OS_REGION_NAME=$OS_REGION_NAME \
glance_api /bin/bash
6. Source the overcloudrc file and run the glance_pod.sh script to exec into the glance_api
container with the necessary environment variables to authenticate to the overcloud
Controller node.
7. Use a command such as glance image-list to verify that the container can run
authenticated commands against the overcloud.
Procedure
Replace <HOST-IP> with the IP address of the Controller node where the glance-api container
is running, and replace <IMAGE-ID> with the ID of the image that you want to queue. After you
queue images that you want to pre-cache, the cache_images periodic job prefetches all
queued images concurrently.
NOTE
Because the image cache is local to each node, if your Red Hat OpenStack
Platform is deployed with HA (with 3, 5, or 7 Controllers) then you must specify
the host address with the --host option when you run the glance-cache-manage
command.
12
CHAPTER 1. IMAGE SERVICE
2. Run the following command to view the images in the image cache:
WARNING
When you complete this procedure, remove the overcloudrc file from the
Controller node.
Related information
You can use additional glance-cache-manage commands for the following purposes:
list-queued to list all images that are currently queued for caching.
1.2.1.1. Use a KVM Guest Image With Red Hat OpenStack Platform
13
Red Hat OpenStack Platform 16.0 Instances and Images Guide
These images are configured with cloud-init and must take advantage of ec2-compatible metadata
services for provisioning SSH keys in order to function properly.
NOTE
The root account in the image is disabled, but sudo access is granted to a special
user named cloud-user.
For an OpenStack instance, it is recommended that you generate an ssh keypair from the OpenStack
dashboard or command line and use that key combination to perform an SSH public authentication to
the instance as root.
When the instance is launched, this public key will be injected to it. You can then authenticate using the
private key downloaded while creating the keypair.
If you do not want to use keypairs, you can use the admin password that has been set using the Inject an
admin Password Into an Instance procedure.
If you want to create custom Red Hat Enterprise Linux or Windows images, see Create a Red Hat
Enterprise Linux 7 Image, Create a Red Hat Enterprise Linux 6 Image , or Create a Windows Image .
Prerequisites:
Linux host machine to create an image. This can be any machine on which you can install and run
the Linux packages.
libvirt, virt-manager (run command dnf groupinstall -y @virtualization). This installs all
packages necessary for creating a guest operating system.
Libguestfs tools (run command dnf install -y libguestfs-tools-c). This installs a set of tools for
accessing and modifying virtual machine images.
A Red Hat Enterprise Linux 7 or 6 ISO file (see RHEL 7.2 Binary DVD or RHEL 6.8 Binary DVD )
or a Windows ISO file. If you do not have a Windows ISO file, visit the Microsoft TechNet
Evaluation Center and download an evaluation image.
Text editor, if you want to change the kickstart files (RHEL only).
IMPORTANT
14
CHAPTER 1. IMAGE SERVICE
IMPORTANT
NOTE
In the following procedures, all commands with the [root@host]# prompt should be run
on your host machine.
This section provides you with the steps to manually create an OpenStack-compatible image in the
QCOW2 format using a Red Hat Enterprise Linux 7 ISO file.
NOTE
If the instance does not launch automatically, run the virt-viewer command to
view the console:
a. At the initial Installer boot menu, choose the Install Red Hat Enterprise Linux 7.X option.
15
Red Hat OpenStack Platform 16.0 Instances and Images Guide
c. When prompted about which type of devices your installation uses, choose Auto-detected
installation media.
d. When prompted about which type of installation destination, choose Local Standard Disks.
16
CHAPTER 1. IMAGE SERVICE
d. When prompted about which type of installation destination, choose Local Standard Disks.
f. For network and host name, choose eth0 for network and choose a hostname for your
device. The default host name is localhost.localdomain.
17
Red Hat OpenStack Platform 16.0 Instances and Images Guide
3. After the installation is complete, reboot the instance and log in as the root user.
TYPE=Ethernet
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
NM_CONTROLLED=no
# dnf -y update
18
CHAPTER 1. IMAGE SERVICE
- resolv-conf
The resolv-conf option automatically configures the resolv.conf when an instance boots for
the first time. This file contains information related to the instance such as nameservers,
domain and other options.
10. Add the following line to /etc/sysconfig/network to avoid problems accessing the EC2
metadata service:
NOZEROCONF=yes
11. To ensure the console messages appear in the Log tab on the dashboard and the nova
console-log output, add the following boot option to the /etc/default/grub file:
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"
# grub2-mkconfig -o /boot/grub2/grub.cfg
12. Un-register the virtual machine so that the resulting image does not contain the same
subscription details for every instance cloned based on it:
# poweroff
14. Reset and clean the image using the virt-sysprep command so it can be used to create
instances without issues:
15. Reduce image size using the virt-sparsify command. This command converts any free space
within the disk image back to free space within the host:
19
Red Hat OpenStack Platform 16.0 Instances and Images Guide
This creates a new rhel7-cloud.qcow2 file in the location from where the command is run.
The rhel7-cloud.qcow2 image file is ready to be uploaded to the Image service. For more information
on uploading this image to your OpenStack deployment using the dashboard, see Upload an Image.
This section provides you with the steps to manually create an OpenStack-compatible image in the
QCOW2 format using a Red Hat Enterprise Linux 6 ISO file.
NOTE
If the instance does not launch automatically, run the virt-viewer command to
view the console:
a. At the initial Installer boot menu, choose the Install or upgrade an existing system option.
20
CHAPTER 1. IMAGE SERVICE
a. At the initial Installer boot menu, choose the Install or upgrade an existing system option.
c. When prompted about which type of devices your installation uses, choose Basic Storage
21
Red Hat OpenStack Platform 16.0 Instances and Images Guide
c. When prompted about which type of devices your installation uses, choose Basic Storage
Devices.
d. Choose a hostname for your device. The default host name is localhost.localdomain.
22
CHAPTER 1. IMAGE SERVICE
h. The installation process completes and Congratulations, your Red Hat Enterprise Linux
installation is complete screen appears.
TYPE=Ethernet
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
NM_CONTROLLED=no
# dnf -y update
23
Red Hat OpenStack Platform 16.0 Instances and Images Guide
- resolv-conf
The resolv-conf option automatically configures the resolv.conf configuration file when an
instance boots for the first time. This file contains information related to the instance such as
nameservers, domain, and other options.
11. Add the following line to /etc/sysconfig/network to avoid problems accessing the EC2
metadata service:
NOZEROCONF=yes
12. To ensure the console messages appear in the Log tab on the dashboard and the nova
console-log output, add the following boot option to the /etc/grub.conf:
console=tty0 console=ttyS0,115200n8
13. Un-register the virtual machine so that the resulting image does not contain the same
subscription details for every instance cloned based on it:
# poweroff
15. Reset and clean the image using the virt-sysprep command so it can be used to create
instances without issues:
16. Reduce image size using the virt-sparsify command. This command converts any free space
within the disk image back to free space within the host:
This creates a new rhel6-cloud.qcow2 file in the location from where the command is run.
NOTE
24
CHAPTER 1. IMAGE SERVICE
NOTE
You will need to manually resize the partitions of instances based on the image in
accordance with the disk space in the flavor that is applied to the instance.
The rhel6-cloud.qcow2 image file is ready to be uploaded to the Image service. For more information
on uploading this image to your OpenStack deployment using the dashboard, see Upload an Image
This section provides you with the steps to manually create an OpenStack-compatible image in the
QCOW2 format using a Windows ISO file.
NOTE
--disk path=filename,size=size
Replace filename with the name of the file which should store the guest image (and
optionally its path); for example path=win8.qcow2,size=8 creates an 8 GB file named
win8.qcow2 in the current working directory.
TIP
If the guest does not launch automatically, run the virt-viewer command to view the
console:
25
Red Hat OpenStack Platform 16.0 Instances and Images Guide
2. Installation of Windows systems is beyond the scope of this document. For instructions on how
to install Windows, see the relevant Microsoft documentation.
3. To allow the newly-installed Windows system to use the virtualized hardware, you might need to
install virtio drivers. To so do, first install the virtio-win package on the host system. This
package contains the virtio ISO image, which you must attach as a CD-ROM drive to the
Windows guest. To install the virtio-win package you must add the virtio ISO image to the
guest, and install the virtio drivers. See Installing KVM paravirtualized drivers for Windows virtual
machines in the Configuring and managing virtualization guide.
4. To complete the setup, download and execute Cloudbase-Init on the Windows system. At the
end of the installation of Cloudbase-Init, select the Run Sysprep and Shutdown check boxes.
The Sysprep tool makes the guest unique by generating an OS ID, which is used by certain
Microsoft services.
IMPORTANT
Red Hat does not provide technical support for Cloudbase-Init. If you encounter
an issue, contact Cloudbase Solutions .
When the Windows system shuts down, the name.qcow2 image file is ready to be uploaded to the Image
service. For more information on uploading this image to your OpenStack deployment using the
dashboard or the command line, see Upload an Image.
Image Service (glance) can process libosinfo data for images, making it easier to configure the optimal
virtual hardware for an instance. This can be done by adding the libosinfo-formatted operating system
name to the glance image.
As a result, Compute will supply virtual hardware optimized for rhel7.2 whenever an instance is
built using the 654dbfd5-5c01-411f-8599-a27bd344d79b image.
NOTE
3. Fill out the values, and click Create Image when finished.
26
CHAPTER 1. IMAGE SERVICE
Field Notes
Name Name for the image. The name must be unique within the project.
Image Source Image source: Image Location or Image File. Based on your selection, the
next field is displayed.
Select Image File option to upload an image from the local disk.
Architecture Image architecture. For example, use i686 for a 32-bit architecture or
x86_64 for a 64-bit architecture.
Minimum Disk (GB) Minimum disk size required to boot the image. If this field is not specified, the
default value is 0 (no minimum).
Minimum RAM (MB) Minimum memory size required to boot the image. If this field is not
specified, the default value is 0 (no minimum).
Public If selected, makes the image public to all users with access to the project.
Protected If selected, ensures only users with specific permissions can delete this
image.
When the image has been successfully uploaded, its status is changed to active, which indicates that the
image is available for use. Note that the Image service can handle even large images that take a long
time to upload — longer than the lifetime of the Identity service token which was used when the upload
was initiated. This is due to the fact that the Image service first creates a trust with the Identity service
so that a new token can be obtained and used when the upload is complete and the status of the image
is to be updated.
NOTE
You can also use the glance image-create command with the property option to upload
an image. More values are available on the command line. For a complete listing, see
Image Configuration Parameters.
NOTE
27
Red Hat OpenStack Platform 16.0 Instances and Images Guide
NOTE
The Edit Image option is available only when you log in as an admin user. When
you log in as a demo user, you have the option to Launch an instance or Create
Volume.
3. Update the fields and click Update Image when finished. You can update the following values -
name, description, kernel ID, ramdisk ID, architecture, format, minimum disk, minimum RAM,
public, protected.
5. Specify metadata by adding items from the left column to the right one. In the left column, there
are metadata definitions from the Image Service Metadata Catalog. Select Other to add
metadata with the key of your choice and click Save when finished.
NOTE
You can also use the glance image-update command with the property option to
update an image. More values are available on the command line; for a complete listing,
see Image Configuration Parameters.
Import methods are configured by the cloud administrator. Run the glance import-info command to list
available import options.
You can use the web-download method to copy an image from a remote URI.
2. You can monitor the image’s availability using the glance image-show <image-ID> command
where the ID is the one provided during image creation.
The Image service web-download method uses a two-stage process to perform the import. First, it
creates an image record. Second, it retrieves the image the specified URI. This method provides a more
secure way to import images than the deprecated copy-from method used in Image API v1.
The URI is subject to optional blacklist and whitelist filtering as described in the Advanced Overcloud
Customization Guide.
The Image Property Injection plugin may inject metadata properties to the image as described in the
Advanced Overcloud Customization Guide. These injected properties determine which compute nodes
the image instances are launched on.
The glance-direct method creates an image record, which generates an image ID. Once the image is
28
CHAPTER 1. IMAGE SERVICE
uploaded to the service from a local volume, it is stored in a staging area and is made active after it
passes any configured checks. The glance-direct method requires a shared staging area when used in a
highly available (HA) configuration.
NOTE
glance image-create
glance image-stage
glance image-import
You can use the glance image-create-via-import command to perform all three of these calls in one
command. In the example below, uppercase words should be replaced with the appropriate options.
Once the image moves from the staging area to the back end location, the image is listed. However, it
may take some time for the image to become active.
You can monitor the image’s availability using the glance image-show <image-ID> command where the
ID is the one provided during image creation.
2. Select the image you want to delete and click Delete Images.
To hide an image:
To create a hidden image, add the --hidden argument to the glance image-create command.
To unhide an image:
29
Red Hat OpenStack Platform 16.0 Instances and Images Guide
NOTE
Image conversion is automatically enabled when you use Red Hat Ceph Storage RBD to
store images and boot Nova instances.
To enable image conversion, create an environment file that contains the following parameter value and
include the new environment file with the -e option in the openstack overcloud deploy command:
parameter_defaults:
GlanceImageImportPlugins:'image_conversion'
When you upload a QCOW2 image and create a VM from it, the compute node downloads the image,
converts the image to RAW, and uploads it back into Ceph, which can then use it. This process affects
the time it takes to create VMs, especially during parallel VM creation.
For example, when you create multiple VMs simultaneously, uploading the converted image to the Ceph
cluster may impact already running workloads. The upload process can starve those workloads of IOPS
and impede storage responsiveness.
To boot VMs in Ceph more efficiently (ephemeral back end or boot from volume), the glance image
format must be RAW.
Converting an image to RAW may yield an image that is larger in size than the original QCOW2 image
file. Run the following command before the conversion to determine the final RAW image size:
qemu-img convert -p -f qcow2 -O raw <original qcow2 image>.qcow2 <new raw image>.raw
Optionally, to configure the Image Service to accept only RAW and ISO image formats, deploy using an
additional environment file that contains the following:
30
CHAPTER 1. IMAGE SERVICE
parameter_defaults:
ExtraConfig:
glance::config::api_config:
image_format/disk_formats:
value: "raw,iso"
$ glance image-create-via-import \
--disk-format qcow2 \
--container-format bare \
--name NAME \
--visibility public \
--import-method web-download \
--uri http://server/image.qcow2
For --name, replace NAME with the name of the image; this is the name that will appear in
glance image-list.
For --uri, replace http://server/image.qcow2 with the location and file name of the QCOW2
image.
NOTE
This command example creates the image record and imports it by using the web-
download method. The glance-api downloads the image from the --uri location during
the import process. If web-download is not available, glanceclient cannot automatically
download the image data. Run the glance import-info command to list the available
image import methods.
31
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Heat parameters - as detailed in the Compute (nova) Parameters section in the Overcloud
Parameters guide. For example:
parameter_defaults:
NovaSchedulerDefaultFilters:
AggregateInstanceExtraSpecsFilter,RetryFilter,ComputeFilter,ComputeCapabilitiesFilter,Image
PropertiesFilter
NovaNfsEnabled: true
NovaNfsShare: '192.0.2.254:/export/nova'
NovaNfsOptions: 'context=system_u:object_r:nfs_t:s0'
NovaNfsVersion: '4.2'
parameter_defaults:
ComputeExtraConfig:
nova::compute::force_raw_images: True
NOTE
Only use this method if an equivalent heat parameter does not exist.
Manual hieradata overrides - for customizing parameters when no heat or Puppet parameter
exists. For example, the following sets the disk_allocation_ratio in the [DEFAULT] section on
the Compute role:
parameter_defaults:
ComputeExtraConfig:
nova::config::nova_config:
DEFAULT/disk_allocation_ratio:
value: '2.0'
WARNING
TIP
32
CHAPTER 2. CONFIGURING THE COMPUTE (NOVA) SERVICE
TIP
Follow the guidance in Identifying Parameters to Modify to determine if a heat or Puppet parameter is
available for customizing a particular configuration.
See Parameters in the Advanced Overcloud Customization guide for further details on configuring
overcloud services.
NOTE
Prerequisites
You have calculated the swap size your node requires. For more information, see Section 2.3,
“Calculating swap size”.
Procedure
$ cp /usr/share/openstack-tripleo-heat-templates/environments/enable-swap.yaml
/home/stack/templates/enable-swap.yaml
2. Configure the swap size by adding the following parameters to your enable-swap.yaml file:
parameter_defaults:
swap_size_megabytes: <swap size in MB>
swap_path: <full path to location of swap, default: /swap>
3. To apply this configuration, add the enable_swap.yaml environment file to the stack with your
other environment files and deploy the overcloud:
The resources that run on the node, for instance, OSD consumes 3 GB of memory.
33
Red Hat OpenStack Platform 16.0 Instances and Images Guide
After you calculate the additional demands on memory, use the following formula to help you determine
the amount of memory to reserve for host processes on each node:
Replace avg_instance_size with the average amount of memory each instance can use.
Replace overhead with the hypervisor overhead required for each instance.
Replace resource_ram with the amount of RAM each resource of this type requires.
overcommit_ratio = NovaRAMAllocationRatio - 1
For instance, to use 25% of the available RAM for swap, with 64GB total RAM, and
NovaRAMAllocationRatio set to 1:
For information on how to calculate the NovaReservedHostMemory value, see Section 2.2,
“Calculating reserved host memory on Compute nodes”.
For information on how to determine the RHEL_min_swap value, see Recommended system swap
space in the RHEL Managing Storage Devices guide.
34
CHAPTER 3. CONFIGURE OPENSTACK COMPUTE STORAGE
Base image, which is a cached and formatted copy of the Image service image.
Instance disk, which is created using the libvirt base and is the back end for the virtual machine
instance. Instance disk data can be stored either in Compute’s ephemeral storage (using the
libvirt base) or in persistent storage (for example, using Block Storage).
The steps that Compute takes to create a virtual machine instance are:
In the diagram above, the #1 instance disk uses ephemeral storage; the #2 disk uses a block-storage
volume.
Ephemeral storage is an empty, unformatted, additional disk available to an instance. This storage value
is defined by the instance flavor. The value provided by the user must be less than or equal to the
ephemeral value defined for the flavor. The default value is 0, meaning no ephemeral storage is created.
The ephemeral disk appears in the same way as a plugged-in hard drive or thumb drive. It is available as
a block device which you can check using the lsblk command. You can format it, mount it, and use it
however you normally would a block device. There is no way to preserve or reference that disk beyond
the instance it is attached to.
Block storage volume is persistant storage available to an instance regardless of the state of the running
35
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Block storage volume is persistant storage available to an instance regardless of the state of the running
instance.
3.2. CONFIGURATION
You can configure performance tuning and security for your virtual disks by customizing the Compute
(nova) configuration files. Compute is configured in custom environment files and heat templates using
the parameters detailed in the Compute (nova) Parameters section in the Overcloud Parameters guide.
This configuration is generated and stored in the /var/lib/config-data/puppet-
generated/<nova_container>/etc/nova/nova.conf file, as detailed in the following table.
[DEFAULT] use_cow_ima Whether to use CoW (Copy on Write) images for true
ges libvirt instance disks (boolean):
36
CHAPTER 3. CONFIGURE OPENSTACK COMPUTE STORAGE
[DEFAULT] default_ephe The default format that is used for a new ext4
meral_format ephemeral volume. Value can be: ext2, ext3, or
ext4. The ext4 format provides much faster
initialization times than ext3 for new, large disks.
You can also override per instance using the
guest_format configuration option.
37
Red Hat OpenStack Platform 16.0 Instances and Images Guide
[DEFAULT] remove_unus How old an unused base image must be before 86400
ed_original_m being removed from the libvirt cache (see
inimum_age_ remove_unused_base_images).
seconds
[ libvirt] images_type Image type to use for libvirt instance disks default
(deprecates use_cow_images). Value can be:
raw, qcow2, lvm, rbd , or default. If default is
specified, the value used for the
use_cow_images parameter is used.
38
CHAPTER 4. VIRTUAL MACHINE INSTANCES
Red Hat OpenStack Platform allows you to easily manage virtual machine instances in the cloud. The
Compute service creates, schedules, and manages instances, and exposes this functionality to other
OpenStack components. This chapter discusses these procedures along with procedures to add
components like key pairs, security groups, host aggregates and flavors. The term instance is used by
OpenStack to mean a virtual machine instance.
This section discusses the procedures to add these components, create and manage an instance.
Managing an instance refers to updating, and logging in to an instance, viewing how the instances are
being used, resizing or deleting them.
2. Select Network > Networks, and ensure there is a private network to which you can attach the
new instance (to create a network, see Create a Network section in the Networking Guide).
3. Select Compute > Access & Security > Key Pairs, and ensure there is a key pair (to create a key
pair, see Section 4.2.1.1, “Create a Key Pair”).
4. Ensure that you have either an image or a volume that can be used as a boot source:
To view boot-source images, select the Images tab (to create an image, see Section 1.2.1,
“Creating an Image”).
To view boot-source volumes, select the Volumes tab (to create a volume, see Create a
Volume in the Storage Guide).
5. Select Compute > Access & Security > Security Groups, and ensure you have created a
security group rule (to create a security group, see Project Security Management in the Users
and Identity Management Guide).
NOTE
39
Red Hat OpenStack Platform 16.0 Instances and Images Guide
NOTE
By default, the Launch Instance form is used to launch instances. However, you can also
enable a Launch Instance wizard that simplifies the steps required. For more information,
see Appendix B, Enabling the Launch Instance Wizard .
3. Fill out the fields (those marked with '* ' are required), and click Launch.
One or more instances are created, and launched based on the options provided.
The following table outlines the options available when launching a new instance using the Launch
Instance form. The same options are also available in the Launch instance wizard.
Project and User Project Select the project from the dropdown list.
Details Availability Zone Zones are logical groupings of cloud resources in which your
instance can be placed. If you are unsure, use the default
zone (for more information, see Section 4.4, “Manage Host
Aggregates”).
Instance Boot Depending on the item selected, new fields are displayed
Source allowing you to select the source:
40
CHAPTER 4. VIRTUAL MACHINE INSTANCES
Access and Security Key Pair The specified key pair is injected into the instance and is
used to remotely access the instance using SSH (if neither a
direct login information or a static key pair is provided).
Usually one key pair per project is created.
Security Groups Security groups contain firewall rules which filter the type
and direction of the instance’s network traffic (for more
information on configuring groups, see Project Security
Management in the Users and Identity Management Guide).
Networking Selected Networks You must select at least one network. Instances are
typically assigned to a private network, and then later given
a floating IP address to enable external access.
Post-Creation Customization Script You can provide either a set of commands or a script file,
Source which will run after the instance is booted (for example, to
set the instance host name or a user password). If Direct
Input is selected, write your commands in the Script Data
field; otherwise, specify your script file.
NOTE
Advanced Options Disk Partition By default, the instance is built as a single partition and
dynamically resized as needed. However, you can choose to
manually configure the partitions yourself.
Action Description
41
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Action Description
Edit Security Groups Add and remove security groups to or from this
instance using the list of available security groups (for
more information on configuring groups, see Project
Security Management in the Users and Identity
Management Guide).
Pause/Resume Instance Immediately pause the instance (you are not asked
for confirmation); the state of the instance is stored
in memory (RAM).
Suspend/Resume Instance Immediately suspend the instance (you are not asked
for confirmation); like hibernation, the state of the
instance is kept on disk.
42
CHAPTER 4. VIRTUAL MACHINE INSTANCES
Action Description
Terminate Instance Permanently destroy the instance (you are asked for
confirmation).
You can create and allocate an external IP address, see Section 4.2.3, “Create, Assign, and Release
Floating IP Addresses”
1. Ensure communication between hosts by setting up each host with SSH key authentication so
that Compute can use SSH to move disks to other hosts (for example, compute nodes can
share the same SSH key).
NOTE
6. If you want to manually partition the instance when it launches (results in a faster build time):
7. Click Resize.
43
Red Hat OpenStack Platform 16.0 Instances and Images Guide
The console allows you a way to directly access your instance within the dashboard.
3. Log in using the image’s user name and password (for example, a CirrOS image uses
cirros/cubswin:)).
You can directly access an instance’s VNC console using a URL returned by nova get-vnc-console
command.
Browser
To obtain a browser URL, use:
Java Client
To obtain a Java-client URL, use:
NOTE
44
CHAPTER 4. VIRTUAL MACHINE INSTANCES
NOTE
This tool is provided only for customer convenience, and is not officially supported by Red
Hat.
Per Project
To view instance usage per project, select Project > Compute > Overview. A usage summary is
immediately displayed for all project instances.
You can also view statistics for a specific period of time by specifying the date range and
clicking Submit.
Per Hypervisor
If logged in as an administrator, you can also view information for all projects. Click Admin >
System and select one of the tabs. For example, the Resource Usage tab offers a way to view
reports for a distinct time period. You might also click Hypervisors to view your current vCPU,
memory, or disk statistics.
NOTE
The vCPU Usage value (x of y) reflects the number of total vCPUs of all virtual
machines (x) and the total number of hypervisor cores (y).
NOTE
Deleting an instance does not delete its attached volumes; you must do this separately
(see Delete a Volume in the Storage Guide).
45
Red Hat OpenStack Platform 16.0 Instances and Images Guide
1. Click the check boxes in the first column for the instances that you want to start. If you want to
select all of the instances, click the check box in the first row in the table.
2. Click More Actions above the table and select Start Instances.
Similarly, you can shut off or soft reboot multiple instances by selecting the respective actions.
For information on managing security groups, see Project Security Management in the Users and
Identity Management Guide.
1. In the dashboard, select Project > Compute > Access & Security.
3. Specify a name in the Key Pair Name field, and click Create Key Pair.
When the key pair is created, a key pair file is automatically downloaded through the browser. Save this
file for later connections from external machines. For command-line SSH connections, you can load this
file into SSH by executing:
# ssh-add ~/.ssh/os-key.pem
1. In the dashboard, select Project > Compute > Access & Security.
3. Specify a name in the Key Pair Name field, and copy and paste the contents of your public key
into the Public Key field.
1. In the dashboard, select Project > Compute > Access & Security.
46
CHAPTER 4. VIRTUAL MACHINE INSTANCES
2. On the Key Pairs tab, click the key’s Delete Key Pair button.
1. In the dashboard, select the Project tab, and click Compute > Access & Security.
3. Provide a name and description for the group, and click Create Security Group.
For more information on managing project security, see Project Security Management in the Users and
Identity Management Guide.
Projects have a limited range of floating IP address that can be used (by default, the limit is 50), so you
should release these addresses for reuse when they are no longer needed. Floating IP addresses can
only be allocated from an existing floating IP pool, see Create Floating IP Pools in the Networking Guide.
1. In the dashboard, select Project > Compute > Access & Security.
3. Select a network from which to allocate the IP address in the Pool field.
1. In the dashboard, select Project > Compute > Access & Security.
NOTE
If no addresses are available, you can click the + button to create a new address.
4. Select the instance to be associated in the Port to be Associated field. An instance can only be
associated with one floating IP address.
5. Click Associate.
47
Red Hat OpenStack Platform 16.0 Instances and Images Guide
1. In the dashboard, select Project > Compute > Access & Security.
2. On the Floating IPs tab, click the address' menu arrow (next to the Associate/Disassociate
button).
Ensure that the instance’s security group has an SSH rule (see Project Security Management in
the Users and Identity Management Guide ).
Ensure the instance has a floating IP address (external address) assigned to it (see
Section 4.2.3, “Create, Assign, and Release Floating IP Addresses” ).
Obtain the instance’s key-pair certificate. The certificate is downloaded when the key pair is
created; if you did not create the key pair yourself, ask your administrator (see Section 4.2.1,
“Manage Key Pairs”).
To first load the key pair file into SSH, and then use ssh without naming :it
# eval `ssh-agent`
4. On your local machine, load the key-pair certificate into SSH. For example:
$ ssh-add ~/.ssh/os-key.pem
5. You can now SSH into the file with the user supplied by the image.
The following example command shows how to SSH into the Red Hat Enterprise Linux guest image with
the user cloud-user:
$ ssh [email protected]
NOTE
48
CHAPTER 4. VIRTUAL MACHINE INSTANCES
You can inject an admin (root) password into an instance using the following procedure.
can_set_password: True
inject_password=true
When you use the nova boot command to launch a new instance, the output of the command displays
an adminPass parameter. You can use this password to log into the instance as the root user.
The Compute service overwrites the password value in the /etc/shadow file for the root user. This
procedure can also be used to activate the root account for the KVM guest images. For more
information on how to use KVM guest images, see Section 1.2.1.1, “Use a KVM Guest Image With Red Hat
OpenStack Platform”
You can also set a custom password from the dashboard. To enable this, run the following command
after you have set can_set_password parameter to true.
49
Red Hat OpenStack Platform 16.0 Instances and Images Guide
m1.tiny 1 512 MB 1 GB
m1.small 1 2048 MB 20 GB
m1.medium 2 4096 MB 40 GB
m1.large 4 8192 MB 80 GB
The majority of end users will be able to use the default flavors. However, you can create and manage
specialized flavors. For example, you can:
50
CHAPTER 4. VIRTUAL MACHINE INSTANCES
Change default memory and capacity to suit the underlying hardware needs.
Add metadata to force a specific I/O rate for the instance or to match a host aggregate.
NOTE
Behavior set using image properties overrides behavior set using flavors (for more
information, see Section 1.2, “Manage Images”).
"compute_extension:flavormanage": "",
51
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Pre-defined keys determine hardware support or quotas. Pre-defined keys are limited by the
hypervisor you are using (for libvirt, see Table 4.5, “Libvirt Metadata” ).
Both pre-defined and user-defined keys can determine instance scheduling. For example, you
might specify SpecialComp=True; any instance with this flavor can then only run in a host
aggregate with the same key-value combination in its metadata (see Section 4.4, “Manage
Host Aggregates”).
1. As an admin user in the dashboard, select Admin > System > Flavors.
2. Click the flavor’s Metadata link (Yes or No). All current values are listed on the right-hand side
under Existing Metadata.
1. As an admin user in the dashboard, select Admin > System > Flavors.
2. Click the flavor’s Metadata link (Yes or No). All current values are listed on the right-hand side
under Existing Metadata.
3. Under Available Metadata, click on the Other field, and specify the key you want to add (see
Table 4.5, “Libvirt Metadata” ).
4. Click the + button; you can now view the new key under Existing Metadata.
52
CHAPTER 4. VIRTUAL MACHINE INSTANCES
Key Description
hw:action Action that configures support limits per instance. Valid actions are:
Example: hw:cpu_max_sockets=2
53
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Key Description
hw:NUMA_def Definition of NUMA topology for the instance. For flavors whose RAM and
vCPU allocations are larger than the size of NUMA nodes in the compute
hosts, defining NUMA topology enables hosts to better utilize NUMA and
improve performance of the guest OS. NUMA definitions defined through the
flavor override image definitions. Valid definitions are:
NOTE
hw:numa_nodes=2
hw:numa_cpus.0=0,1,2,3,4,5
hw:numa_cpus.1=6,7
hw:numa_mem.0=3072
hw:numa_mem.1=1024
The scheduler looks for a host with 2 NUMA nodes with the ability to run 6
CPUs + 3072 MB, or 3 GB, of RAM on one node, and 2 CPUS + 1024 MB, or 1
GB, of RAM on another node. If a host has a single NUMA node with capability
to run 8 CPUs and 4 GB of RAM, it will not be considered a valid match.
54
CHAPTER 4. VIRTUAL MACHINE INSTANCES
Key Description
hw:watchdog_action An instance watchdog device can be used to trigger an action if the instance
somehow fails (or hangs). Valid actions are:
Example: hw:watchdog_action=poweroff
hw:pci_numa_affinity_p You can use this parameter to specify the NUMA affinity policy for PCI
olicy passthrough devices and SR-IOV interfaces. Set to one of the following valid
values:
The PCI device has affinity with at least one of the NUMA nodes;
or
Example: hw:pci_numa_affinity_policy=required
Example: hw_rng:allowed=True.
55
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Key Description
hw_video:ram_max_mb Maximum permitted RAM to be allowed for video devices (in MB).
Example: hw:ram_max_mb=64
cpu_shares - Share of CPU time for the domain. The value only has
meaning when weighted against other machine values in the same
domain. That is, an instance with a flavor with 200 will get twice as
much machine time as an instance with 100.
Example: quota:vif_inbound_average=10240
In addition, the VMware driver supports the following quota options, which
control upper and lower limits for CPUs, RAM, disks, and networks, as well as
shares, which can be used to control relative allocation of available resources
among projects:
57
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Administrators can use host aggregates to handle load balancing, enforce physical isolation (or
redundancy), group servers with common attributes, or separate out classes of hardware. When
you create an aggregate, a zone name must be specified, and it is this name which is presented
to the end user.
Availability zones - An availability zone is the end-user view of a host aggregate. An end user
cannot view which hosts make up the zone, nor see the zone’s metadata; the user can only see
the zone’s name.
End users can be directed to use specific zones which have been configured with certain
capabilities or within certain areas.
2. Add the following values to the NovaSchedulerDefaultFilters parameter, if they are not already
present:
NOTE
3. Add a name for the aggregate in the Name field, and a name by which the end user should see it
in the Availability Zone field.
58
CHAPTER 4. VIRTUAL MACHINE INSTANCES
Click the Update Metadata button. All current values are listed on the right-hand side under
Existing Metadata.
Under Available Metadata, click on the Other field, and specify the key you want to add.
Use predefined keys (see Table 4.6, “Host Aggregate Metadata” ) or add your own (which
will only be valid if exactly the same key is set in an instance’s flavor).
Click the + button; you can now view the new key under Existing Metadata.
NOTE
Click Save.
Key Description
filter_project_id If specified, the aggregate only hosts this project (tenant). Depends
on the AggregateMultiTenancyIsolation filter being set for the
Compute scheduler.
59
Red Hat OpenStack Platform 16.0 Instances and Images Guide
1. As an admin user in the dashboard, select Admin > System > Host Aggregates. All currently
defined aggregates are listed in the Host Aggregates section.
4. Click Delete Host Aggregate in this and the next dialog screen.
Filters - Determine the initial set of hosts on which an instance might be placed (see
Section 4.5.1, “Configure Scheduling Filters” ).
Weights - When filtering is complete, the resulting set of hosts are prioritized using the
weighting system. The highest weight has the highest priority (see Section 4.5.2, “Configure
Scheduling Weights”).
Placement service - Specify the traits an instance requires a host to have, such as the type of
storage disk, or the Intel CPU instruction set extension (see Section 4.5.3, “Configure
Placement Service Traits”).
In the following diagram, both host 1 and 3 are eligible after filtering. Host 1 has the highest weight and
therefore has the highest priority for scheduling.
60
CHAPTER 4. VIRTUAL MACHINE INSTANCES
RetryFilter
AvailabilityZoneFilter
ComputeFilter
ComputeCapabilitiesFilter
ImagePropertiesFilter
ServerGroupAntiAffinityFilter
ServerGroupAffinityFilter
Filter Description
AggregateImagePropert Only passes hosts in host aggregates whose metadata matches the instance’s
iesIsolation image metadata; only valid if a host aggregate is specified for the instance.
For more information, see Section 1.2.1, “Creating an Image”.
61
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Filter Description
AggregateInstanceExtra Metadata in the host aggregate must match the host’s flavor metadata. For
SpecsFilter more information, see Section 4.3.4, “Update Flavor Metadata”.
AggregateInstanceExtraSpecsFilter namespace =
"aggregate_instance_extra_specs:"
AggregateMultiTenancy A host with the specified filter_project_id can only contain instances from
Isolation that project.
NOTE
AllHostsFilter Passes all available hosts (however, does not disable other filters).
ComputeCapabilitiesFilt Ensures Compute metadata is read correctly. Anything before the : is read as a
er namespace. For example, quota:cpu_period uses quota as the namespace
and cpu_period as the key.
DifferentHostFilter Enables an instance to build on a host that is different from one or more
specified hosts. Specify different hosts using the nova boot option --
different_host option.
ImagePropertiesFilter Only passes hosts that match the instance’s image properties. For more
information, see Section 1.2.1, “Creating an Image”.
IsolatedHostsFilter Passes only isolated hosts running isolated images that are specified using
isolated_hosts and isolated_images (comma-separated values).
Valid operators are: =, <, >, in, ⇐, >=, not, or, and
62
CHAPTER 4. VIRTUAL MACHINE INSTANCES
Filter Description
The filter is specified as a query hint in the nova boot command. For
example:
NUMATopologyFilter Filters out hosts based on its NUMA topology. If the instance has no topology
defined, any host can be used. The filter tries to match the exact NUMA
topology of the instance to those of the host (it does not attempt to pack the
instance onto the host). The filter also looks at the standard over-subscription
limits for each NUMA node, and provides limits to the compute host
accordingly.
PCIWeigher The weigher can compute the weight based on the number of PCI devices on
the host and the number of PCI devices requested by an instance. For
example, if there are three hosts available, one with a single PCI device, one
with multiple PCI devices and one without any PCI devices, then Compute
should prioritize these hosts based on the demands of the instance. The first
host should be preferred if the instance requests one PCI device, the second
host if the instance requires multiple PCI devices and the third host if the
instances does not request a PCI device.
For more information, see Reserve NUMA Nodes with PCI Devices
RetryFilter Filters out hosts that have failed a scheduling attempt; valid if
scheduler_max_attempts is greater than zero (defaults to "3").
SameHostFilter Passes one or more specified hosts; specify hosts for the instance using the --
hint same_host option for nova boot .
Build the instance with that group (nova boot option --hint
group=UUID)
ServerGroupAntiAffinity Only passes hosts in a server group that do not already host an instance:
Filter
Give the server group the anti-affinity policy ( nova server-group-
create --policy anti-affinity groupName).
Build the instance with that group (nova boot option --hint
group=UUID).
SimpleCIDRAffinityFilte Only passes hosts on the specified IP subnet range specified by the instance’s
r cidr and build_new_host_ip hints. Example:
63
Red Hat OpenStack Platform 16.0 Instances and Images Guide
You can configure weight options in the Compute node configuration file.
You can define the host weighers you would like the scheduler to use in the [DEFAULT]
scheduler_weight_classes option. Valid weighers are:
All [DEFAULT] Defines the subset size from which a host is selected
scheduler_host_s (integer); must be at least 1. A value of 1 selects the first
ubset_size host returned by the weighing functions. Any value less than
1 is ignored and 1 is used instead (integer value).
affinity [default] Used for weighing hosts for group soft-affinity. Should be a
soft_affinity_weig positive floating-point number, because a negative value
ht_multiplier results in the opposite behavior, which is normally controlled
by soft_anti_affinity_weight_multiplier.
affinity [default] Used for weighing hosts for group soft-anti-affinity. Should
soft_anti_affinity_ be a positive floating-point number, because a negative
weight_multiplier value results in the opposite behavior, which is normally
controlled by soft_affinity_weight_multiplier .
64
CHAPTER 4. VIRTUAL MACHINE INSTANCES
metrics [metrics] Specifies metrics and the ratio with which they are weighed;
weight_setting use a comma-separated list of metric=ratio pairs. Valid
metric names are:
Example: weight_setting=cpu.user.time=1.0
To query the placement service, install the python3-osc-placement package on the undercloud.
Each resource provider has a set of traits. Traits are the qualitative aspects of a resource provider, for
example, the type of storage disk, or the Intel CPU instruction set extension. An instance can specify
which of these traits it requires.
65
Red Hat OpenStack Platform 16.0 Instances and Images Guide
The Compute (nova) service interacts with the placement service when it creates instances, with the
nova-compute and nova-scheduler processes.
nova-compute
Sets the inventory that describes the available quantitative resources, such as the available
vCPUs.
Sets the traits that describe qualitative aspects of the resource provider. The libvirt
virtualization driver reports these traits to the placement service (see Section 4.5.3.1, “libvirt
virtualization driver capabilities as placement service traits” for details).
nova-scheduler
Decides which destination host to build a server on, based on the traits required by the
instance.
You can use the capabilities of libvirt virtualization drivers as placement service traits. The traits that
you can specify are defined in the os-traits library, for example:
COMPUTE_TRUSTED_CERTS
COMPUTE_NET_ATTACH_INTERFACE_WITH_TAG
COMPUTE_IMAGE_TYPE_RAW
HW_CPU_X86_AVX
HW_CPU_X86_AVX512VL
HW_CPU_X86_AVX512CD
See the os-traits library for a catalog of the standardized constants that an instance can request for a
particular hardware, virtualization, storage, network, or device trait.
The following libvirt virtualization drivers automatically report the features that a host CPU provides,
such as the type of instruction set, for example, SSE4, AVX, or AVX-512, to the placement service:
If you are using one of these drivers, you can configure the flavor extra specs or image metadata for an
instance to request a resource provider with specific CPU features.
You can use one of the following methods to specify the required resource provider traits for an
66
CHAPTER 4. VIRTUAL MACHINE INSTANCES
You can use one of the following methods to specify the required resource provider traits for an
instance:
In the following example procedures, the instance requires a particular type of CPU.
Prerequisites
1. Create a new image or modify an existing one to set the required trait:
1. Create a new flavor or modify an existing one to set the required trait:
QoS policies with a guaranteed minimum bandwidth rule are assigned to ports on a specific physical
network. When you create an instance that uses the configured port, the Compute scheduling service
selects a host for the instance that satisfies this request. The Compute scheduling service checks the
67
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Placement service for the amount of bandwidth reserved by other instances on each physical interface,
before selecting a host to deploy an instance on.
Limitations/Restrictions
You can only assign a guaranteed minimum bandwidth QoS policy when creating a new instance.
You cannot assign a guaranteed minimum bandwidth QoS policy to instances that are already
running, as the Compute service only updates resource usage for an instance in placement
during creation or move operations, which means the minimum bandwidth available to the
instance cannot be guaranteed.
You cannot live migrate an instance that uses a port that has resource requests, such as a
guaranteed minimum bandwidth QoS policy. Run the following command to check if a port has
resource requests:
Prerequisites
A QoS policy is available that has a minimum bandwidth rule. For more information, see
Configuring Quality of Service (QoS) policies
Procedure
----------------------------------------------------------------+
| ID | Name | Shared | Default | Project |
----------------------------------------------------------------+
| 6d771447-3cf4-4ef1-b613-945e990fa59f | policy2 | True | False |
ba4de51bf7694228a350dd22b7a3dc24 |
| 78a24462-e3c1-4e66-a042-71131a7daed5 | policy1 | True | False |
ba4de51bf7694228a350dd22b7a3dc24 |
| b80acc64-4fc2-41f2-a346-520d7cfe0e2b | policy0 | True | False |
ba4de51bf7694228a350dd22b7a3dc24 |
----------------------------------------------------------------+
2. Check the rules of each of the available policies to determine which has the required minimum
bandwidth:
----------------------------------------------------------------------------------------------------+
| Field | Value |
----------------------------------------------------------------------------------------------------+
| description |
|
| id | b80acc64-4fc2-41f2-a346-520d7cfe0e2b
|
| is_default | False
|
68
CHAPTER 4. VIRTUAL MACHINE INSTANCES
An "ACTIVE" status in the output indicates that you have successfully created the instance on a
host that can provide the requested guaranteed minimum bandwidth.
If you want to lift the guaranteed minimum bandwidth QoS policy restriction from an instance, you can
detach the interface.
As an operator, if you want to reserve nodes with PCI devices (typically expensive and with
limited resources) for guest instances that request them.
As a user launching instances, you want to ensure that PCI devices are available when required.
69
Red Hat OpenStack Platform 16.0 Instances and Images Guide
NOTE
For this value to be considered, one of the following values must be added to the
NovaSchedulerDefaultFilters parameter in your Compute environment file:
PciPassthroughFilter or NUMATopologyFilter.
The libvirt driver implements a generic placement policy for KVM which allows QEMU emulator threads
to float across the same physical CPUs (pCPUs) that the vCPUs are running on. This leads to the
emulator threads using time borrowed from the vCPUs operations. When you need a guest to have
dedicated vCPU allocation, it is necessary to allocate one or more pCPUs for emulator threads. It is
therefore necessary to describe to the scheduler any other CPU usage that might be associated with a
guest and account for that during placement.
NOTE
In an NFV deployment, to avoid packet loss, you have to make sure that the vCPUs are
never preempted.
Before you enable the emulator threads placement policy on a flavor, check that the following heat
parameters are defined as follows:
NOTE
You can define or change heat parameter values on an active cluster, and then redeploy
for those changes to take effect.
The difference between an image that you upload directly to the Image Service and an image that you
70
CHAPTER 4. VIRTUAL MACHINE INSTANCES
create by snapshot is that an image created by snapshot has additional properties in the Image Service
database. These properties are found in the image_properties table and include the following
parameters:
Name Value
image_type snapshot
image_location snapshot
Snapshots allow you to create new instances based on that snapshot, and potentially restore an instance
to that state. Moreover, this can be performed while the instance is running.
By default, a snapshot is accessible to the users and projects that were selected while launching an
instance that the snapshot is based on.
NOTE
If you intend to use an instance snapshot as a template to create new instances, you must
ensure that the disk state is consistent. Before you create a snapshot, set the snapshot
image metadata property os_require_quiesce=yes. For example,
For this to work, the guest should have the qemu-guest-agent package installed, and the
image should be created with the metadata property parameter
hw_qemu_guest_agent=yes set. For example,
71
Red Hat OpenStack Platform 16.0 Instances and Images Guide
4. In the Create Snapshot dialog, enter a name for the snapshot and click Create Snapshot.
The Images category now shows the instance snapshot.
To launch an instance from a snapshot, select the snapshot and click Launch.
3. For every snapshot you create, you can perform the following functions, using the dropdown list:
a. Use the Create Volume option to create a volume and entering the values for volume name,
description, image source, volume type, size and availability zone. For more information, see
Create a Volume in the Storage Guide.
b. Use the Edit Image option to update the snapshot image by updating the values for name,
description, Kernel ID, Ramdisk ID, Architecture, Format, Minimum Disk (GB), Minimum RAM
(MB), public or private. For more information, see Section 1.2.3, “Update an Image” .
2. Select the snapshot from which you want to restore the instance.
4. In the Launch Instance dialog, enter a name and the other details for the instance and click
Launch.
For more information on launching an instance, see Section 4.1.2, “Launch an Instance” .
Compute’s libvirt driver automatically requests the QEMU Guest Agent to freeze the file systems (and
applications if fsfreeze-hook is installed) during an image snapshot. Support for quiescing file systems
enables scheduled, automatic snapshots at the block device level.
This feature is only valid if the QEMU Guest Agent is installed (qemu-ga) and the image metadata
72
CHAPTER 4. VIRTUAL MACHINE INSTANCES
This feature is only valid if the QEMU Guest Agent is installed (qemu-ga) and the image metadata
enables the agent (hw_qemu_guest_agent=yes)
NOTE
To avoid this issue, you should create a new image as rescue image based on the procedure in
Section 1.2.1, “Creating an Image” :
NOTE
The rescue image is stored in glance and configured in the nova.conf as a default, or
you can select when you do the rescue.
When the base image uses ext4 filesystem, you can create a rescue image from it using the following
procedure:
Here DEVICE_NODE is the root device node (for example, sda, vda, and so on).
# tune2fs -l
3. Update the /etc/fstab to use the new UUID. You may need to repeat this for any additional
partitions you have, that are mounted in the fstab by UUID.
4. Update the /boot/grub2/grub.conf file and update the UUID parameter with the new UUID of
the root disk.
5. Shut down and use this image as your rescue image. This will cause the rescue image to have a
new random UUID that will not conflict with the instance that you are rescuing.
NOTE
73
Red Hat OpenStack Platform 16.0 Instances and Images Guide
NOTE
The XFS filesystem cannot change the UUID of the root device on the running virtual
machine. Reboot the virtual machine until the virtual machine is launched from the disk
for rescue mode.
Here IMAGE_NAME is the name of the image, IMAGE_PATH is the location of the image.
2. Use the image-list command to obtain the IMAGE_ID required for launching an instace in the
rescue mode.
# glance image-list
You can also upload an image using the OpenStack Dashboard, see Section 1.2.2, “Upload an Image” .
Here IMAGE_ID is the ID of the image you want to use and VIRTUAL_MACHINE_ID is ID of a
virtual machine that you want to rescue.
NOTE
The nova rescue command allows an instance to perform a soft shut down. This
allows the guest operating system to perform a controlled shutdown before the
instance is powered off. The shut down behavior is configured using
shutdown_timeout in your Compute configuration file. The value stands for the
overall period (in seconds) a guest operation system is allowed to complete the
shutdown. The default timeout is 60 seconds.
3. Confirm the status of the virtual machine is RESCUE on the controller node by using nova list
command or by using dashboard.
74
CHAPTER 4. VIRTUAL MACHINE INSTANCES
4. Log in to the new virtual machine dashboard by using the password for rescue mode.
You can now make the necessary changes to your instance to fix any issues.
The status of your instance returns to ACTIVE once the unrescue operation has completed successfully.
config_drive_format - sets the format of the drive, and accepts the options iso9660 and vfat.
By default, it uses iso9660.
force_config_drive - this forces the configuration drive to be presented to all instances. Set to
"True".
mkisofs_cmd - specifies the command to use for ISO file creation. This value must not be
changed, as only genisoimage is supported.
Once the instance has booted, you can log in to it and see a file named /root/user-data.txt.
NOTE
You can use the configuration drive as a source for cloud-init information. During the
initial instance boot, cloud-init can automatically mount the configuration drive and run
the setup scripts.
75
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Director configures all Compute nodes to provide secure migration. All Compute nodes also require a
shared SSH key to provide the users of each host with access to other Compute nodes during the
migration process. Director creates this key using the OS::TripleO::Services::NovaCompute
composable service. This composable service is one of the main services included on all Compute roles
by default. For more information, see Composable Services and Custom Roles in the Advanced
Overcloud Customization guide.
NOTE
If you have a functioning Compute node, and you want to make a copy of an instance for
backup purposes, or to copy the instance to a different environment, follow the
procedure in Importing virtual machines into the overcloud in the Director Installation and
Usage guide.
Cold migration
Cold migration, or non-live migration, involves shutting down a running instance before migrating it from
the source Compute node to the destination Compute node.
76
CHAPTER 5. MIGRATING VIRTUAL MACHINE INSTANCES BETWEEN COMPUTE NODES
Cold migration involves some downtime for the instance. The migrated instance maintains access to the
same volumes and IP addresses.
NOTE
Cold migration requires that both the source and destination Compute nodes are
running.
Live migration
Live migration involves moving the instance from the source Compute node to the destination
Compute node without shutting it down, and while maintaining state consistency.
Live migrating an instance involves little or no perceptible downtime. However, live migration does
impact performance for the duration of the migration operation. Therefore, instances should be taken
out of the critical path while being migrated.
NOTE
Live migration requires that both the source and destination Compute nodes are running.
In some cases, instances cannot use live migration. For more information, see Migration Constraints.
Evacuation
77
Red Hat OpenStack Platform 16.0 Instances and Images Guide
If you need to migrate instances because the source Compute node has already failed, you can
evacuate the instances.
CPU constraints
The source and destination Compute nodes must have the same CPU architecture. For example, Red
Hat does not support migrating an instance from an x86_64 CPU to a ppc64le CPU. In some cases, the
CPU of the source and destination Compute node must match exactly, such as instances that use CPU
host passthrough. In all cases, the CPU features of the destination node must be a superset of the CPU
features on the source node.
Memory constraints
The destination Compute node must have sufficient available RAM. Memory oversubscription can cause
migration to fail.
NOTE
Network congestion in the control plane network caused by migrating local disks or
instances that consume large amounts of RAM might impact the performance of other
systems that use the control plane network, such as RabbitMQ.
78
CHAPTER 5. MIGRATING VIRTUAL MACHINE INSTANCES BETWEEN COMPUTE NODES
Multi-cell clouds
In a multi-cell cloud, instances can be live migrated to a different host in the same cell, but not across
cells.
Floating instances
When live migrating floating instances, if the configuration of NovaComputeCpuSharedSet on the
destination Compute node is different from the configuration of NovaComputeCpuSharedSet on
the source Compute node, the instances will not be allocated to the CPUs configured for shared
(unpinned) instances on the destination Compute node. Therefore, if you need to live migrate
floating instances, you must configure all the Compute nodes with the same CPU mappings for
dedicated (pinned) and shared (unpinned) instances, or use a host aggregate for the shared
instances.
Destination Compute node capacity
The destination Compute node must have sufficient capacity to host the instance that you want to
migrate.
SR-IOV live migration
Instances with SR-IOV-based network interfaces can be live migrated. Live migrating instances with
direct mode SR-IOV network interfaces attached incurs network downtime while the direct mode
interfaces are being detached and re-attached.
PCI passthrough
QEMU/KVM hypervisors support attaching PCI devices on the Compute node to an instance. Use
PCI passthrough to give an instance exclusive access to PCI devices, which appear and behave as if
they are physically attached to the operating system of the instance. However, because PCI
passthrough involves physical addresses, OpenStack Compute does not support live migration of
instances using PCI passthrough.
Port resource requests
You cannot live migrate an instance that uses a port that has resource requests, such as a
guaranteed minimum bandwidth QoS policy. Use the following command to check if a port has
resource requests:
Procedure
1. Identify the source Compute node host name and the destination Compute node host name:
2. List the instances on the source Compute node and locate the ID of the instance or instances
that you want to migrate:
79
Red Hat OpenStack Platform 16.0 Instances and Images Guide
3. Optional: If you are migrating instances from a source Compute node to perform maintenance
on the node, you must disable the node to prevent the scheduler from assigning new instances
to the node during maintenance:
You are now ready to perform the migration. Follow the required procedure detailed in Cold migrating
an instance or Live migrating an instance .
Procedure
1. To cold migrate an instance, enter the following command to power off and move the instance:
2. Wait for migration to complete. While you wait for the instance migration to complete, you can
check the migration status. For more information, see Checking migration status.
Replace <vm> with the name or ID of the instance to migrate. A status of "ACTIVE"
indicates that the instance is ready to use.
80
CHAPTER 5. MIGRATING VIRTUAL MACHINE INSTANCES BETWEEN COMPUTE NODES
5. Optional: If you disabled the source Compute node for maintenance, you must re-enable the
node so that new instances can be assigned to it:
Replace <source> with the host name of the source Compute node.
Procedure
1. To live migrate an instance, specify the instance and the destination Compute node:
NOTE
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| ... | ... |
| status | MIGRATING |
| ... | ... |
+----------------------+--------------------------------------+
3. Wait for migration to complete. While you wait for the instance migration to complete, you can
check the migration status. For more information, see Checking migration status.
81
Red Hat OpenStack Platform 16.0 Instances and Images Guide
4. Check the status of the instance to confirm if the migration was successful:
5. Optional: If you disabled the source Compute node for maintenance, you must re-enable the
node so that new instances can be assigned to it:
Replace <source> with the host name of the source Compute node.
1. Queued: The Compute service has accepted the request to migrate an instance, and migration
is pending.
4. Post-migrating: The Compute service has built the instance on the destination Compute node
and is releasing resources on the source Compute node.
5. Completed: The Compute service has completed migrating the instance and finished releasing
resources on the source Compute node.
Procedure
+----+-------------+----------- (...)
| Id | Source Node | Dest Node | (...)
+----+-------------+-----------+ (...)
|2 |- |- | (...)
+----+-------------+-----------+ (...)
$ <vm> <migration-id>
82
CHAPTER 5. MIGRATING VIRTUAL MACHINE INSTANCES BETWEEN COMPUTE NODES
+------------------------+--------------------------------------+
| Property | Value |
+------------------------+--------------------------------------+
| created_at | 2017-03-08T02:53:06.000000 |
| dest_compute | controller |
| dest_host |- |
| dest_node |- |
| disk_processed_bytes | 0 |
| disk_remaining_bytes | 0 |
| disk_total_bytes |0 |
| id |2 |
| memory_processed_bytes | 65502513 |
| memory_remaining_bytes | 786427904 |
| memory_total_bytes | 1091379200 |
| server_uuid | d1df1b5a-70c4-4fed-98b7-423362f2c47c |
| source_compute | compute2 |
| source_node |- |
| status | running |
| updated_at | 2017-03-08T02:53:47.000000 |
+------------------------+--------------------------------------+
TIP
The OpenStack Compute service measures progress of the migration by the number of
remaining memory bytes to copy. If this number does not decrease over time, the migration
might be unable to complete, and the Compute service might abort it.
Sometimes instance migration can take a long time or encounter errors. For more information, see
Troubleshooting migration.
The evacuate process destroys the original instance and rebuilds it on another Compute node using the
original image, instance name, UUID, network addresses, and any other resources the original instance
had allocated to it.
If the instance uses shared storage, the instance root disk is not rebuilt during the evacuate process, as
the disk remains accessible by the destination Compute node. If the instance does not use shared
storage, then the instance root disk is also rebuilt on the destination Compute node.
NOTE
You can only perform an evacuation when the Compute node is fenced, and the
API reports that the state of the Compute node is "down" or "forced-down". If
the Compute node is not reported as "down" or "forced-down", the evacuate
command fails.
83
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Procedure
Replace <host> with the name of the Compute node to evacuate the instance from.
Replace <service> with the name of the service to disable, for example nova-compute.
Replace <pass> with the admin password to set for the evacuated instance. If a password is
not specified, a random password is generated and output when the evacuation is complete.
Replace <dest> with the name of the Compute node to evacuate the instance to. If you do
not specify the destination Compute node, the Compute scheduler selects one for you. You
can find possible Compute nodes by using the following command:
Procedure
Replace <host> with the name of the Compute node to evacuate the instances from.
Replace <service> with the name of the service to disable, for example nova-compute.
Replace <dest> with the name of the destination Compute node to evacuate the instances
to. If you do not specify the destination, the Compute scheduler selects one for you. You
can find possible Compute nodes by using the following command:
84
CHAPTER 5. MIGRATING VIRTUAL MACHINE INSTANCES BETWEEN COMPUTE NODES
Replace <host> with the name of the Compute node to evacuate the instances from.
Procedure
a. Ensure that the /var/lib/nova/instances directory has read-write access by the Compute
service user, as shown in the following example:
/var/lib/nova/instances node1_IP(rw,sync,fsid=0,no_root_squash)
/var/lib/nova/instances node2_IP(rw,sync,fsid=0,no_root_squash)
Replace node1_IP and node2_IP for the IP addresses of the two Compute nodes, for
example:
/var/lib/nova/instances 192.168.24.9(rw,sync,fsid=0,no_root_squash)
/var/lib/nova/instances 192.168.24.21(rw,sync,fsid=0,no_root_squash)
# exportfs -avr
c. Mount the controller’s instance directory to mount all the devices listed in /etc/fstab:
# mount -a -v
85
Red Hat OpenStack Platform 16.0 Instances and Images Guide
# ls -ld /var/lib/nova/instances
drwxr-xr-x. 9 nova nova 4096 Nov 5 20:37 /var/lib/nova/instances
e. Ensure that the node can see the instances directory with:
NOTE
You can also run the following to view all mounted devices:
# df -k
Running a cluster with different versions of Red Hat OpenStack Platform (RHOSP).
When live migration enters a failed state, it is typically followed by an error state. The following common
issues can cause a failed state:
The instance on the source Compute node gets deleted before migration to the destination
Compute node is complete.
86
CHAPTER 5. MIGRATING VIRTUAL MACHINE INSTANCES BETWEEN COMPUTE NODES
Procedure
IMPORTANT
Procedure
87
Red Hat OpenStack Platform 16.0 Instances and Images Guide
88
CHAPTER 6. SCALING DEPLOYMENTS WITH COMPUTE CELLS
By default, the director installs the overcloud with a single cell for all Compute nodes. This single-cell
deployment contains all instances and instance metadata. For larger deployments, you can deploy the
overcloud with multiple cells to accommodate a larger number of Compute nodes.
In multi-cell deployments, each cell runs standalone copies of the cell-specific components and stores
instance metadata only for instances in that cell. Global information and cell mappings are stored in the
global Controller cell, which helps with security and recovery in case one of the cells fails.
You can add cells to your environment when you install a new overcloud or at any time afterwards.
Global components
The following components are deployed in a Controller cell once for each overcloud, regardless of the
number of Compute cells.
Compute API
Provides the external REST API to users.
Scheduler
Determines to which Compute node to assign the instances.
Placement service
Monitors and allocates Compute resources to the instances.
API database
Used by the Compute API and the Compute scheduler services to track location information about
instances, and provides a temporary location for instances that are built but not scheduled.
In multi-cell deployments, this database also contains cell mappings that specify the database
connection for each cell.
cell0 database
Dedicated database for information about instances that failed to be scheduled.
Super conductor
In multi-cell deployments, this service coordinates between the global services and each Compute
cell, and also sends failed instance information to the cell0 database.
NOTE
89
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Cell-specific components
The following components are deployed in each Compute cell.
Cell database
Contains most of the information about instances. Used by the global API, the conductor, and the
Compute services.
Conductor
Coordinates database queries and long-running tasks from the global services, and insulates
Compute nodes from direct database access.
Message queue
Messaging service used by all services to communicate with each other within the cell and with the
global services.
Configuration files
The overcloud includes configuration files that define the following information for the Compute cells:
(Multi-cell deployments only) Cell mapping records to be stored in the global API database.
This information is extracted from the overcloud when you deploy the multi-cell environment, as
described in Section 6.4, “Deploying a multi-cell overcloud” .
In this deployment, all services are configured to use a single conductor to communicate between the
Compute API and the Compute nodes, and a single database stores all live instance data.
In smaller deployments this configuration might be sufficient, but if any API-level (global) service or the
90
CHAPTER 6. SCALING DEPLOYMENTS WITH COMPUTE CELLS
In smaller deployments this configuration might be sufficient, but if any API-level (global) service or the
database fails, the entire Compute deployment cannot send or receive information, regardless of high
availability configurations.
In this deployment, the Compute nodes are divided to multiple cells, each with their own conductor,
database, and message queue. The global services use the super conductor to communicate with each
cell, and the global database contains only information required for the whole overcloud.
The cell-level services cannot access global services directly. This isolation provides additional security
and fail-safe capabilities in case of cell failure.
IMPORTANT
In Edge deployments, you must deploy the first cell on the central site, therefore, do not
deploy the first cell on any of the edge sites. Do not run any Compute services on the
first cell. Instead, deploy each new cell containing the Compute nodes separately on the
edge sites.
Migrating an instance from a host in one cell to a host in another cell is not supported. This limitation
91
Red Hat OpenStack Platform 16.0 Instances and Images Guide
Migrating an instance from a host in one cell to a host in another cell is not supported. This limitation
affects the following operations:
cold migration
live migration
unshelve
resize
evacuation
Service quotas
Compute service quotas are calculated dynamically at each resource consumption point, instead of
statically in the database. In multi-cell deployments, unreachable cells cannot provide usage
information in real-time, which might cause the quotas to be exceeded when the cell is reachable
again.
You can use the Placement service and API database to configure the quota calculation to withstand
failed or unreachable cells.
API database
The Compute API database is always global for all cells and cannot be duplicated for each cell.
Console proxies
You must configure console proxies for each cell, because console token authorizations are stored in
cell databases. Each console proxy server needs to access the database.connection information of
the corresponding cell database.
Template URLs in cell mappings
You can create templates for the --database_connection and --transport-url in cell mappings with
variables that are dynamically updated each time you query the global database. The values are taken
from the configuration files of the Compute nodes.
The format of a template URL is as follows:
{scheme}://{username}:{password}@{hostname}/{path}
The following table shows the variables that you can use in cell mapping URLs:
Variable Description
password Password
92
CHAPTER 6. SCALING DEPLOYMENTS WITH COMPUTE CELLS
Variable Description
query Full query with string arguments (without leading question mark)
If you have networks that cover multiple cells, you need to run the metadata API globally so
that it can bridge between the cells. In this case, the metadata API needs to access the
api_database.connection information.
If you have networks in separate segments for each cell, you can run the metadata API
separately in each cell. This configuration can improve performance and data isolation. In this
case, neutron-metadata-agent service point to the corresponding nova-api-metadata
service.
You use the api.local_metadata_per_cell configuration option to set which method to implement.
For details on configuring this option, see the Create environment files with cell parameters section in
Section 6.4, “Deploying a multi-cell overcloud” .
1. Extracting parameter information from the default first cell in the basic overcloud. This cell
becomes the global Controller after you redeploy the overcloud.
NOTE
This process adds one cell to the overcloud. Repeat these steps for each
additional cell you want to deploy in the overcloud.
In this procedure, the name of the new cell is cell1. Replace the name in all
commands with the actual cell name.
Prerequisites
Deploy a basic overcloud with the required number of Controller and Compute nodes.
Review the requirements and limitations for a multi-cell overcloud as described in Section 6.3,
“Considerations for multi-cell deployments”.
1. Create a new directory for the new cell and export the contents to the new directory. For
93
Red Hat OpenStack Platform 16.0 Instances and Images Guide
1. Create a new directory for the new cell and export the contents to the new directory. For
example:
$ source ~/stackrc
(undercloud) $ mkdir cell1
(undercloud) $ export DIR=cell1
NOTE
If the environment file already exists, run the command with the --force-
overwrite or -f option.
1. Add the CellController role to your roles data file and regenerate the file. For example:
The CellController custom role includes the services from the default Compute role and
additional configuration for the following services:
Galera database
RabbitMQ
nova-conductor
2. In case you want to divide your network between the global Controller and the cells, configure
network access in the roles file that you created. For example:
name: Compute
description: |
Basic Compute Node role
CountDefault: 1
# Create external Neutron bridge (unset if using ML2/OVS without DVR)
tags:
- external_bridge
networks:
InternalApi:
subnet: internal_api_cell1
Tenant:
subnet: tenant_subnet
Storage:
subnet: storage_cell1
94
CHAPTER 6. SCALING DEPLOYMENTS WITH COMPUTE CELLS
...
- name: CellController
description: |
CellController role for the nova cell_v2 controller services
CountDefault: 1
tags:
- primary
- controller
networks:
External:
subnet: external_cell1
InternalApi:
subnet: internal_api_cell1
Storage:
subnet: storage_cell1
StorageMgmt:
subnet: storage_mgmt_cell1
Tenant:
subnet: tenant_subnet
1. Create the cellcontroller flavor to tag nodes that you want to allocate to the cell. For example:
(undercloud) $ openstack flavor create --id auto --ram 4096 --disk 40 --vcpus 1 cellcontroller
(undercloud) $ openstack flavor set --property "cpu_arch"="x86_64" \
--property "capabilities:boot_option"="local" \
--property "capabilities:profile"="cellcontroller" \
--property "resources:CUSTOM_BAREMETAL=1" \
--property "resources:DISK_GB=0" \
--property "resources:MEMORY_MB=0" \
--property "resources:VCPU=0" \
cellcontroller
2. Tag each node that you want to assign to the cell with the cellcontroller profile.
Replace <NODE_UUID> with the actual ID of the Compute node that you want to assign to the
cell.
1. Create a new environment file in the directory for the cell, such as /cell1/cell1.yaml, and add the
following parameters:
resource_registry:
# since the same networks are used in this example, the
# creation of the different networks is omitted
OS::TripleO::Network::External: OS::Heat::None
OS::TripleO::Network::InternalApi: OS::Heat::None
OS::TripleO::Network::Storage: OS::Heat::None
OS::TripleO::Network::StorageMgmt: OS::Heat::None
OS::TripleO::Network::Tenant: OS::Heat::None
95
Red Hat OpenStack Platform 16.0 Instances and Images Guide
OS::TripleO::Network::Management: OS::Heat::None
OS::TripleO::Network::Ports::OVNDBsVipPort: /usr/share/openstack-tripleo-heat-
templates/network/ports/noop.yaml
OS::TripleO::Network::Ports::RedisVipPort: /usr/share/openstack-tripleo-heat-
templates/network/ports/noop.yaml
parameter_defaults:
# CELL Parameter to reflect that this is an additional CELL
NovaAdditionalCell: True
# default gateway
ControlPlaneStaticRoutes:
- ip_netmask: 0.0.0.0/0
next_hop: 192.168.24.1
default: true
DnsServers:
- x.x.x.x
Change the parameter values in this example according to your deployment needs.
2. Depending on your network configuration, you might need to allocate a network resource to the
cell. Add the following parameter if you need to register cells to the network:
resource_registry:
OS::TripleO::CellController::Net::SoftwareConfig: single-nic-vlans/controller.yaml
OS::TripleO::Compute::Net::SoftwareConfig: single-nic-vlans/compute.yaml
3. If you divide your network between the global Controller and the cells and want to run the
Compute metadata API in each cell instead of in the global Controller, add the following
parameter:
parameter_defaults:
NovaLocalMetadataPerCell: True
NOTE
96
CHAPTER 6. SCALING DEPLOYMENTS WITH COMPUTE CELLS
NOTE
The parameters in this file restrict the overcloud to use a single network for
all cells.
4. Copy the network_data.yaml file and name it according to the cell name. For example:
(undercloud) $ cp /usr/share/openstack-tripleo-heat-templates/network_data.yaml
cell1/network_data-ctrl.yaml
5. Add the UUIDs for the network components you want to reuse for the cells to the new network
data file.
external_resource_network_id: [EXISTING_NETWORK_UUID]
external_resource_subnet_id: [EXISTING_SUBNET_UUID]
external_resource_segment_id: [EXISTING_SEGMENT_UUID]
external_resource_vip_id: [EXISTING_VIP_UUID]
parameter_defaults:
InternalApiInterfaceRoutes:
- destination: 172.17.2.0/24
nexthop: 172.16.2.254
StorageInterfaceRoutes:
- destination: 172.17.1.0/24
nexthop: 172.16.1.254
StorageMgmtInterfaceRoutes:
- destination: 172.17.3.0/24
nexthop: 172.16.3.254
parameter_defaults:
VipSubnetMap:
InternalApi: internal_api_cell1
Storage: storage_cell1
StorageMgmt: storage_mgmt_cell1
External: external_cell1
In the primary environment file, set the ComputeCount parameter to 0 in the Controller cell.
This cell is separate from the Edge site Compute cells, which will contain the actual Compute
nodes.
In the Compute cell environment files, add the following parameter to disable external VIP
ports:
97
Red Hat OpenStack Platform 16.0 Instances and Images Guide
resource_registry:
# Since the compute stack deploys only compute nodes ExternalVIPPorts are not required.
OS::TripleO::Network::Ports::ExternalVipPort: /usr/share/openstack-tripleo-heat-
templates/network/ports/noop.yaml
NOTE
If you deploy Compute cells in Edge sites, run the overcloud deploy command in
each site with the environment files and configuration for each Compute cell in that
site.
NOTE
98
CHAPTER 6. SCALING DEPLOYMENTS WITH COMPUTE CELLS
NOTE
This process must be repeated for each cell that you create and launch. You can
automate the steps in an Ansible playbook. For an example of an Ansible playbook, see
the Create the cell and discover Compute nodes section of the OpenStack community
documentation. Community documentation is provided as-is and is not officially
supported.
2. Add the cell information to all Controller nodes. This information is used to connect to the cell
endpoint from the undercloud.
3. Get the transport_url and database.connection endpoint information from the controller cell.
4. Log in to one of the global Controller nodes to create the cell based on the information that you
retrieved in the previous steps. For example:
$ export CONTAINERCLI='podman'
5. Check that the cell is created and appears in the cell list.
99
Red Hat OpenStack Platform 16.0 Instances and Images Guide
2. Get the IP address of the control plane for the cell and run the host discovery command to
expose and assign Compute hosts to the cell.
$ CTRL=overcloud-controller-0
$ CTRL_IP=$(openstack server list -f value -c Networks --name $CTRL | sed 's/ctlplane=//')
$ export CONTAINERCLI='podman'
You can use host aggregates to configure the AZ for the Compute cell. The following example shows
the command to create a host aggregate for the cell cell1, define the AZ for the host aggregate, and
add the hosts within the cell to the AZ:
NOTE
For general information on host aggregates and availability zones, see Manage Host Aggregates .
100
CHAPTER 6. SCALING DEPLOYMENTS WITH COMPUTE CELLS
NOTE
Migrating instances between cells is not supported. You must delete the
instances and re-create them in another cell.
2. On one of the global Controllers, delete all Compute nodes from the cell.
$ CTRL=overcloud-controller-0
$ CTRL_IP=$(openstack server list -f value -c Networks --name $CTRL | sed 's/ctlplane=//')
$ export CONTAINERCLI='podman'
3. Delete the resource providers for the cell from the Placement service, to ensure that the host
name is available in case you want to add Compute nodes with the same host name to another
cell later. For example:
$ CTRL=overcloud-controller-0
$ CTRL_IP=$(openstack server list -f value -c Networks --name $CTRL | sed 's/ctlplane=//')
$ export CONTAINERCLI='podman'
101
Red Hat OpenStack Platform 16.0 Instances and Images Guide
$ openstack stack delete <stack name> --wait --yes && openstack overcloud plan delete
<STACK_NAME>
NOTE
If you deployed separate cell stacks for a Controller and Compute cell, delete the
Compute cell stack first and then the Controller cell stack.
102
CHAPTER 7. CONFIGURING COMPUTE NODES FOR PERFORMANCE
Use the following features to tune your instances for optimal performance:
Emulator threads: Pin emulator threads associated with the instance to physical CPUs.
Huge pages: Tune instance memory allocation policies both for normal memory (4k pages) and
huge pages (2 MB or 1 GB pages).
NOTE
Configuring any of these features creates an implicit NUMA topology on the instance if
there is no NUMA topology already present.
Configure CPU pinning on your Compute node based on the NUMA topology of your host system.
Reserve some CPU cores across all the NUMA nodes for the host processes for efficiency. Assign the
remaining CPU cores to managing your instances.
The following example illustrates eight CPU cores spread across two NUMA nodes.
You can schedule dedicated (pinned) and shared (unpinned) instances on the same Compute node.
The following procedure reserves cores 0 and 4 for host processes, cores 1, 3, 5 and 7 for instances that
require CPU pinning, and cores 2 and 6 for floating instances that do not require CPU pinning.
NOTE
103
Red Hat OpenStack Platform 16.0 Instances and Images Guide
NOTE
If the host supports simultaneous multithreading (SMT), group thread siblings together in
either the dedicated or the shared set. Thread siblings share some common hardware
which means it is possible for a process running on one thread sibling to impact the
performance of the other thread sibling.
For example, the host identifies four CPUs in a dual core CPU with SMT: 0, 1, 2, and 3. Of
these four, there are two pairs of thread siblings:
In this scenario, you should not assign CPUs 0 and 1 as dedicated and 2 and 3 as shared.
Instead, you should assign 0 and 2 as dedicated and 1 and 3 as shared.
Prerequisite
You know the NUMA topology of your Compute node. For more information, see Discovering
your NUMA node topology in the Network Functions Virtualization Planning and Configuration
Guide.
Procedure
1. Reserve physical CPU cores for the dedicated instances by setting the
NovaComputeCpuDedicatedSet configuration in the Compute environment file for each
Compute node:
NovaComputeCpuDedicatedSet: 1,3,5,7
2. Reserve physical CPU cores for the shared instances by setting the
NovaComputeCpuSharedSet configuration in the Compute environment file for each
Compute node:
NovaComputeCpuSharedSet: 2,6
3. Set the NovaReservedHostMemory option in the same files to the amount of RAM to reserve
for host processes. For example, if you want to reserve 512 MB, use:
NovaReservedHostMemory: 512
4. To ensure that host processes do not run on the CPU cores reserved for instances, set the
parameter IsolCpusList in each Compute environment file to the CPU cores you have reserved
for instances. Specify the value of the IsolCpusList parameter using a list, or ranges, of CPU
indices separated by a whitespace.
IsolCpusList: 1 2 3 5 6 7
5. To filter out hosts based on its NUMA topology, add NUMATopologyFilter to the
NovaSchedulerDefaultFilters parameter in each Compute environment file.
6. To apply this configuration, add the environment file(s) to your deployment command and
deploy the overcloud:
104
CHAPTER 7. CONFIGURING COMPUTE NODES FOR PERFORMANCE
If there is no value set for NovaVcpuPinSet, then all host cores should be assigned to either
NovaComputeCpuDedicatedSet or NovaComputeCpuSharedSet, depending on the type of
instance running there.
Once the upgrade is complete, it is possible to start setting both options on the same host. However, to
do this, all the instances should be migrated from the host, as the Compute service cannot start when
cores for an unpinned instance are not listed in NovaComputeCpuSharedSet, or when cores for a
pinned instance are not listed in NovaComputeCpuDedicatedSet.
Prerequisites
The Compute node is configured to allow CPU pinning. For more information, see Configuring
CPU pinning on the Compute node.
Procedure
2. To request pinned CPUs, set the hw:cpu_policy property of the flavor to dedicated:
3. To place each vCPU on thread siblings, set the hw:cpu_thread_policy property of the flavor to
require:
NOTE
105
Red Hat OpenStack Platform 16.0 Instances and Images Guide
NOTE
If the host does not have an SMT architecture or enough CPU cores with
available thread siblings, scheduling will fail. To prevent this, set
hw:cpu_thread_policy to prefer instead of require. The (default) prefer
policy ensures that thread siblings are used when available.
5. To verify correct placement of the new instance, run the following command and check for OS-
EXT-SRV-ATTR:hypervisor_hostname in the output:
Prerequisites
The Compute node is configured to reserve physical CPU cores for the floating instances. For
more information, see Configuring CPU pinning on the Compute node .
Procedure
2. To request floating CPUs, set the hw:cpu_policy property of the flavor to shared:
4. To verify correct placement of the new instance, run the following command and check for OS-
EXT-SRV-ATTR:hypervisor_hostname in the output:
106
CHAPTER 7. CONFIGURING COMPUTE NODES FOR PERFORMANCE
Procedure
1. Configure the amount of huge page memory to reserve on each NUMA node for processes that
are not instances:
parameter_defaults:
NovaReservedHugePages: ["node:0,size:2048,count:64","node:1,size:1GB,count:1"]
Where:
Attribute Description
size The size of the allocated huge page. Valid values: * 2048 (for 2MB) *
1GB
count The number of huge pages used by OVS per NUMA node. For
example, for 4096 of socket memory used by Open vSwitch, set this
to 2.
2. (Optional) To allow instances to allocate 1GB huge pages, configure the CPU feature flags,
cpu_model_extra_flags, to include "pdpe1gb":
parameter_defaults:
ComputeExtraConfig:
nova::compute::libvirt::libvirt_cpu_mode: 'custom'
nova::compute::libvirt::libvirt_cpu_model: 'Haswell-noTSX'
nova::compute::libvirt::libvirt_cpu_model_extra_flags: 'vmx, pdpe1gb'
NOTE
You can only allocate 1G huge pages to an instance if the host supports 1G
huge page allocation.
3. To avoid loss of performance after applying Meltdown protection, configure the CPU feature
107
Red Hat OpenStack Platform 16.0 Instances and Images Guide
3. To avoid loss of performance after applying Meltdown protection, configure the CPU feature
flags, cpu_model_extra_flags, to include "+pcid":
parameter_defaults:
ComputeExtraConfig:
nova::compute::libvirt::libvirt_cpu_mode: 'custom'
nova::compute::libvirt::libvirt_cpu_model: 'Haswell-noTSX'
nova::compute::libvirt::libvirt_cpu_model_extra_flags: 'vmx, pdpe1gb, +pcid'
TIP
For more information, see Reducing the performance impact of Meltdown CVE fixes for
OpenStack guests with "PCID" CPU feature flag.
5. Apply this huge page configuration by adding the environment file(s) to your deployment
command and deploying the overcloud:
Prerequisites
The Compute node is configured for huge pages. For more information, see Configuring huge
pages on the Compute node.
Procedure
large - Selects the largest page size supported on the host, which may be 2 MB or 1 GB on
x86_64 systems.
small - (Default) Selects the smallest page size supported on the host. On x86_64 systems
this is 4 kB (normal pages).
108
CHAPTER 7. CONFIGURING COMPUTE NODES FOR PERFORMANCE
any - Selects the largest available huge page size, as determined by the libvirt driver.
<pagesize>: (string) Set an explicit page size if the workload has specific requirements. Use
an integer value for the page size in KB, or any standard suffix. For example: 4KB, 2MB,
2048, 1GB.
Validation
The scheduler identifies a host with enough free huge pages of the required size to back the memory of
the instance. If the scheduler is unable to find a host and NUMA node with enough pages, then the
request will fail with a NoValidHost error.
109
Red Hat OpenStack Platform 16.0 Instances and Images Guide
To enable vGPU in OpenStack Compute, create flavors that your cloud users can use to create Red Hat
Enterprise Linux (RHEL) instances with vGPU devices. Each instance can then support GPU workloads
with virtual GPU devices that correspond to the physical GPU devices.
The OpenStack Compute service tracks the number of vGPU devices that are available for each GPU
profile you define on each host. The Compute service schedules instances to these hosts based on the
flavor, attaches the devices, and monitors usage on an ongoing basis. When an instance is deleted, the
Compute service adds the vGPU devices back to the available pool.
You can enable only one vGPU type on each Compute node.
Resize and cold migration operations on an instance with a vGPU flavor does not automatically
re-allocate the vGPU resources to the instance. After you resize or migrate the instance, you
must rebuild it manually to re-allocate the vGPU resources.
By default, vGPU types on Compute hosts are not exposed to API users. To grant access, add
the hosts to a host aggregate. For more information, see Section 4.4, “Manage Host
Aggregates”.
If you use NVIDIA accelerator hardware, you must comply with the NVIDIA licensing
requirements. For example, NVIDIA vGPU GRID requires a licensing server. For more
information about the NVIDIA licensing requirements, see NVIDIA License Server Release Notes
on the NVIDIA website.
2. Prepare the GPU role, profile, and flavor for designating Compute nodes for vGPU.
110
CHAPTER 8. CONFIGURING VIRTUAL GPUS FOR INSTANCES
NOTE
To use an NVIDIA GRID vGPU, you must comply with the NVIDIA GRID licensing
requirements and you must have the URL of your self-hosted license server. For more
information, see the NVIDIA License Server Release Notes web page.
Procedure
1. Copy the overcloud image and add the gpu suffix to the copied image.
$ cp overcloud-full.qcow2 overcloud-full-gpu.qcow2
3. Download the NVIDIA GRID host driver RPM package that corresponds to your GPU device
from the NVIDIA website. To determine which driver you need, see the NVIDIA Driver
Downloads Portal.
NOTE
You must be a registered NVIDIA customer to download the drivers from the
portal.
4. Create an ISO image from the driver RPM package and save the image in the nvidia-host
directory.
111
Red Hat OpenStack Platform 16.0 Instances and Images Guide
5. Create a driver installation script for your Compute nodes. This script installs the NVIDIA GRID
host driver on each Compute node that you run it on. The following example creates a script
named install_nvidia.sh:
#/bin/bash
6. Customize the overcloud image by attaching the ISO image that you generated in Step 4, and
running the driver installation script that you created in Step 5:
8. Prepare the custom image files for upload to the OpenStack Image Service:
$ mkdir /var/image/x86_64/image
$ guestmount -a overcloud-full-gpu.qcow2 -i --ro image
$ cp image/boot/vmlinuz-3.10.0-862.14.4.el8.x86_64 ./overcloud-full-gpu.vmlinuz
$ cp image/boot/initramfs-3.10.0-862.14.4.el8.x86_64.img ./overcloud-full-gpu.initrd
9. From the undercloud, upload the custom image to the OpenStack Image Service:
Procedure
112
CHAPTER 8. CONFIGURING VIRTUAL GPUS FOR INSTANCES
1. To create the new ComputeGPU role file, copy the file /usr/share/openstack-tripleo-heat-
templates/roles/Compute.yaml to /usr/share/openstack-tripleo-heat-
templates/roles/ComputeGPU.yaml and edit the following file sections:
2. Generate a new roles data file named gpu_roles_data.yaml that includes the Controller,
Compute, and ComputeGpu roles.
#####################################################################
# Role: ComputeGpu #
#####################################################################
- name: ComputeGpu
description: |
GPU Compute Node role
CountDefault: 1
ImageDefault: overcloud-full-gpu
networks:
- InternalApi
- Tenant
- Storage
HostnameFormatDefault: '%stackname%-computegpu-%index%'
RoleParametersDefault:
TunedProfileName: "virtual-host"
# Deprecated & backward-compatible values (FIXME: Make parameters consistent)
# Set uses_deprecated_params to True if any deprecated params are used.
uses_deprecated_params: True
deprecated_param_image: 'NovaImage'
deprecated_param_extraconfig: 'NovaComputeExtraConfig'
deprecated_param_metadata: 'NovaComputeServerMetadata'
deprecated_param_scheduler_hints: 'NovaComputeSchedulerHints'
deprecated_param_ips: 'NovaComputeIPs'
113
Red Hat OpenStack Platform 16.0 Instances and Images Guide
deprecated_server_resource_name: 'NovaCompute'
deprecated_nic_config_name: 'compute-gpu.yaml'
ServicesDefault:
- OS::TripleO::Services::Aide
- OS::TripleO::Services::AuditD
- OS::TripleO::Services::BootParams
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::CephClient
- OS::TripleO::Services::CephExternal
- OS::TripleO::Services::CertmongerUser
- OS::TripleO::Services::Collectd
- OS::TripleO::Services::ComputeCeilometerAgent
- OS::TripleO::Services::ComputeNeutronCorePlugin
- OS::TripleO::Services::ComputeNeutronL3Agent
- OS::TripleO::Services::ComputeNeutronMetadataAgent
- OS::TripleO::Services::ComputeNeutronOvsAgent
- OS::TripleO::Services::Docker
- OS::TripleO::Services::Fluentd
- OS::TripleO::Services::IpaClient
- OS::TripleO::Services::Ipsec
- OS::TripleO::Services::Iscsid
- OS::TripleO::Services::Kernel
- OS::TripleO::Services::LoginDefs
- OS::TripleO::Services::MetricsQdr
- OS::TripleO::Services::MySQLClient
- OS::TripleO::Services::NeutronBgpVpnBagpipe
- OS::TripleO::Services::NeutronLinuxbridgeAgent
- OS::TripleO::Services::NeutronVppAgent
- OS::TripleO::Services::NovaCompute
- OS::TripleO::Services::NovaLibvirt
- OS::TripleO::Services::NovaLibvirtGuests
- OS::TripleO::Services::NovaMigrationTarget
- OS::TripleO::Services::ContainersLogrotateCrond
- OS::TripleO::Services::OpenDaylightOvs
- OS::TripleO::Services::Podman
- OS::TripleO::Services::Rhsm
- OS::TripleO::Services::RsyslogSidecar
- OS::TripleO::Services::Securetty
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::Snmp
- OS::TripleO::Services::Sshd
- OS::TripleO::Services::Timesync
- OS::TripleO::Services::Timezone
- OS::TripleO::Services::TripleoFirewall
- OS::TripleO::Services::TripleoPackages
- OS::TripleO::Services::Tuned
- OS::TripleO::Services::Vpp
- OS::TripleO::Services::OVNController
- OS::TripleO::Services::OVNMetadataAgent
3. Register the node for the overcloud. For more information, see Registering nodes for the
overcloud in the Director Installation and Usage guide.
4. Inspect the node hardware. For more information, see Inspecting the hardware of nodes in the
Director Installation and Usage guide.
5. Create the compute-vgpu-nvidia flavor to use to tag nodes that you want to designate for
114
CHAPTER 8. CONFIGURING VIRTUAL GPUS FOR INSTANCES
5. Create the compute-vgpu-nvidia flavor to use to tag nodes that you want to designate for
vGPU workloads:
(undercloud) [stack@director templates]$ openstack flavor create --id auto --ram 6144 --disk
40 --vcpus 4 compute-vgpu-nvidia
+----------------------------+--------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 40 |
| id | 9cb47954-be00-47c6-a57f-44db35be3e69 |
| name | compute-vgpu-nvidia |
| os-flavor-access:is_public | True |
| properties | |
| ram | 6144 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus |4 |
+----------------------------+--------------------------------------+
6. Tag each node that you want to designate for GPU workloads with the compute-vgpu-nvidia
profile.
8.2.3. Configuring the Compute node for vGPU and deploying the overcloud
You need to retrieve and assign the vGPU type that corresponds to the physical GPU device in your
environment, and prepare the environment files to configure the Compute node for vGPU.
Procedure
1. Install Red Hat Enterprise Linux and the NVIDIA GRID driver on a temporary Compute node and
launch the node. For more information about installing the NVIDIA GRID driver, see
Section 8.2.1, “Building a custom GPU overcloud image” .
2. On the Compute node, locate the vGPU type of the physical GPU device that you want to
enable. For libvirt, virtual GPUs are mediated devices, or mdev type devices. To discover the
supported mdev devices, enter the following command:
[root@overcloud-computegpu-0 ~]# ls
/sys/class/mdev_bus/0000\:06\:00.0/mdev_supported_types/
nvidia-11 nvidia-12 nvidia-13 nvidia-14 nvidia-15 nvidia-16 nvidia-17 nvidia-18 nvidia-19
nvidia-20 nvidia-21 nvidia-210 nvidia-22
115
Red Hat OpenStack Platform 16.0 Instances and Images Guide
resource_registry:
OS::TripleO::Compute::Net::SoftwareConfig: /home/stack/templates/nic-
configs/compute.yaml
OS::TripleO::ComputeGpu::Net::SoftwareConfig: /home/stack/templates/nic-
configs/compute-gpu.yaml
OS::TripleO::Controller::Net::SoftwareConfig: /home/stack/templates/nic-
configs/controller.yaml
#OS::TripleO::AllNodes::Validation: OS::Heat::None
4. Add the following parameters to the node-info.yaml file to specify the number of GPU
Compute nodes, and the flavor to use for the GPU-designated Compute nodes:
parameter_defaults:
OvercloudControllerFlavor: control
OvercloudComputeFlavor: compute
OvercloudComputeGpuFlavor: compute-vgpu-nvidia
ControllerCount: 1
ComputeCount: 0
ComputeGpuCount: 1
5. Create a gpu.yaml file to specify the vGPU type of your GPU device:
parameter_defaults:
ComputeGpuExtraConfig:
nova::compute::vgpu::enabled_vgpu_types:
- nvidia-18
NOTE
Each physical GPU supports only one virtual GPU type. If you specify multiple
vGPU types in this property, only the first type is used.
6. Deploy the overcloud, adding your new role and environment files to the stack along with your
other environment files:
116
CHAPTER 8. CONFIGURING VIRTUAL GPUS FOR INSTANCES
Procedure
1. Create an instance with the hardware and software profile that your vGPU instances require:
(overcloud) [stack@director ~]$ openstack server create --flavor <flavor> --image <image>
temp_vgpu_instance
Replace <flavor> with the name or ID of the flavor that has the hardware profile that your
vGPU instances require. For information on default flavors, see Manage flavors.
Replace <image> with the name or ID of the image that has the software profile that your
vGPU instances require. For information on downloading RHEL cloud images, see Image
service.
2. Log in to the instance as a cloud-user. For more information, see Log in to an Instance .
3. Create the gridd.conf NVIDIA GRID license file on the instance, following the NVIDIA guidance:
Licensing an NVIDIA vGPU on Linux by Using a Configuration File .
4. Install the GPU driver on the instance. For more information about installing an NVIDIA driver,
see Installing the NVIDIA vGPU Software Graphics Driver on Linux .
NOTE
Use the hw_video_model image property to define the GPU driver type. You
can choose none if you want to disable the emulated GPUs for your vGPU
instances. For more information about supported drivers, see Appendix A, Image
Configuration Parameters.
Procedure
(overcloud) [stack@virtlab-director2 ~]$ openstack flavor create --vcpus 6 --ram 8192 --disk
100 m1.small-gpu
+----------------------------+--------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 100 |
| id | a27b14dd-c42d-4084-9b6a-225555876f68 |
117
Red Hat OpenStack Platform 16.0 Instances and Images Guide
| name | m1.small-gpu |
| os-flavor-access:is_public | True |
| properties | |
| ram | 8192 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus |6 |
+----------------------------+--------------------------------------+
2. Assign a vGPU resource to the flavor that you created. You can assign only one vGPU for each
instance.
Procedure
2. Log in to the instance as a cloud-user. For more information, see Log in to an Instance .
3. To verify that the GPU is accessible from the instance, run the following command from the
instance:
118
CHAPTER 8. CONFIGURING VIRTUAL GPUS FOR INSTANCES
You can use PCI passthrough to attach a physical PCI device, such as a graphics card, to an instance. If
you use PCI passthrough for a device, the instance reserves exclusive access to the device for
performing tasks, and the device is not available to the host.
Prerequisites
The pciutils package is installed on the physical servers that have the PCI cards.
The GPU driver is available to install on the GPU instances. For more information, see
Section 8.2.1, “Building a custom GPU overcloud image” .
Procedure
1. To determine the vendor ID and product ID for each passthrough device type, run the following
command on the physical server that has the PCI cards:
For example, to determine the vendor and product ID for an NVIDIA GPU, run the following
command:
2. To configure the Controller node on the overcloud for PCI passthrough, create an environment
file, for example, pci_passthru_controller.yaml.
parameter_defaults:
NovaSchedulerDefaultFilters:
['RetryFilter','AvailabilityZoneFilter','ComputeFilter','ComputeCapabilitiesFilter','ImageProperties
Filter','ServerGroupAntiAffinityFilter','ServerGroupAffinityFilter','PciPassthroughFilter','NUMATo
pologyFilter']
4. To specify the PCI alias for the devices on the Controller node, add the following to
pci_passthru_controller.yaml:
ControllerExtraConfig:
nova::pci::aliases:
- name: "t4"
product_id: "1eb8"
vendor_id: "10de"
- name: "v100"
product_id: "1db4"
vendor_id: "10de"
NOTE
If the nova-api service is running in a role other than the Controller, then replace
ControllerExtraConfig with the user role, in the format <Role>ExtraConfig.
119
Red Hat OpenStack Platform 16.0 Instances and Images Guide
5. To configure the Compute node on the overcloud for PCI passthrough, create an environment
file, for example, pci_passthru_compute.yaml.
6. To specify the allowed PCIs for the devices on the Compute node, add the following to
pci_passthru_compute.yaml:
parameter_defaults:
NovaPCIPassthrough:
- vendor_id: "10de"
product_id: "1eb8"
7. To enable IOMMU in the server BIOS of the Compute nodes to support PCI passthrough, add
the KernelArgs parameter to pci_passthru_compute.yaml:
parameter_defaults:
...
ComputeParameters:
KernelArgs: "intel_iommu=on iommu=pt"
8. Deploy the overcloud, adding your custom environment files to the stack along with your other
environment files:
9. Configure a flavor to request the PCI devices. The following example requests two devices,
each with a vendor ID of 10de and a product ID of 13f2:
11. Log in to the instance as a cloud-user. For more information, see Log in to an Instance .
12. Install the GPU driver on the instance. For example, run the following script to install an NVIDIA
driver:
$ sh NVIDIA-Linux-x86_64-430.24-grid.run
Verification
1. To verify that the GPU is accessible from the instance, run the following command from the
instance:
2. To check the NVIDIA System Management Interface status, run the following command from
the instance:
120
CHAPTER 8. CONFIGURING VIRTUAL GPUS FOR INSTANCES
$ nvidia-smi
Example output:
-----------------------------------------------------------------------------
| NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2 |
|---------------------------------------------------------------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|=======================================================================
====|
| 0 Tesla T4 Off | 00000000:01:00.0 Off | 0|
| N/A 43C P0 20W / 70W | 0MiB / 15109MiB | 0% Default |
---------------------------------------------------------------------------
-----------------------------------------------------------------------------
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|===========================================================================
==|
| No running processes found |
-----------------------------------------------------------------------------
121
Red Hat OpenStack Platform 16.0 Instances and Images Guide
building a real-time image with real-time kernel and Real-Time KVM (RT-KVM) kernel module
For a use-case example of Real-time Compute deployment for NFV workloads, see the Example:
Configuring OVS-DPDK with ODL and VXLAN tunnelling section in the Network Functions Virtualization
Planning and Configuration Guide.
NOTE
Real-time Compute nodes are supported only with Red Hat Enterprise Linux version 7.5
or later.
Before you can deploy Real-time Compute in your overcloud, you must enable Red Hat Enterprise Linux
Real-Time KVM (RT-KVM), configure your BIOS to support real-time, and build the real-time image.
Prerequisites
You must use Red Hat certified servers for your RT-KVM Compute nodes. See Red Hat
Enterprise Linux for Real Time 7 certified servers for details.
You must enable the rhel-8-for-x86_64-nfv-rpms repository for RT-KVM to build the real-time
image.
NOTE
You need a separate subscription to Red Hat OpenStack Platform for Real Time
before you can access this repository. For details on managing repositories and
subscriptions for your undercloud, see the Registering and updating your
undercloud section in the Director Installation and Usage guide.
To check which packages will be installed from the repository, run the following command:
122
CHAPTER 9. CONFIGURING REAL-TIME COMPUTE
rpms
kernel-rt-debug-kvm.x86_64 4.18.0-80.7.1.rt9.153.el8_0 rhel-8-for-x86_64-nfv-
rpms
kernel-rt-devel.x86_64 4.18.0-80.7.1.rt9.153.el8_0 rhel-8-for-x86_64-nfv-
rpms
kernel-rt-doc.noarch 4.18.0-80.7.1.rt9.153.el8_0 rhel-8-for-x86_64-nfv-rpms
kernel-rt-kvm.x86_64 4.18.0-80.7.1.rt9.153.el8_0 rhel-8-for-x86_64-nfv-
rpms
[ output omitted…]
1. Install the libguestfs-tools package on the undercloud to get the virt-customize tool:
IMPORTANT
Replace the username and password values with your Red Hat customer account details. For
general information about building a Real-time overcloud image, see the Modifying the Red Hat
Enterprise Linux OpenStack Platform Overcloud Image with virt-customize knowledgebase
article.
123
Red Hat OpenStack Platform 16.0 Instances and Images Guide
5. Find the SKU of the Red Hat OpenStack Platform for Real Time subscription. The SKU might be
located on a system that is already registered to the Red Hat Subscription Manager with the
same account and credentials. For example:
6. Attach the Red Hat OpenStack Platform for Real Time subscription to the image:
set -eux
# END OF SCRIPT
9. Re-label SELinux:
NOTE
The software version in the vmlinuz and initramfs filenames vary with the kernel
version.
124
CHAPTER 9. CONFIGURING REAL-TIME COMPUTE
You now have a real-time image you can use with the ComputeRealTime composable role on select
Compute nodes.
Power Management
Hyper-Threading
Logical processors
See Setting BIOS parameters for descriptions of these settings and the impact of disabling them. See
your hardware manufacturer documentation for complete details on how to change BIOS settings.
Procedure
cp /usr/share/openstack-tripleo-heat-templates/environments/compute-real-time-
example.yaml /home/stack/templates/compute-real-time.yaml
KernelArgs: Arguments to pass to the kernel of the Real-time Compute nodes. For
example, you can use default_hugepagesz=1G hugepagesz=1G hugepages=
<number_of_1G_pages_to_reserve> hugepagesz=2M hugepages=
<number_of_2M_pages> to define the memory requirements of guests that have huge
pages with multiple sizes. In this example, the default size is 1GB but you can also reserve 2M
huge pages.
2. Add the ComputeRealTime role to your roles data file and regenerate the file. For example:
125
Red Hat OpenStack Platform 16.0 Instances and Images Guide
This command generates a ComputeRealTime role with contents similar to the following
example, and also sets the ImageDefault option to overcloud-realtime-compute.
- name: ComputeRealTime
description: |
Compute role that is optimized for real-time behaviour. When using this role
it is mandatory that an overcloud-realtime-compute image is available and
the role specific parameters IsolCpusList, NovaComputeCpuDedicatedSet and
NovaComputeCpuSharedSet are set accordingly to the hardware of the real-time compute
nodes.
CountDefault: 1
networks:
InternalApi:
subnet: internal_api_subnet
Tenant:
subnet: tenant_subnet
Storage:
subnet: storage_subnet
HostnameFormatDefault: '%stackname%-computerealtime-%index%'
ImageDefault: overcloud-realtime-compute
RoleParametersDefault:
TunedProfileName: "realtime-virtual-host"
KernelArgs: "" # these must be set in an environment file
IsolCpusList: "" # or similar according to the hardware
NovaComputeCpuDedicatedSet: "" # of real-time nodes
NovaComputeCpuSharedSet: "" #
NovaLibvirtMemStatsPeriodSeconds: 0
ServicesDefault:
- OS::TripleO::Services::Aide
- OS::TripleO::Services::AuditD
- OS::TripleO::Services::BootParams
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::CephClient
- OS::TripleO::Services::CephExternal
- OS::TripleO::Services::CertmongerUser
- OS::TripleO::Services::Collectd
- OS::TripleO::Services::ComputeCeilometerAgent
- OS::TripleO::Services::ComputeNeutronCorePlugin
- OS::TripleO::Services::ComputeNeutronL3Agent
- OS::TripleO::Services::ComputeNeutronMetadataAgent
- OS::TripleO::Services::ComputeNeutronOvsAgent
- OS::TripleO::Services::Docker
- OS::TripleO::Services::Fluentd
- OS::TripleO::Services::IpaClient
- OS::TripleO::Services::Ipsec
- OS::TripleO::Services::Iscsid
- OS::TripleO::Services::Kernel
- OS::TripleO::Services::LoginDefs
- OS::TripleO::Services::MetricsQdr
- OS::TripleO::Services::MySQLClient
- OS::TripleO::Services::NeutronBgpVpnBagpipe
- OS::TripleO::Services::NeutronLinuxbridgeAgent
126
CHAPTER 9. CONFIGURING REAL-TIME COMPUTE
- OS::TripleO::Services::NeutronVppAgent
- OS::TripleO::Services::NovaCompute
- OS::TripleO::Services::NovaLibvirt
- OS::TripleO::Services::NovaLibvirtGuests
- OS::TripleO::Services::NovaMigrationTarget
- OS::TripleO::Services::ContainersLogrotateCrond
- OS::TripleO::Services::OpenDaylightOvs
- OS::TripleO::Services::Podman
- OS::TripleO::Services::Rhsm
- OS::TripleO::Services::RsyslogSidecar
- OS::TripleO::Services::Securetty
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::SkydiveAgent
- OS::TripleO::Services::Snmp
- OS::TripleO::Services::Sshd
- OS::TripleO::Services::Timesync
- OS::TripleO::Services::Timezone
- OS::TripleO::Services::TripleoFirewall
- OS::TripleO::Services::TripleoPackages
- OS::TripleO::Services::Vpp
- OS::TripleO::Services::OVNController
- OS::TripleO::Services::OVNMetadataAgent
For general information about custom roles and about the roles-data.yaml, see the Roles
section.
3. Create the compute-realtime flavor to tag nodes that you want to designate for real-time
workloads. For example:
$ source ~/stackrc
$ openstack flavor create --id auto --ram 6144 --disk 40 --vcpus 4 compute-realtime
$ openstack flavor set --property "cpu_arch"="x86_64" --property
"capabilities:boot_option"="local" --property "capabilities:profile"="compute-realtime"
compute-realtime
4. Tag each node that you want to designate for real-time workloads with the compute-realtime
profile.
parameter_defaults:
OvercloudComputeRealTimeFlavor: compute-realtime
6. Run the openstack overcloud deploy command with the -e option and specify all the
environment files that you created, as well as the new roles file. For example:
127
Red Hat OpenStack Platform 16.0 Instances and Images Guide
The following example procedure uses a simple single-node deployment to test that the environment
variables and other supporting configuration is set up correctly. Actual performance results might vary,
depending on the number of nodes and guests that you deploy in your cloud.
parameter_defaults:
ComputeRealTimeParameters:
IsolCpusList: "1"
NovaComputeCpuDedicatedSet: "1"
NovaComputeCpuSharedSet: "0"
KernelArgs: "default_hugepagesz=1G hugepagesz=1G hugepages=16"
3. Deploy the overcloud, adding both your new real-time roles data file and your real-time
environment file to the stack along with your other environment files:
This command deploys one Controller node and one Real-time Compute node.
4. Log into the Real-time Compute node and check the following parameters. Replace <...> with
the values of the relevant parameters from the compute-real-time.yaml.
128
CHAPTER 9. CONFIGURING REAL-TIME COMPUTE
1. Make sure that the compute-realtime flavor exists on the overcloud, as described in the
Deploying the Real-time Compute Role section.
# openstack server create --image <rhel> --flavor r1.small --nic net-id=<dpdk-net> test-rt
3. Optionally, verify that the instance uses the assigned emulator threads.
Configure your flavor to use a dedicated CPU policy. To do so, set the hw:cpu_policy parameter to
dedicated on the flavor. For example:
NOTE
Make sure that your resources quota has enough pCPUs for the Real-time Compute
nodes to consume.
129
Red Hat OpenStack Platform 16.0 Instances and Images Guide
To review an example configuration optimized for OVS-DPDK, see the Configuring the OVS-DPDK
parameters section of the Network Functions Virtualization Planning and Configuration Guide .
NOTE
If you do not need PMU metrics, then disable the vPMU to reduce latency by setting the PMU property
to "False" in the image or flavor used to create the instance:
Image: hw_pmu=False
Flavor: hw:pmu=False
130
APPENDIX A. IMAGE CONFIGURATION PARAMETERS
NOTE
Behavior set using image properties overrides behavior set using flavors. For more
information, see Section 4.3, “Manage Flavors” .
openrisc-OpenCores RISC
ppc-PowerPC 32-bit
ppc64-PowerPC 64-bit
131
Red Hat OpenStack Platform 16.0 Instances and Images Guide
s390x-S/390 64-bit
sparc64-Scalable Processor
Architecture, 64-bit
unicore32-Microprocessor Research
and Development Center RISC
Unicore32
132
APPENDIX A. IMAGE CONFIGURATION PARAMETERS
133
Red Hat OpenStack Platform 16.0 Instances and Images Guide
All vm_mode The virtual hvm -Fully virtualized. This is the mode used by
machine mode. QEMU and KVM.
This represents
the host/guest
ABI (application
binary interface)
used for the
virtual machine.
libvirt API driver hw_disk_bus Specifies the scsi, virtio, ide, or usb . Note that if using
type of disk iscsi, the hw_scsi_model needs to be set to
controller to virtio-scsi.
attach disk
devices to.
libvirt API driver hw_numa_nodes Number of Integer. For a detailed example of NUMA-
NUMA nodes to topology definition, see the hw:NUMA_def key in
expose to the Add Metadata.
instance (does
not override
flavor
definition).
134
APPENDIX A. IMAGE CONFIGURATION PARAMETERS
135
Red Hat OpenStack Platform 16.0 Instances and Images Guide
libvirt API driver hw_rng_model Adds a random- virtio, or other supported device.
number
generator
device to the
image’s
instances. The
cloud
administrator
can enable and
control device
behavior by
configuring the
instance’s flavor.
By default:
The
genera
tor
device
is
disable
d.
/dev/ra
ndom
is used
as the
default
entrop
y
source.
To
specify
a
physica
l HW
RNG
device,
set
rng_d
ev_pa
th to
"/dev/
hwrng"
in your
Compu
te
environ
ment
file.
136
APPENDIX A. IMAGE CONFIGURATION PARAMETERS
libvirt API driver hw_video_model The video image vga, cirrus , vmvga, xen, or qxl
driver used.
libvirt API driver hw_video_ram Maximum RAM Integer in MB (for example, 64)
for the video
image. Used
only if a
hw_video:ram
_max_mb
value has been
set in the
flavor’s
extra_specs
and that value is
higher than the
value set in
hw_video_ra
m.
137
Red Hat OpenStack Platform 16.0 Instances and Images Guide
libvirt API driver hw_vif_model Specifies the The valid options depend on the configured
and VMware API model of virtual hypervisor.
driver network
interface device KVM and QEMU: e1000, ne2k_pci,
pcnet, rtl8139, and virtio.
to use.
VMware: e1000, e1000e, VirtualE1000,
VirtualE1000e, VirtualPCNet32,
VirtualSriovEthernetCard, and
VirtualVmxnet.
138
APPENDIX A. IMAGE CONFIGURATION PARAMETERS
VMware API vmware_ostype A VMware For more information, see Images with VMware
driver GuestID which vSphere.
describes the
operating
system installed
in the image.
This value is
passed to the
hypervisor when
creating a
virtual machine.
If not specified,
the key defaults
to otherGuest .
139
Red Hat OpenStack Platform 16.0 Instances and Images Guide
140
APPENDIX B. ENABLING THE LAUNCH INSTANCE WIZARD
The Launch Instance form is enabled by default, but you can enable the Launch Instance wizard at any
time. You can also enable both the Launch Instance form and the Launch Instance wizard at the same
time. The Launch Instance wizard simplifies the steps required to create instances.
LAUNCH_INSTANCE_LEGACY_ENABLED = False
LAUNCH_INSTANCE_NG_ENABLED = True
The preferences for the Launch Instance form and Launch Instance wizard are updated.
If you enabled only one of these options, the Launch Instance button in the dashboard opens that
option by default. If you enabled both options, two Launch Instance buttons are displayed in the
dashboard, with the button on the left opening the Launch Instance wizard and the button on the right
opening the Launch Instance form.
141