Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change machine type of GCE instance?

As there isn't any direct option to change machine type and i have to create a new instance. What are the steps to do so that the configuration/software that I had installed remain same ?

like image 482
Sunil Garg Avatar asked Jul 09 '15 08:07

Sunil Garg


1 Answers

1) Delete the instance that you want to upgrade by keeping its boot disk.

  gcloud compute instances delete <instance-name> --keep-disks boot

2) Now create image from this boot disk

  gcloud compute images create <any-image-name> --source-disk <instance-name>

3) Now Check Images list

 gcloud compute images list

4) Now Create new instance from developer console or using gcloud compute

and select your image as boot disk.

5) Done.

Here is the link.

like image 65
Sunil Garg Avatar answered Sep 21 '22 17:09

Sunil Garg