Red Hat Openstack Platform 13 Instances and Images Guide
Total Page:16
File Type:pdf, Size:1020Kb
Red Hat OpenStack Platform 13 Instances and Images Guide Managing Instances and Images Last Updated: 2021-09-24 Red Hat OpenStack Platform 13 Instances and Images Guide Managing Instances and Images OpenStack Team [email protected] Legal Notice Copyright © 2021 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. Java ® is a registered trademark of Oracle and/or its affiliates. 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. All other trademarks are the property of their respective owners. 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 .M . A. .K . I.N . .G . .O . P. .E . N. S. .O . U. .R . C. .E . .M . .O . R. .E . .I N. .C . L. .U . S. .I V. .E . 6. .C . H. .A . P. .T .E . R. 1.. .I .M . A. .G . .E . S. .E . R. .V . I.C . E. 7. 1.1. UNDERSTANDING AND OPTIMIZING THE IMAGE SERVICE 7 1.1.1. Supported Image service (glance) back ends 7 1.1.2. Image signing and verification 8 1.1.3. Image conversion 9 1.1.4. Image introspection 9 1.1.5. Interoperable image import 10 1.2. MANAGING IMAGES 10 1.2.1. Creating an image 10 1.2.1.1. Using a KVM guest image with Red Hat OpenStack Platform 10 1.2.1.2. Creating custom Red Hat Enterprise Linux or Windows images 11 1.2.1.2.1. Creating a Red Hat Enterprise Linux 7 image 12 1.2.1.2.2. Creating a Red Hat Enterprise Linux 6 image 14 1.2.1.2.3. Creating a Windows image 17 1.2.2. Uploading an image 19 1.2.3. Updating an image 20 1.2.4. Importing an image 21 1.2.4.1. Importing from a remote URI 21 1.2.4.2. Importing from a local volume 21 1.2.5. Deleting an image 22 1.2.6. Enabling image conversion 22 1.2.7. Converting an image to RAW format 22 1.2.7.1. Configuring the Image service to accept only RAW and ISO 23 1.2.8. Storing an image in RAW format 23 .C . H. .A . P. .T .E . R. 2. C. .O . .N . F. .I G. .U . .R .I .N . G. T. .H . E. C. .O . M. P. .U . T. .E . .( N. O. .V . A. .) . S. E. .R . V. .I C. .E . .2 . 5. 2.1. CONFIGURING MEMORY FOR OVERALLOCATION 26 2.2. CALCULATING RESERVED HOST MEMORY ON COMPUTE NODES 26 2.3. CALCULATING SWAP SIZE 27 .C . H. .A . P. .T .E . R. 3. C. O. .N . F. .I G. U. .R . I.N . G. O. P. .E .N . .S .T . A. .C . K. C. .O . .M . P. .U . T. .E . .S .T . O. R. A. .G . .E . .2 . 8. 3.1. ARCHITECTURE OVERVIEW 28 3.2. CONFIGURATION 29 3.3. ENABLING SERVICE TOKENS BETWEEN THE COMPUTE SERVICE AND THE BLOCK STORAGE SERVICE 31 .C . H. .A . P. .T .E . R. 4. .V . I.R . T. U. .A . .L . M. A. .C . H. .I N. E. .I N. S. T. .A . N. .C . E. .S . .3 .4 . 4.1. MANAGING INSTANCES 34 4.1.1. Adding components 34 4.1.2. Launching an instance 34 4.1.2.1. Launching instance options 35 4.1.3. Updating an instance 37 4.1.4. Resizing an instance 38 4.1.5. Connecting to an instance 39 4.1.5.1. Accessing an instance console by using the dashboard 39 4.1.5.2. Accessing an instance console by using the CLI 40 4.1.6. Viewing instance usage 40 4.1.7. Deleting an instance 40 4.1.8. Managing multiple instances simultaneously 41 4.2. MANAGING INSTANCE SECURITY 41 1 Red Hat OpenStack Platform 13 Instances and Images Guide 4.2.1. Managing key pairs 41 4.2.1.1. Creating a key pair 41 4.2.1.2. Importing a key pair 41 4.2.1.3. Deleting a key pair 42 4.2.2. Creating a security group 42 4.2.3. Creating, assigning, and releasing floating IP addresses 42 4.2.3.1. Allocating a floating IP to the project 42 4.2.3.2. Assigning a floating IP 42 4.2.3.3. Releasing a floating IP 43 4.2.4. Logging in to an instance 43 4.2.5. Injecting an admin password into an instance 44 4.3. MANAGING FLAVORS 45 4.3.1. Updating configuration permissions 46 4.3.2. Creating a flavor 46 4.3.3. Updating general attributes 47 4.3.4. Updating flavor metadata 47 4.3.4.1. Viewing metadata 47 4.3.4.2. Adding metadata 47 4.4. MANAGING HOST AGGREGATES 52 4.4.1. Enabling host aggregate scheduling 53 4.4.2. Viewing availability zones or host aggregates 53 4.4.3. Adding a host aggregate 53 4.4.4. Updating a host aggregate 54 4.4.5. Deleting a host aggregate 54 4.5. SCHEDULING HOSTS 55 4.5.1. Configuring scheduling filters 56 4.5.2. Configuring scheduling weights 59 4.5.3. Reserving NUMA nodes with PCI devices 65 4.5.4. Configuring emulator threads to run on dedicated physical CPU 65 4.6. MANAGING INSTANCE SNAPSHOTS 66 4.6.1. Creating an instance snapshot 67 4.6.2. Managing a snapshot 68 4.6.3. Rebuilding an instance to a state in a snapshot 68 4.6.4. Consistent snapshots 68 4.7. USING RESCUE MODE FOR INSTANCES 68 4.7.1. Preparing an image for a rescue mode instance 69 4.7.1.1. Rescuing an image that uses ext4 file system 69 4.7.2. Adding the rescue image to the OpenStack Image service 69 4.7.3. Launching an instance in rescue mode 70 4.7.4. Unrescuing an instance 70 4.8. CREATING A CUSTOMIZED INSTANCE 71 4.8.1. Customizing an instance by using user data 71 4.8.2. Customizing an instance by using metadata 72 4.8.3. Customizing an instance by using a config drive 73 .C . H. .A . P. .T .E . R. 5. M. I.G . .R . A. .T .I .N . G. V. .I R. .T . U. .A . L. M. .A . C. .H . .I N. .E . .I N. .S . T. .A . N. .C . E. .S . B. .E . T. .W . .E .E . N. C. .O . .M . .P . U. .T .E . .N . O. D. .E . S. .7 . 4. 5.1. MIGRATION TYPES 74 5.2. MIGRATION CONSTRAINTS 76 5.3. PREPARING TO MIGRATE 78 5.4. ADDITIONAL PREPARATION FOR DPDK INSTANCES 78 5.5. COLD MIGRATING AN INSTANCE 80 5.6. LIVE MIGRATING AN INSTANCE 81 5.7. CHECKING MIGRATION STATUS 82 2 Table of Contents 5.8. COMPLETING THE MIGRATION 83 5.9. EVACUATING AN INSTANCE 84 5.9.1. Evacuating one instance 84 5.9.2. Evacuating all instances on a host 85 5.9.3. Configuring shared storage 85 5.10. TROUBLESHOOTING MIGRATION 87 5.10.1. Errors during migration 87 5.10.2. Never-ending live migration 87 5.10.3. Instance performance degrades after migration 88 .C . H. .A . P. .T .E . R. 6. .C . O. .N . F. .I G. U. .R . I.N . G. P. .C . I. .P .A . S. .S . T. .H . R. .O . U. .G . .H . .9 .0 . 6.1. DESIGNATING COMPUTE NODES FOR PCI PASSTHROUGH 90 6.2. CONFIGURING A PCI PASSTHROUGH COMPUTE NODE 92 6.3. PCI PASSTHROUGH DEVICE TYPE FIELD 95 6.4. GUIDELINES FOR CONFIGURING NOVAPCIPASSTHROUGH 95 .C . H. .A . P. .T .E . R. 7. D. A. .T .A . B. .A . S. .E . .C . L. E. .A . N. .I N. G. .9 .6 . 7.1. CONFIGURING DATABASE MANAGEMENT 96 7.2. CONFIGURATION OPTIONS FOR OPENSTACK COMPUTE (NOVA) AUTOMATED DATABASE MANAGEMENT 96 .C . H. .A . P. .T .E . R. 8. .C . O. .N . F. .I G. U. .R . I.N . G. C. .O . .M . .P . U. .T .E .