How to increase the size of a Google Cloud virtual machine?
Solution 1
This behavior has now changed, and instances are customizable before and after creation. However, the instance must be shutdown in order to edit it and increase it's RAM or/and CPU. More information is available in this Help Center article.
Solution 2
you can stop the instance and manipulate the memory or cpu which ever you need and start he instance after you have made your necessary changes
Solution 3
Once a machine has been created, you cannot increase the RAM or CPU. this is only done when first instantiated.
However, there is a workaround. From the Developers Console, you will need to snapshot the existing VM disk, delete the machine, create a new one (choose the CPU and RAM according to your needs, and where it says "Boot disk" choose "New Disk from snapshot" and select the snapshot you created earlier).
I know it sounds a bit laborious but actually it is pretty straight-forward, should not take you more than a couple of minutes.
Hope this helps !
Related videos on Youtube
Craig Meltzer
Updated on September 14, 2022Comments
-
Craig Meltzer over 1 year
How does Google Cloud handle increasing or decreasing the size of a VM i.e. changing the RAM and CPU options.
Thank you.
-
Craig Meltzer over 9 yearsThanks very much - it would be great to have ability to increase and decrease with one or two clicks.
-
Dmitri Lihhatsov about 7 yearsI wonder if it's a limitation (that memory and disk cannot be increased dynamically) set by Google or there is a technical reason why a VM's memory cannot be scaled up and down on the fly?
-
Atul almost 5 yearsYou have to wait for some time after shutting down (or stopping) the instance
-
Haroun Mohammedi about 4 years@DmitriLihhatsov disk could be updated at runtime.