How To rename an Instance/Server in OpenStack

Posted on 236 views

How can I rename an VM, instance or server in OpenStack?. Once you create an instance in OpenStack, you can modify its name in running state. This is true if the service running in the VM is changed, and the name needs to be updated to reflect the same.

Modifying an Instance/VM name in OpenStack can be done from 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 the 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 Instance in OpenStack Dashboard

Login to Horizon Dashboard

openstack-create-projects-users-roles-01-1024x707

Then navigate to Project > Compute > Instances. Then select the instance to be renamed.

change-openstack-instance-name-01-1024x403

Under Actions, select “EDIT INSTANCE”

change-openstack-instance-name-02

Set new name and click save.

change-openstack-instance-name-03-1024x711

You have successfully changed an instance/VM/Server name in OpenStack. Check other OpenStack articles available in our blog.

Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.