How to permanently delete Google managed VMs

2019-02-09 00:58发布

I am unable to permanently delete Google App Engine managed VMs I've created. I've deleted them multiple times both from the developer's console and by using the gcloud command. In every case the command completes successfully and the VM is deleted, but then almost immediately Google creates a brand new VM to take its place.

Does anyone know how to permanently delete managed VMs? Thanks.

5条回答
再贱就再见
2楼-- · 2019-02-09 01:23

We are working on improving this experience. For now, though, one workaround is to deploy a non-Managed VM instance as the default version and delete any other versions that are Managed VM-based. Again, this issue is on our radar to be fixed.

[Chris Ramsdale, Product Manager for App Engine]

查看更多
Root(大扎)
3楼-- · 2019-02-09 01:26

I ran into the same problem this is how i was able to stop the managed VM permanently. Just go to appengine -> settings -> disable application. This will automatically stop and delete your VM. In future if you want to run managed vm just enable application this will redeploy your application to the last known version.

查看更多
在下西门庆
4楼-- · 2019-02-09 01:31

There might be a simpler way to explain this -- "basically, you cannot delete a version that's receiving 100% of the traffic."

Therefore, you just need to create a non managed VM, like a simple helloworld application. Then, you can move all of the traffic to this helloworld application (see graphic, I named mine version 0), then, delete version 20160... or whatever the name of your vm is.

enter image description here

At some point in time, you're probably going to experiment or spin up your managed VM again. When you do that, it will automatically start getting 100% of the traffic.

Or, if you happen to know version number receiving 100% of the traffic, you can always deploy a simple, non managed VM, with this version.

查看更多
The star\"
5楼-- · 2019-02-09 01:45

In Google Cloud Console under App Engine -> Versions , select the default version of your managed VM application and use STOP button to turn it off.

查看更多
Explosion°爆炸
6楼-- · 2019-02-09 01:46

I wanted to update this post with some of my solutions to deploying (with versions) and deleting instances on Google Compute Engine's managed VMs. Here's a solution I found for deleting the default GCE managed VM:

  • Make sure you have the up-to-date GCE components. Run gcloud components update in the Google Cloud SDK Shell.
  • In your app.yaml, remove the vm:true, resources: section, and manual scaling: section.
  • Navigate to Compute -> App Engine -> Versions and record the <default-version-number>. Mine looks like 20150722t1245032 with the words (default) indicating the default version.
  • Deploy the application, set the default, and specify the default version. gcloud preview app deploy "...\app.yaml" --set-default --version=<default-version-number>.
  • Navigate to Compute -> Compute Engine -> VM instances. Select the default instance and delete.

I was also taught how to stop deploying additional instances:

  • The key is to specify the version number gcloud preview app deploy "...\app.yaml" --set-default --version=<version-number>. @ZacharyNewman was able to help me with this problem.

And finally, this is how to delete the additional versions of an instance:

  • Navigate to Compute -> App Engine -> Versions and delete the versions you don't want.
  • Navigate to Compute -> Compute Engine -> VM instances. Select the instances you don't want and delete.

Hope this helps!

查看更多
登录 后发表回答