How to change my machine type for an instance running on GCP

0 votes
I had initially used an instance that had very limited capabilities as it was a test environment. Now I wish to change the machine type to increase the number of CPUs and other requirements. I have already stopped the instance. What's the way forward?
Nov 4, 2019 in GCP by anonymous
• 6,260 points
4,385 views

1 answer to this question.

0 votes

You can only change the machine type of a stopped instance and an instance is considered stopped only when the instance is in the TERMINATED state. It is not possible to change the machine type of a running instance.

To change a machine type in gcloud, run the following command, replacing INSTANCE with the instance name, and MACHINE-TYPE with the desired machine type:

gcloud compute instances set-machine-type INSTANCE --machine-type MACHINE-TYPE

Your machine type can be a predefined machine type, such as n1-standard-1, or a custom machine type. For example, a custom machine type with 4 vCPUs and 1 GB of memory can be specified as:

--machine-type custom-4-1024

For more info refer https://cloud.google.com/compute/docs/instances/changing-machine-type-of-stopped-instance

answered Nov 4, 2019 by Sirajul
• 59,230 points

Related Questions In GCP

0 votes
1 answer

How to add a PTR record to my VM instance on gcp?

If your VM instance uses the primary ...READ MORE

answered Sep 26, 2019 in GCP by Sirajul
• 59,230 points
1,846 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Creating a SQL Server instance using Google Compute engine.

Google Compute Engine provides public images preconfigured with ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points
2,896 views
0 votes
1 answer

How do i install gcloud compute?

The gcloud compute command-line tool enables you to easily ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points

edited Jun 16, 2023 by Khan Sarfaraz 1,244 views
0 votes
1 answer

Creating password for a windows instance on GCP

Windows Server instances use password authentication instead ...READ MORE

answered Sep 24, 2019 in GCP by Sirajul
• 59,230 points
4,328 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP