GCP changing machine type from N2 back to N1

google-compute-engine

I would like to change the machine type for a virtual machine back from N2 to N1.

I executed :

gcloud compute instances set-machine-type MACHINENAME –zone=europe-west4-b –custom-cpu=10 –custom-memory=40 : –custom-extensions –custom-vm-type=n1

Then I get :

ERROR: (gcloud.compute.instances.set-machine-type) Could not fetch resource:
– The selected machine type (custom-10-40960) is not compatible with CPU platform cascadelake

When I try to change it using the GUI web interface it will come back with an error :

The request contains invalid arguments: "The selected machine type (n1-standard-8) is not compatible with CPU platform cascadelake". Error code: "badRequest"

But I changed the machine type to N1 in the Gui.
It just won't save it

Any idea?

Thank you

Best Answer

Since you are using an N2 machine, your CPU platform is set to "Cascade" (https://cloud.google.com/compute/docs/cpu-platforms) but N1 machines only supports "Skylake", "Broadwell", "Haswell" and "Bridge".

This is a known issue (https://issuetracker.google.com/142981164), you will not be able to perform this operation.

The workaround provided by Google is:

Hi,

The GCE team is now aware of this issue and will be working on releasing a fix for it.

For now, if you need to change the machine type, you can detach the existing disk from the second generation instance and reattach it to a fist generation VM as a workaround [1].

At the moment, we cannot provide an ETA for this fix to be released. However, further updates on this issue can be found in this thread.

Thank you.

[1] https://cloud.google.com/compute/docs/disks/detach-reattach-boot-disk