NOVA-MANAGE(1)
π NOVA-MANAGE(1)
okay bestie, welcome to nova-manage, the manual page for the nova management tool π β the command-line queen that runs the admin side of OpenStack Compute. Sit down, grab a strawberry π, we're doing this.
β¨ NAME β¨
nova-manage β the management tool for the OpenStack Compute services. it's giving "I run the cloud" energy and honestly? it does. π
πΈ SYNOPSIS πΈ
nova-manage <category> [<action> [<options>...]]
π¦ DESCRIPTION π¦
nova-manage controls cloud computing instances by managing various admin-only aspects of Nova. so like, this is not the casual-user tool, this is the "I have root and I know things" tool. iykyk. π
the standard pattern for executing a nova-manage command is, literally:
nova-manage <category> <command> [<args>]
run it with no arguments at all and it'll show you a list of available command categories:
nova-manage
and you can also run with a category argument like db to see a list of all commands in that category:
nova-manage db
main character energy: categories are the vibe, commands are the plot. π
π OPTIONS π
these options apply to all commands and may be given in any order, before or after commands. individual commands may provide additional options. options without an argument can be combined after a single dash. (yes, that's a real little shortcut, no cap.)
-h,--helpβ show a help message and exit. the classic. π«Ά--config-dir <dir>β path to a config directory to pull*.conffiles from. this file set is sorted, so as to provide a predictable parse order if individual options are over-ridden. the set is parsed after the file(s) specified via previous--config-filearguments, hence over-ridden options in the directory take precedence. β οΈ this option must be set from the command-line.--config-file <path>β path to a config file to use. multiple config files can be specified, with values in later files taking precedence. defaults toNone. this option must be set from the command-line.--log-config-append <path>,--log-config <path>,--log_config <path>β the name of a logging configuration file. this file is appended to any existing logging configuration files. for details about logging configuration files, see the Python logging module documentation. note that when logging configuration files are used then all logging configuration is set in the configuration file and other logging configuration options are ignored (for example,--log-date-format). π--log-date-format <format>β defines the format string for%(asctime)sin log records. default:None. this option is ignored if--log-config-appendis set.--log-dir <dir>,--logdir <dir>β the base directory used for relativelog_filepaths. this option is ignored if--log-config-appendis set.--log-file PATH,--logfile <path>β name of log file to send logging output to. if no default is set, logging will go tostderras defined byuse_stderr. this option is ignored if--log-config-appendis set.--syslog-log-facility SYSLOG_LOG_FACILITYβ syslog facility to receive log lines. this option is ignored if--log-config-appendis set.--use-journalβ enable journald for logging. if running in a systemd environment you may wish to enable journal support. doing so will use the journal native protocol which includes structured metadata in addition to log messages. this option is ignored if--log-config-appendis set.--nouse-journalβ the inverse of--use-journal. π--use-jsonβ use JSON formatting for logging. this option is ignored if--log-config-appendis set.--nouse-jsonβ the inverse of--use-json.--use-syslogβ use syslog for logging. existing syslog format is DEPRECATED and will be changed later to honor RFC5424. this option is ignored if--log-config-appendis set.--nouse-syslogβ the inverse of--use-syslog.--watch-log-fileβ uses logging handler designed to watch file system. when log file is moved or removed this handler will open a new log file with specified path instantaneously. it makes sense only if--log-fileoption is specified and Linux platform is used. this option is ignored if--log-config-appendis set.--nowatch-log-fileβ the inverse of--watch-log-file.--debug,-dβ if enabled, the logging level will be set toDEBUGinstead of the defaultINFOlevel. turn it on when you want to see everything π--nodebugβ the inverse of--debug.--post-mortemβ allow post-mortem debugging.--nopost-mortemβ the inverse of--post-mortem.--versionβ show program's version number and exit. β¨
π DATABASE COMMANDS π
πΈ db version
nova-manage db version
print the current main database version. that's it, that's the whole thing, she's simple and she ate. π
π¦ db sync
nova-manage db sync [--local_cell] [VERSION]
upgrade the main database schema up to the most recent version, or up to VERSION if specified. by default, this command will also attempt to upgrade the schema for the cell0 database if it is mapped. if --local_cell is specified, then only the main database in the current cell is upgraded. the local database connection is determined by database.connection <#database.connection> in the configuration file, passed to nova-manage using the --config-file option(s).
refer to the nova-manage cells_v2 map_cell0 or nova-manage cells_v2 simple_cell_setup commands for more details on mapping the cell0 database. πΊοΈ
β οΈ this command should be run after nova-manage api_db sync. order matters, bestie, don't skip steps.
Options
--local_cellβ only sync db in the local cell: do not attempt to fan-out to all cells.
Return codes
0β successfully synced database schema. π1β failed to access cell0. π
Changed in version 20.0.0: (Train)
removed support for the legacy --version <version> argument.
Changed in version 24.0.0: (Xena)
migrated versioning engine to alembic. the optional VERSION argument is now expected to be an alembic-based version. sqlalchemy-migrate-based versions will be rejected. no old-school versions allowed, periodt.
π db archive_deleted_rows
nova-manage db archive_deleted_rows [--max_rows <rows>] [--verbose]
[--until-complete] [--before <date>] [--purge] [--all-cells] [--task-log]
[--sleep]
move deleted rows from production tables to shadow tables. note that the corresponding rows in the instance_mappings, request_specs and instance_group_member tables of the API database are purged when instance records are archived and thus, api_database.connection <#api_database.connection> is required in the config file. yes, you literally need the API DB connection for this. π₯
if automating, this should be run continuously while the result is 1, stopping at 0, or use the --until-complete option.
Changed in version 24.0.0: (Xena)
added --task-log, --sleep options.
Options
--max_rows <rows>β maximum number of deleted rows to archive. defaults to1000. note that this number does not include the corresponding rows, if any, that are removed from the API database for deleted instances.--before <date>β archive rows that have been deleted before<date>. accepts date strings in the default format output by thedatecommand, as well asYYYY-MM-DD[HH:mm:ss]. for example:
# Purge shadow table rows older than a specific date
nova-manage db archive_deleted_rows --before 2015-10-21
# or
nova-manage db archive_deleted_rows --before "Oct 21 2015"
# Times are also accepted
nova-manage db archive_deleted_rows --before "2015-10-21 12:00"
note that relative dates (such as yesterday) are not supported natively. the date command can be helpful here:
# Archive deleted rows more than one month old
nova-manage db archive_deleted_rows --before "$(date -d 'now - 1 month')"
--verboseβ print how many rows were archived per table. numbers!! we love numbers β¨--until-completeβ run continuously until all deleted rows are archived. use--max_rowsas a batch size for each iteration.--purgeβ purge all data from shadow tables after archive completes. dramatic. π--all-cellsβ run command across all cells.--task-logβ also archivetask_logtable records. note thattask_logrecords are never deleted, so archiving them will move all of thetask_logrecords up to now into the shadow tables. it is recommended to also specify the--beforeoption to avoid races for those consumingtask_logrecord data via the/os-instance_usage_audit_log <https://docs.openstack.org/api-ref/compute/#server-usage-audit-log-os-instance-usage-audit-log>API (example: Telemetry).--sleepβ the amount of time in seconds to sleep between batches when--until-completeis used. defaults to0.
okay that's the first chunk, there's more coming, don't go anywhere π
β¨ Return codes β¨
Ok bestie, here's the little decoder ring for what this command hands back to you:
0β Nothing was archived. Crickets. Zero. Nada. π1β Some number of rows were archived. We did something! π2β Invalid value for--max_rows.3β No connection to the API database could be established usingapi_database.connection.4β Invalid value for--before.255β An unexpected error occurred. π«
π§Ή db purge
nova-manage db purge [--all] [--before <date>] [--verbose] [--all-cells]
This one deletes rows from the shadow tables. Just yeets them. Gone. ποΈ
Heads up though: for --all-cells to actually work, the API database connection information must be configured. No config, no vibes.
Added in version 18.0.0: (Rocky)
Options
--allβ Purge all the rows in the shadow tables. Every last one. No crumbs left. π--before <date>β Deletes archived rows that were deleted from Nova before<date>. It accepts date strings in the default format that thedatecommand spits out, plusYYYY-MM-DD[HH:mm:ss]. For example:
# Purge shadow table rows deleted before specified date
nova-manage db purge --before 2015-10-21
# or
nova-manage db purge --before "Oct 21 2015"
# Times are also accepted
nova-manage db purge --before "2015-10-21 12:00"
Also important: relative dates (like yesterday) are not supported natively. That's literally why the date command exists, bestie β let it do the math for you:
# Archive deleted rows more than one month old
nova-manage db purge --before "$(date -d 'now - 1 month')"
--verboseβ Prints out info about the purged records. So you can see exactly what got deleted. Nosy but valid.--all-cellsβ Run against all cell databases. All of them. Every single one. π
Return codes
0β Rows were deleted. Success slay. β1β Required arguments were not provided. You forgot something, bestie. π2β Invalid value for--before.3β Nothing was purged.4β No connection to the API database could be established usingapi_database.connection.
π db online_data_migrations
nova-manage db online_data_migrations [--max-count <count>]
Performs data migration to update all live data. Live! Real-time! Main character energy. β¨
The way this works: you call this command after upgrading the database schema and the nova services on all controller nodes. If it exits with partial updates (exit status 1) you should call it again β even if some updates initially generated errors β because some updates may depend on others having already completed. It's a whole chain, iykyk.
If it exits with status 2, intervention is required to resolve the issue causing the remaining updates to fail. Like, a human has to get involved. π
It should be considered successfully completed only when the exit status is 0. Periodt.
For example:
$ nova-manage db online_data_migrations
Running batches of 50 until complete
2 rows matched query migrate_instances_add_request_spec, 0 migrated
2 rows matched query populate_queued_for_delete, 2 migrated
+---------------------------------------------+--------------+-----------+
| Migration | Total Needed | Completed |
+---------------------------------------------+--------------+-----------+
| create_incomplete_consumers | 0 | 0 |
| migrate_instances_add_request_spec | 2 | 0 |
| migrate_quota_classes_to_api_db | 0 | 0 |
| migrate_quota_limits_to_api_db | 0 | 0 |
| migration_migrate_to_uuid | 0 | 0 |
| populate_missing_availability_zones | 0 | 0 |
| populate_queued_for_delete | 2 | 2 |
| populate_uuids | 0 | 0 |
+---------------------------------------------+--------------+-----------+
So in that example up there, the migrate_instances_add_request_spec migration found two candidate records but did not need to perform any kind of data migration for either of them. And for the populate_queued_for_delete migration, two candidate records were found which did require a data migration. Since --max-count defaults to 50 and only two records were migrated with no more candidates remaining, the command completed successfully with exit code 0. Ate and left no crumbs. π
Added in version 13.0.0: (Mitaka)
Options
--max-count <count>β Controls the maximum number of objects to migrate in a given call. If you don't specify it, migration will occur in batches of50until fully complete.
Return codes
0β No (further) updates are possible. Done done.1β Some updates were completed successfully. Note that not all updates may have succeeded, so like... call it again. fr fr.2β Some updates generated errors and no other migrations were able to take effect in the last batch attempted. π¨ Intervention time.127β Invalid input was provided.
π¦ db ironic_compute_node_move
nova-manage db ironic_compute_node_move --ironic-node-uuid <uuid> --destination-host <host>
Moves ironic nodes β plus any instances attached to them β between nova-compute services. Relocation era. π¦
This is genuinely useful when you're migrating away from using peer_list and multiple hash ring balanced nova-compute servers, over to the new ironic shard system. Glow up.
Here's the order of operations, and yes it matters, bestie:
First you must turn off the nova-compute service that currently manages the Ironic host. Second, you mark that nova-compute service as forced down via the Nova API. Third, you make sure the new nova-compute service is correctly configured to target the appropriate shard (and optionally also a conductor group). Finally β and this is the fun part β most Ironic nodes should now move to the new service on their own, but any Ironic nodes that have instances on them will need to be manually moved to their new Ironic service by using this nova-manage command. πββοΈ
Added in version 28.0.0: (2023.2 Bobcat)
Options
--ironic-node-uuid <uuid>β The Ironic node uuid to be moved (which is also the Nova compute node uuid and the uuid of the corresponding resource provider in Placement). One uuid, three identities. Multitasking icon. π
Note that the Nova compute service that currently manages this Ironic node must first be marked a "forced down" via the Nova API β in a similar way to a down hypervisor that is about to have its VMs evacuated to a replacement hypervisor.
--destination-host <host>β Destination ironicnova-computeserviceCONF.host. That's where we're going. π
β¨ API DATABASE COMMANDS β¨
π
api_db version π
nova-manage api_db version
Prints the current API database version. That's it, that's the whole vibe. π
β¨ Added in version 2015.1.0: (Kilo)
π api_db sync π
nova-manage api_db sync [VERSION]
Upgrades the API database schema up to the most recent version, or to VERSION if you pass one. Important: this command does not create the API database β it just runs the schema migration scripts. The API database connection is determined by api_database.connection <#api_database.connection> in the configuration file passed to nova-manage.
Bestie, run this before nova-manage db sync, okay? Order matters. π
β¨ Added in version 2015.1.0: (Kilo)
π Changed in version 18.0.0: (Rocky) β Added support for upgrading the optional placement database if [placement_database]/connection is configured.
π Changed in version 20.0.0: (Train) β Removed support for upgrading the optional placement database, since placement is now a separate project. Also removed support for the legacy --version <version> argument.
π Changed in version 24.0.0: (Xena) β Migrated the versioning engine to alembic. The optional VERSION argument is now expected to be an alembic-based version. sqlalchemy-migrate-based versions will be rejected. π«
π¦ CELLS V2 COMMANDS π¦
πΈ cell_v2 simple_cell_setup πΈ
nova-manage cell_v2 simple_cell_setup [--transport-url <transport_url>]
Sets up a fresh cells v2 environment. If --transport-url is not specified, it will use the one defined by transport_url <#DEFAULT.transport_url> in the configuration file. Fresh start, clean slate, main character energy. β¨
β¨ Added in version 14.0.0: (Newton)
π Options π
--transport-url <transport_url>β The transport url for the cell message queue.
π Return codes π
0β Setup is completed.1β No hosts are reporting, meaning none can be mapped, or if the transport URL is missing or invalid.
π cell_v2 map_cell0 π
nova-manage cell_v2 map_cell0 [--database_connection <database_connection>]
Creates a cell mapping to the database connection for the cell0 database. If a database_connection is not specified, it will use the one defined by database.connection <#database.connection> in the configuration file passed to nova-manage. The cell0 database is used for instances that have not been scheduled to any cell. This generally applies to instances that have encountered an error before they have been scheduled. So it's like the waiting room for sad little instances. π₯Ί
β¨ Added in version 14.0.0: (Newton)
π Options π
--database_connection <database_connection>β The database connection URL for cell0. This is optional. If not provided, a standard database connection will be used based on the main database connection from nova configuration.
π Return codes π
0β cell0 is created successfully or has already been set up.
π§ cell_v2 map_instances π§
nova-manage cell_v2 map_instances --cell_uuid <cell_uuid>
[--max-count <max_count>] [--reset]
Maps instances to the provided cell. Instances in the nova database will be queried from oldest to newest and mapped to the provided cell. A --max-count can be set on the number of instance to map in a single run. Repeated runs of the command will start from where the last run finished, so it is not necessary to increase --max-count to finish. A --reset option can be passed which will reset the marker, thus making the command start from the beginning, as opposed to the default behavior of starting from where the last run finished.
If --max-count is not specified, all instances in the cell will be mapped in batches of 50. If you have a large number of instances, consider specifying a custom value and run the command until it exits with 0. So satisfying when it finally hits zero. π
β¨ Added in version 12.0.0: (Liberty)
π Options π
--cell_uuid <cell_uuid>β Unmigrated instances will be mapped to the cell with the UUID provided.--max-count <max_count>β Maximum number of instances to map. If not set, all instances in the cell will be mapped in batches of50. If you have a large number of instances, consider specifying a custom value and run the command until it exits with0.--resetβ The command will start from the beginning as opposed to the default behavior of starting from where the last run finished.
π Return codes π
0β All instances have been mapped.1β There are still instances to be mapped.127β Invalid value for--max-count.255β An unexpected error occurred.
π cell_v2 map_cell_and_hosts π
nova-manage cell_v2 map_cell_and_hosts [--name <cell_name>]
[--transport-url <transport_url>] [--verbose]
Creates a cell mapping to the database connection and message queue transport URL, and maps hosts to that cell. The database connection comes from the database.connection <#database.connection> defined in the configuration file passed to nova-manage. If --transport-url is not specified, it will use the one defined by transport_url <#DEFAULT.transport_url> in the configuration file. This command is idempotent (can be run multiple times), and the verbose option will print out the resulting cell mapping UUID. So go ahead, run it again, it's not mad. π
β¨ Added in version 13.0.0: (Mitaka)
π Options π
--transport-url <transport_url>β The transport url for the cell message queue.--name <cell_name>β The name of the cell.--verboseβ Output the cell mapping uuid for any newly mapped hosts.
π Return codes π
0β Successful completion.1β The transport url is missing or invalid.
π« cell_v2 verify_instance π«
nova-manage cell_v2 verify_instance --uuid <instance_uuid> [--quiet]
Verifies instance mapping to a cell. This command is useful to determine if the cells v2 environment is properly setup, specifically in terms of the cell, host, and instance mapping records required. It's like a vibe check for your cells. β
β¨ Added in version 14.0.0: (Newton)
π Options π
--uuid <instance_uuid>β The instance UUID to verify.--quietβ Do not print anything.
β¨ Return codes β¨
okay so if you're running this against an instance (iykyk), here's what the exit code is telling you:
0β π the instance was successfully mapped to a cell. we love to see it.1β the instance is not mapped to a cell. go look at themap_instancescommand, bestie.2β the cell mapping is missing. π so if you're upgrading from a cells v1 environment, hit up themap_cell_and_hostscommand; and if you're upgrading from a non-cells v1 environment, you want thesimple_cell_setupcommand.3β this is a deleted instance that still has an instance mapping just hanging around. awkward.4β this is an archived instance that still has an instance mapping. also awkward. β¨
π¦ cell_v2 create_cell π¦
nova-manage cell_v2 create_cell [--name <cell_name>]
[--transport-url <transport_url>]
[--database_connection <database_connection>] [--verbose] [--disabled]
so this one creates a cell mapping to the database connection + message queue transport URL. real "let's make this official" energy. π
if a database_connection isn't specified, it'll use the one defined by database.connection in the configuration file that was passed to nova-manage. and if --transport-url isn't specified, it uses the one defined by transport_url in the configuration file. the --verbose option will print out the resulting cell mapping UUID, which is lowkey satisfying ngl. all the cells you create are enabled by default. however β passing the --disabled option can create a pre-disabled cell, meaning no scheduling will happen to this cell at all. it's giving "we built the room but nobody's allowed in yet." π
Added in version 15.0.0: (Ocata)
Changed in version 18.0.0: (Rocky)
- Added
--disabledoption.
πΈ Options πΈ
--name <cell_name>β the name of the cell. give it a cute one.--database_connection <database_connection>β the database URL for the cell database. π₯--transport-url <transport_url>β the transport url for the cell message queue.--verboseβ output the UUID of the created cell. (so you can screenshot it, obviously.)--disabledβ create a pre-disabled cell.
β¨ Return codes β¨
0β the cell mapping was successfully created. slay. π1β the transport URL or database connection was missing or invalid. π2β another cell is already using the provided transport URL and/or database connection combination. not the duplication, bestie.
π cell_v2 discover_hosts π
nova-manage cell_v2 discover_hosts [--cell_uuid <cell_uuid>] [--verbose]
[--strict] [--by-service]
okay so this searches cells β or just a single cell β and maps found hosts. it'll check the database for each cell (or a single one if you passed it in) and map any hosts that aren't currently mapped. if a host is already mapped, nothing happens. no drama. π«Ά
the thing everyone forgets: you need to re-run this command every single time you add a batch of compute hosts to a cell. otherwise the scheduler will never place instances there, and the API won't list the new hosts. so like. re-run it. don't make me say it again. π
if --strict is specified, the command will only return 0 if an unmapped host was discovered and mapped successfully. if --by-service is specified, this command will look in the appropriate cell(s) for any nova-compute services and make sure there are host mappings for them. this is less efficient and is only necessary when using compute drivers that may manage zero or more actual compute nodes at any given time (currently only ironic).
β οΈ This command should be run once after all compute hosts have been deployed and should not be run in parallel. When run in parallel, the commands will collide with each other trying to map the same hosts in the database at the same time. π
Added in version 14.0.0: (Newton)
Changed in version 16.0.0: (Pike)
- Added
--strictoption.
Changed in version 18.0.0: (Rocky)
- Added
--by-serviceoption.
π Options π
--cell_uuid <cell_uuid>β if provided, only this cell will be searched for new hosts to map. one cell only, keep it focused. β¨--verboseβ provide detailed output when discovering hosts. spill the tea.--strictβ considered successful (exit code0) only when an unmapped host is discovered. any other outcome is considered a failure (non-zero exit code).--by-serviceβ discover hosts by service instead of compute node.
β¨ Return codes β¨
0β hosts were successfully mapped, or no hosts needed to be mapped. if--strictis specified, returns0only if an unmapped host was discovered and mapped. π1β if--strictis specified and no unmapped hosts were found. also returns1if an exception was raised while running. π2β the command was aborted because of a duplicate host mapping found. this means the command collided with another runningdiscover_hostscommand or a scheduler periodic task β and it is safe to retry. phew. π
π§ cell_v2 list_cells π§
nova-manage cell_v2 list_cells [--verbose]
by default, the cell name, UUID, disabled state, masked transport URL, and database connection details are shown. use the --verbose option to see the transport URL and database connection with their sensitive details. π (yes that means passwords. careful who's looking over your shoulder.)
Added in version 15.0.0: (Ocata)
Changed in version 18.0.0: (Rocky)
- Added the disabled column to output.
β Options β
--verboseβ show sensitive details, such as passwords. π
β¨ Return codes β¨
0β success. that's it. that's the list. π
π cell_v2 delete_cell π
nova-manage cell_v2 delete_cell [--force] --cell_uuid <cell_uuid>
delete a cell by the given UUID. it's giving spring cleaning but for your database. π§Ήβ¨
Added in version 15.0.0: (Ocata)
π Options π
--forceβ delete hosts andinstance_mappingsthat belong to the cell as well. (this is the "and take everything with you" button, so maybe double-check the UUID first, bestie. π)--cell_uuid <cell_uuid>β the UUID of the cell to delete.
β¨ Return codes β¨
okay so for the command we were just talking about, here's what those return codes actually mean, bestie:
0β An empty cell was found and deleted successfully, or a cell that has hosts was found and the cell, hosts and theinstance_mappingswere deleted successfully with the--forceoption (this happens if there are no living instances). slay π1β A cell with the provided UUID could not be found. π2β Host mappings were found for the cell, meaning the cell is not empty, and the--forceoption was not provided. π3β There are active instances mapped to the cell (cell not empty). π4β There are (inactive) instances mapped to the cell and the--forceoption was not provided. π¬
π¦ cell_v2 list_hosts π¦
nova-manage cell_v2 list_hosts [--cell_uuid <cell_uuid>]
Lists the hosts in one or all v2 cells. By default hosts in all v2 cells are listed. Use the --cell_uuid option to list hosts in a specific cell.
Added in version 17.0.0: (Queens) β periodt. β¨
Options
--cell_uuid <cell_uuid>β The UUID of the cell. (like, which cell are we peeking into? π)
Return codes
0β Success. π1β The cell indicated by--cell_uuidwas not found. π
π cell_v2 update_cell π
nova-manage cell_v2 update_cell --cell_uuid <cell_uuid>
[--name <cell_name>] [--transport-url <transport_url>]
[--database_connection <database_connection>] [--disable] [--enable]
Updates the properties of a cell by the given uuid. If a database_connection is not specified, it will attempt to use the one defined by database.connection in the configuration file. If a transport_url is not specified, it will attempt to use the one defined by transport_url in the configuration file.
Updating thetransport_urlordatabase_connectionfields on a running system will NOT result in all nodes immediately using the new values. Use caution when changing these values. π¬
The scheduler will not notice that a cell has been enabled/disabled until it is restarted or sent the SIGHUP signal. π«
Added in version 16.0.0: (Pike)
Changed in version 18.0.0: (Rocky) β added --enable, --disable options. iconic. π
Options
--cell_uuid <cell_uuid>β The UUID of the cell to update.--name <cell_name>β Set the cell name.--transport-url <transport_url>β Set the celltransport_url. Note that running nodes will not see the change until restarted or theSIGHUPsignal is sent.--database_connection <database_connection>β Set the celldatabase_connection. Note that running nodes will not see the change until restarted or theSIGHUPsignal is sent.--disableβ Disables the cell. Note that the scheduling will be blocked to this cell until it is enabled and thenova-schedulerservice is restarted or theSIGHUPsignal is sent.--enableβ Enables the cell. Note that thenova-schedulerservice will not see the change until it is restarted or theSIGHUPsignal is sent.
Return codes
0β Success. β¨1β The cell was not found by the provided UUID. π2β The specified properties could not be set. π¬3β The provided--transport-urlor/and--database_connectionparameters were same as another cell. π4β An attempt was made to disable and enable a cell at the same time. π5β An attempt was made to disable or enable cell0. π«
πΈ cell_v2 delete_host πΈ
nova-manage cell_v2 delete_host --cell_uuid <cell_uuid> --host <host>
Delete a host by the given host name and the given cell UUID.
Added in version 17.0.0: (Queens)
The scheduler caches host-to-cell mapping information so when deleting a host the scheduler may need to be restarted or sent the SIGHUP signal. π§
Options
--cell_uuid <cell_uuid>β The UUID of the cell.--host <host>β The host to delete.
Return codes
0β The empty host was found and deleted successfully1β A cell with the specified UUID could not be found.2β A host with the specified name could not be found3β The host with the specified name is not in a cell with the specified UUID.4β The host with the specified name has instances (host not empty). π
β¨ PLACEMENT COMMANDS β¨
πΈ placement heal_allocations
nova-manage placement heal_allocations [--max-count <max_count>]
[--verbose] [--skip-port-allocations] [--dry-run]
[--instance <instance_uuid>] [--cell <cell_uuid>] [--force]
Okay bestie, sit down for this one because it's a whole saga. π
So here's the vibe: this command goes through every non-cell0 cell and hunts down instances that are missing their allocations in the Placement service AND aren't out here going through a task state transition. For every single victimβsorry, *instance*βit finds, it creates allocations against that instance's compute node resource provider, based on the flavor that instance has. Iconic. π
Note: Nested allocations are only partially supported, bestie. Nested allocations that happen because Neutron ports have QoS policies? Those have been supported since 20.0.0 (Train). Slay. But nested allocations from vGPU or Cyborg device profile requests in the flavor? Not supported. π Alsoβand this is importantβif you're out here using provider.yaml files on compute hosts to define extra resources, and those resources live on child resource providers, then instances using those resources are not supported either. Sorry babe.
Also, if the instance has any port attached that comes with a resource request (like Quality of Service (QoS): Guaranteed Bandwidth, you know the one), but the corresponding allocation justβ¦ isn't there? Then the allocation gets created against the network device resource providers according to that port's resource request. π
But plot twist: sometimes that missing allocation genuinely can't be created. Maybe there's not enough resource inventory on the host the instance lives on, or maybe more than one resource provider could fulfill the request (messy). In that case? The instance needs to be manually deleted, or the port needs to be detached. No shortcuts. When nova supports migrating instances with guaranteed bandwidth ports (that's the Train spec if you're curious), migration will heal missing allocations for these instances. Until then? Manual it is. π
Okay now the drama of persistence: before those port allocations get persisted in placement, nova-manage tries to update each port in neutron to refer to the resource provider UUID that provides the requested resources. Butβif any of those port updates fail in neutron, or the allocation update fails in placement, the command tries to roll back the partial updates to the ports. And if the roll back fails? The process stops with exit code 7 and you, the admin, have to do the rollback in neutron manually according to the description in the exit code section. Good luck bestie, you got this. π«Ά
There's also a special case handled for instances that do have allocations created before Placement API microversion 1.8, back when project_id and user_id values were required. For those types of allocations, project_id and user_id get updated using the values from the instance. Nostalgia. πΈ
This command requires that the api_database.connection and placement configuration options are set. Placement API >= 1.28 is required. No skipping. β¨
Added in version 18.0.0: (Rocky)
Changed in version 20.0.0: (Train) β Added --dry-run, --instance, and --skip-port-allocations options.
Changed in version 21.0.0: (Ussuri) β Added --cell option.
Changed in version 22.0.0: (Victoria) β Added --force option.
Changed in version 25.0.0: (Yoga) β Added support for healing port allocations if the port-resource-request-groups neutron API extension is enabled, and therefore ports can request multiple groups of resources, e.g. by using both guaranteed minimum bandwidth and guaranteed minimum packet rate QoS policy rules. Ate. π
π Options
--max-count <max_count>β Maximum number of instances to process. If you don't specify it, all instances in each cell get mapped in batches of50. Have a large number of instances? Consider specifying a custom value and running the command until it exits with0or4.--verboseβ Provide verbose output during execution. Because sometimes you want all the tea. π--dry-runβ Runs the command and prints output but does not commit any changes. The return code should be4.--instance <instance_uuid>β UUID of a specific instance to process. If you specify this,--max-counthas no effect. Mutually exclusive with--cell.--skip-port-allocationsβ Skip the healing of the resource allocations of bound ports. E.g. healing bandwidth resource allocation for ports having minimum QoS policy rules attached. If your deployment doesn't use such a feature, then the performance impact of querying neutron ports for each instance can be avoided with this flag. Speedrun. β¨--cell <cell_uuid>β Heal allocations within a specific cell. Mutually exclusive with--instance.--forceβ Force heal allocations. Requires the--instanceargument.
π¦ Return codes
0β Command completed successfully and allocations were created. π1β--max-countwas reached and there are more instances to process.2β Unable to find a compute node record for a given instance. π3β Unable to create (or update) allocations for an instance against its compute node resource provider.4β Command completed successfully but no allocations were created.5β Unable to query ports from neutron.6β Unable to update ports in neutron.7β Cannot roll back neutron port updates. Manual steps needed. The error message will indicate which neutron ports need to be changed to clean upbinding:profileof the port:
$ openstack port unset <port_uuid> --binding-profile allocation
127β Invalid input. π255β An unexpected error occurred. π
βββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
and that's a wrap on that table, bestie π onto the next ones!
placement sync_aggregates
ok so this one is all about aggregates, and the synopsis is giving very simple, very demure:
nova-manage placement sync_aggregates [--verbose]
What it actually does? It mirrors compute host aggregates to resource provider aggregates in the Placement service. Yes, it's literally copying your aggregate vibe over to the other side. π¦
BUT β and hear me out β it needs the api_database and placement sections of the nova configuration file to be populated first. Like, actually populated. Not just sitting there empty. No config, no sync, no slay. π
Throw in --verbose if you want detailed progress output while it's running, so you can sit there and watch each lil step like it's a reality TV finale. π
β οΈ Note: Depending on the size of your deployment and the number of compute hosts in aggregates, this command could cause a non-negligible amount of traffic to the placement service, and therefore is recommended to be run during maintenance windows. She is NOT a peak-traffic girly. Please respect her boundaries. π
Added in version 18.0.0: (Rocky) β¨
Options
--verboseβ Provide verbose output during execution.
Return codes
βββββββββββββββ¬βββββββββββββββββββββββββββββ
β Return code β Description β
βββββββββββββββΌβββββββββββββββββββββββββββββ€
β 0 β Successful run β
βββββββββββββββΌβββββββββββββββββββββββββββββ€
β 1 β A host was found with more β
β β than one matching compute β
β β node record β
βββββββββββββββΌβββββββββββββββββββββββββββββ€
β 2 β An unexpected error β
β β occurred while working β
β β with the placement API β
βββββββββββββββΌβββββββββββββββββββββββββββββ€
β 3 β Failed updating provider β
β β aggregates in placement β
βββββββββββββββΌβββββββββββββββββββββββββββββ€
β 4 β Host mappings not found β
β β for one or more host β
β β aggregate members β
βββββββββββββββΌβββββββββββββββββββββββββββββ€
β 5 β Compute node records not β
β β found for one or more β
β β hosts β
βββββββββββββββΌβββββββββββββββββββββββββββββ€
β 6 β Resource provider not β
β β found by uuid for a given β
β β host β
βββββββββββββββΌβββββββββββββββββββββββββββββ€
β 255 β An unexpected error β
β β occurred. β
βββββββββββββββ΄βββββββββββββββββββββββββββββ
placement audit
and NOW we get to the detective of the family π the audit. Here's how you call her:
nova-manage placement audit [--verbose] [--delete]
[--resource_provider <uuid>]
The way this works: she iterates over all the Resource Providers β or just one, if you're feeling specific and you hand her the UUID β and then she verifies whether the compute allocations are either related to an existing instance or a migration UUID. If they're not related to either? She will straight up tell you which allocations are orphaned. Exposed. Called out. No cap. π
This command requires that the api_database.connection and placement configuration options are set. Also, Placement API >= 1.14 is required β so check your version before you come crying to her. π
Added in version 21.0.0: (Ussuri) π
Options
--verboseβ Provide verbose output during execution.--resource_provider <provider_uuid>β UUID of a specific resource provider to verify.--deleteβ Deletes orphaned allocations that were found.
Return codes
βββββββββββββββ¬ββββββββββββββββββββββββββββ
β Return code β Description β
βββββββββββββββΌββββββββββββββββββββββββββββ€
β 0 β No orphaned allocations β
β β were found β
βββββββββββββββΌββββββββββββββββββββββββββββ€
β 1 β An unexpected error β
β β occurred β
βββββββββββββββΌββββββββββββββββββββββββββββ€
β 3 β Orphaned allocations were β
β β found β
βββββββββββββββΌββββββββββββββββββββββββββββ€
β 4 β All found orphaned β
β β allocations were deleted β
βββββββββββββββΌββββββββββββββββββββββββββββ€
β 127 β Invalid input β
βββββββββββββββ΄ββββββββββββββββββββββββββββ
πΎ volume_attachment get_connector πΎ
nova-manage volume_attachment get_connector
okay so this one is literally just showing you the host connector for this compute host π define the vibe of your connection, bestie.
and when you hit it with the --json switch? it dumps a JSON string with all the connector info for the current host πΈ save that bad boy to a file and you can feed it straight into the nova-manage volume_attachment refresh command later. it's giving "i prepared ahead of time and that's why i'm the moment" β¨
Added in version 24.0.0: (Xena) π¦
Return codes π
0β Success π1β An unexpected error occurred π
π volume_attachment show π
nova-manage volume_attachment show [INSTANCE_UUID] [VOLUME_ID]
this spills ALL the tea on the volume attachment between VOLUME_ID and INSTANCE_UUID π like, are they actually attached or is it complicated? this tells you fr fr.
Added in version 24.0.0: (Xena) π¦
Return codes π
0β Success π1β An unexpected error occurred π2β Instance not found π3β Instance is not attached to volume π
π volume_attachment refresh π
nova-manage volume_attachment refresh [INSTANCE_UUID] [VOLUME_ID] [CONNECTOR_PATH]
refreshes the connection info tied to a given volume attachment π glow-up for your connection data.
now listen bestie, because the vibes gotta be right for this to work: the instance must be attached to the volume, must have a vm_state of stopped, and must not be locked π no exceptions, no cap.
CONNECTOR_PATH is the path to a JSON-formatted file holding the up-to-date connector info for the compute that's currently hosting the instance π«Ά and you generate that file with the nova-manage volume_attachment get_connector command. it's a whole little pipeline and honestly? iconic.
Added in version 24.0.0: (Xena) π¦
Return codes π
0β Success π1β An unexpected error occurred π2β Connector path does not exist π³οΈ3β Failed to open connector path π4β Instance does not exist π5β Instance state invalid (must be stopped and unlocked) π6β Volume is not attached to the instance π¬7β Connector host is not correct π«
β¨ LIBVIRT COMMANDS β¨
okay bestie, this is the libvirt corner of nova-manage, and it's giving "I need to know what machine type my instances are living in" energy π
π₯οΈ libvirt get_machine_type
nova-manage libvirt get_machine_type [INSTANCE_UUID]
So likeβ¦ this one fetches and shows you the recorded machine type of a libvirt instance, and you point at which instance you mean with INSTANCE_UUID. That's it. That's the whole job. β¨
Added in version 23.0.0: (Wallaby)
π Return codes
0β Successfully completed π«Ά1β An unexpected error occurred π2β Unable to find instance or instance mapping π3β No machine type found for instance π
π§ libvirt update_machine_type
nova-manage libvirt update_machine_type \
[INSTANCE_UUID] [MACHINE_TYPE] [--force]
This one sets or updates the recorded machine type of instance INSTANCE_UUID to the machine type MACHINE_TYPE. Glow-up for your instance's machine type, fr fr β¨
But bestie, there are criteria that have to be met when you use this command, no cap:
- The instance must have a
vm_stateofSTOPPED,SHELVEDorSHELVED_OFFLOADED. π΄ - The machine type must be supported. The supported list includes alias and versioned types of
pc,pc-i440fx,pc-q35,q35,virtors390-ccw-virtio. π - The update will not move the instance between underlying machine types. For example,
pctoq35. π« - The update will not move the instance between an alias and versioned machine type or vice versa. For example,
pctopc-1.2.3orpc-1.2.3topc. π«
There's a --force flag provided to skip all of those checks above, but caution should be taken because this could easily lead to the underlying ABI of the instance changing when moving between machine types. Like, that's not a cute little oopsie, that's a real ABI-changing situation π
Added in version 23.0.0: (Wallaby)
β¨ Options
--forceβ Skip machine type compatibility checks and force machine type update. (use responsibly bestie π«Ά)
π Return codes
0β Update completed successfully π1β An unexpected error occurred π2β Unable to find instance or instance mapping π3β The instance has an invalidvm_stateπ4β The proposed update of the machine type is invalid π«5β The provided machine type is unsupported π§
π libvirt list_unset_machine_type
nova-manage libvirt list_unset_machine_type [--cell-uuid <cell-uuid>]
Lists the UUID of any instance that doesn't have hw_machine_type set. Basically "who here is missing their machine type, raise your hand" π
This command is useful for operators trying to figure out when it's safe to change the libvirt.hw_machine_type <#libvirt.hw_machine_type> option within an environment. iykyk π«Ά
Added in version 23.0.0: (Wallaby)
β¨ Options
--cell_uuid <cell_uuid>β The UUID of the cell to list instances from.
π Return codes
0β Completed successfully, no instances found withouthw_machine_typeset β¨1β An unexpected error occurred π2β Unable to find cell mapping π3β Instances found withouthw_machine_typeset π
πΈ IMAGE PROPERTY COMMANDS πΈ
π image_property show π
nova-manage image_property show [INSTANCE_UUID] [IMAGE_PROPERTY]
Bestie, this one goes and fetches the recorded image property IMAGE_PROPERTY of whatever instance INSTANCE_UUID points at, then displays it for you. Show and tell, literally. β¨
Added in version 25.0.0: (Yoga)
π Return codes π
0β Successfully completed π1β An unexpected error occurred π2β Unable to find instance or instance mapping π3β No image property found for instance π
π¦ image_property set π¦
nova-manage image_property set \
[INSTANCE_UUID] [--property] [IMAGE_PROPERTY]=[VALUE]
This sets (or updates, if it's already there) the recorded image property IMAGE_PROPERTY on the instance INSTANCE_UUID, and gives it the value VALUE. Glow up for image props, no cap. β¨
You have to meet these criteria when you use this command:
- The instance must have a
vm_stateofSTOPPED,SHELVEDorSHELVED_OFFLOADED.
This command is lowkey iconic for operators who need to update stored instance image properties that have become invalidated by a change of instance machine type, for example. π
Added in version 25.0.0: (Yoga)
β Options β
--propertyβ The image property to set, using the formatname=value. For example:--property hw_disk_bus=virtio --property hw_cdrom_bus=sata.
π Return codes π
0β Update completed successfully π1β An unexpected error occurred π2β Unable to find instance or instance mapping π3β The instance has an invalidvm_stateπ4β The provided image property name is invalid π«5β The provided image property value is invalid π«
π LIMITS COMMANDS π
π limits migrate_to_unified_limits π
nova-manage limits migrate_to_unified_limits [--project-id <project-id>]
[--region-id <region-id>] [--verbose] [--dry-run] [--quiet]
[--no-embedded-flavor-scan]
Okay so this is the big one: it migrates quota limits from the Nova database to unified limits in Keystone. Moving day, but for quotas. πβ¨
This command is useful for operators migrating from legacy quotas to unified limits. The limits get migrated by copying them out of the Nova database and into Keystone, by creating them using the Keystone API.
The Nova configuration file that nova-manage is using must have a keystone_authtoken section that contains authentication settings, otherwise the Keystone API calls will not succeed. Here's an example, bestie:
[keystone_authtoken]
project_domain_name = Default
project_name = service
user_domain_name = Default
username = nova
auth_url = http://127.0.0.1/identity
auth_type = password
password = <password>
By default, in Keystone policy configuration, access to create, update, and delete in the unified limits API is restricted to callers with the admin role. So you're gonna need to make sure that the user configured under keystone_authtoken has the necessary role and scope. No role, no limits, periodt. π
Warning: β οΈ Thelimits migrate_to_unified_limitscommand will create limits only for resources that exist in the legacy quota system, and any resource that does not have a unified limit in Keystone will use a quota limit of0. π For resource classes that are allocated by the placement service and have no default limit set, you will need to create default limits manually. The most common example isclass:DISK_GB. All Nova API requests that need to allocateDISK_GBwill fail quota enforcement until a default limit for it is set in Keystone. π See the unified limits documentation about creating limits using the OpenStackClient.
Added in version 28.0.0: (2023.2 Bobcat)
Changed in version 31.0.0: (2025.1 Epoxy)
Added flavor scanning for resource classes missing limits, along with the --quiet and --no-embedded-flavor-scan options. π₯
β Options β
--project-id <project-id>β The project ID for which to migrate quota limits.--region-id <region-id>β The region ID for which to migrate quota limits.--verboseβ Provide verbose output during execution.--dry-runβ Show what limits would be created without actually creating them. Flavors will still be scanned for resource classes missing limits.--quietβ Do not output anything during execution. π€«--no-embedded-flavor-scanβ Do not scan instances embedded flavors for resource classes missing limits.
π Return codes π
0β Command completed successfully π1β An unexpected error occurred π2β Failed to connect to the database π3β Missing registered limits were identified π«
π«Ά SEE ALSO π«Ά
nova-policy(1)nova-status(1)
π BUGS π
- Nova bugs are managed at Launchpad β <https://bugs.launchpad.net/nova>
π Author π
openstack@lists.openstack.org
πΈ Copyright πΈ
2010-present, OpenStack Foundation
aaaand that's a wrap on the whole entire page, bestie!! πβ¨ you made it to the end, which is giving main character energy fr fr. this one's from 34.0.0, dated Oct 01, 2026, and it's NOVA-MANAGE(1) β go forth and manage your nova like the icon you are. π
ππ¦
π¦ where this page comes from
- ubuntu stonking: nova-common 3:34.0.0-0ubuntu1 Β· Apache-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms