How do I rename a Google Compute Engine VM instance?
I created a new LAMP server and I'd like to rename it in the "VM Instances" dashboard.
I've tried renaming the Custom metadata, but that didn't seem to replicate to the dashboard.
Before renaming the instance, stop it by using the gcloud compute instances stop command. After renaming, start the instance by using the gcloud compute instances start command. Replace the following: INSTANCE_NAME : name of the instance to rename.
Google Compute Engine provides a scalable number of virtual machines (VMs) to serve as large compute clusters for that purpose. GCE can be managed through a RESTful application program interface (API), command line interface or web console.
An instance is a virtual machine (VM) hosted on Google's infrastructure. You can create an instance or create a group of managed instances by using the Google Cloud console, the Google Cloud CLI, or the Compute Engine API.
I tried the solution provided by @Marius I . It works, but I lost my description, my metas, the tags and the permissions I've set on the old instance. I had to copy my metas, had to make sure the zone for the new instance was the same as the original, and had to check that the pricing was the same.
I think, it's best to just create a clone of your original instance, this way don't have to manually copy/set them on the new instance.
You're done :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With