Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to rename a machine image?

How do you rename a machine image from the web interface or from the API?

Solved Solved
0 4 1,125
1 ACCEPTED SOLUTION

A machine image is created from an instance, but - that is an idea - temporarily deploy the machine instance you want to rename as a new instance and then capture a fresh machine image from that one, then delete the temporary instance.

View solution in original post

4 REPLIES 4

At the time of writing this is not possible, you can see a note in the web interface that guides you that the "Name is permanent": 

alexmoore_0-1654073155686.png

 

I've not attempted it, but can't you create a new image with the name you require using the existing image as the source-image?

A machine image is created from an instance, but - that is an idea - temporarily deploy the machine instance you want to rename as a new instance and then capture a fresh machine image from that one, then delete the temporary instance.

Just to update...
As njervis suggested it is now possible to write:
gcloud compute images create NEW_NAME --source-image=IMAGE_TO_RENAME