Rename Google Compute Engine VM Instance

mickeylieu picture mickeylieu · Jan 14, 2015 · Viewed 33.7k times · Source

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.

Answer

gabriel-kaam picture gabriel-kaam · Jan 30, 2016

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.

  1. As @Marius said, create a snapshot of your disk ( DO NOT skip this part: you may lose all your files/configuration )
  2. Make sure you completed the step 1.
  3. Clone your instance
  4. Name your cloned instance the way you want.
  5. Make sure to select the snapshop of your disk created at #1 ( make sure you select the same typeof disk as well: if your original disk was SSD for example, you have to select if you want the new disk to be SSD too )
  6. Make sure your IPs are set correctly

You're done :)