How to rename an instance / server in OpenStack

How to rename a VM, instance or server in OpenStack? After you create an instance in OpenStack, you can modify its name in the running state. True if the service running in the VM was changed and the name needs to be updated to reflect the name.

The instance / VM name in OpenStack can be modified in the CLI or Horizon dashboard.

Change / rename instance in OpenStack CLI

Get the current instance name:

$ openstack server list
+--------------------------------------+-------------------+---------+-----------------------------------+-----------+-----------+
| ID                                   | Name              | Status  | Networks                          | Image     | Flavor    |
+--------------------------------------+-------------------+---------+-----------------------------------+-----------+-----------+
| d3ae9771-3a95-466d-a1ef-656ee2bb8456 | fed30             | ACTIVE  | private=10.10.1.191               | Fedora-31 | m1.small  |
+--------------------------------------+-------------------+---------+-----------------------------------+-----------+-----------+

Set a new instance name:

$ openstack server set --name fed31  d3ae9771-3a95-466d-a1ef-656ee2bb8456

Confirm that the new name is set:

$ openstack server list
+--------------------------------------+-------------------+---------+-----------------------------------+-----------+-----------+
| ID                                   | Name              | Status  | Networks                          | Image     | Flavor    |
+--------------------------------------+-------------------+---------+-----------------------------------+-----------+-----------+
| d3ae9771-3a95-466d-a1ef-656ee2bb8456 | fed31             | ACTIVE  | private=10.10.1.191               | Fedora-31 | m1.small  |
+--------------------------------------+-------------------+---------+-----------------------------------+-----------+-----------+

Change / rename instances in OpenStack dashboard

Sign in to Horizon dashboard

Then navigate to Project> Calculation> Instance. Then select the instance you want to rename.

How to rename an instance / server in OpenStack

Down Action, Choose “Edit instance”

How to rename an instance / server in OpenStack

Set a new name and click Save.

How to rename an instance / server in OpenStack

You have successfully changed the instance / VM / server name in OpenStack. Check out other available OpenStack articles on our blog.

How to create an OpenStack instance with a fixed / static IP address

How to create OpenStack projects, users and roles

How to migrate OpenStack instances from one compute host to another

How to resize an OpenStack instance / virtual machine

How to configure NovaStack to automatically start after restarting NovaStack

Sidebar