Delete a Managed VM instance

I had a Dart managed VM running. Since it was an experiment, I wanted to stop and delete the running instances to prevent extra costs. In the console, each time I try to stop or delete the instances, it keeps restarting.

The only solution I found (for now, it seems google is working on a allowing deleting managed vm instances) was to upload a non-managed AppEngine application. The simplest setup I use is with the go language.

Create the following app.yaml file (here I want to replace the default module. Otherwise enter the proper module name)

module: default
runtime: go
api_version: go1

handlers:
- url: /
  static_files: index.html
  upload: index.html
  secure: always

Create a dummy main.go file

package noserver

func init() {
}

And dummy index.html file

<html lang="en">
<head>
    <title>No server</title>
</head>
<body>
<pre>no server</pre>
</body>

Then deploy to your <appname>.appspot.com using the following command

gcloud preview app deploy app.yaml --version 1 --project <appname>

The console should no show that there is no running instances your <appname>.appspot.com server should display no server

Popular posts from this blog

Simple Samba setup on Lubuntu

Soving AccessDenied on Google Cloud Storage domain mapping

Install Maven 3.1.1 on Ubuntu 13.10