How to add more CPU core and RAM to an executable virtual machine instance

I need to add more Core Core and RAM to Running VM Instance. Is there a way to do this?

+3


source to share


4 answers


you cannot dynamically change the RAM and CPU values ​​for the computation of the Engine instances, but you can take a snapshot of the instance and create a larger instance from the snapshot.



+2


source


This is no longer the best way (since 2016). Now the easiest way to do this is to stop the instance, then click on edit and change the car type to whatever you want - you can even customize it. After that, just click "Start" and it will come back with the new type you chose.



Now you no longer need to clone it to grow it.

+10


source


You can stop the car, then edit it, and then start it again. Just make sure the disk isn't destroyed in the process. Check it out: https://cloud.google.com/compute/docs/instances/changing-machine-type-of-stopped-instance

+1


source


It's pretty easy to scale a machine from a snapshot read this first though: https://cloud.google.com/compute/docs/disks#snapshots

"Before taking a snapshot of a persistent disk, you must make sure that you take a snapshot that matches the desired state of your persistent disk. If you take a snapshot of your persistent disk in an unclean state, it can cause the disk to check and possibly result in data loss. To help with this, Google Compute Engine encourages you to flush your disk buffers before your snapshot. For example, if your operating system is writing data to a persistent disk, it is possible that your disk buffers are not yet flushed. Follow these instructions. to flush disk buffers: "

CAVEAT: Make sure you unmount all mounted volumes, I had snapshots painted over when not done.

0


source







All Articles