Hide
Java

Using the Java Managed VM Environment

The managed VM hosting environment lets you run App Engine applications on configurable Compute Engine Virtual Machines (VMs) that are managed by Google. The VM hosting environment offers flexibility and additional CPU and memory options compared to the original App Engine sandboxed hosting environment.

The Java runtime is available as a Managed VM standard runtime. A standard runtime supports a subset of the App Engine service APIs. Currently, Managed VMs support these services:

  • Datastore
  • Memcache
  • Task Queues
  • Logging
  • Users

If you choose to migrate an existing application to a managed VM, or to build a new one, be sure that the App Engine services that you need are available.

Configuring an app for managed VMs

You can switch your app to Managed VMs by changing just a few lines in your application's appengine-web.xml file:

The <vm> element is required:

<vm>true</vm>

You must also take into account these differences when migrating an existing app:

  • Managed VMs support manual and automatic scaling. If your app uses basic scaling, you'll need to change that.
  • Managed VMs do not assign instance classes. Instead, you select resources in the appengine-web.xml file.

All the settings for managed VMs are described in the configuration instructions

Testing and deploying managed VMs

Managed VM development requires that you install Docker and the Google Cloud SDK. The setup steps are explained on the managed VM Getting Started page. Developing and Deploying Managed VMs describes the use of the gcloud Cloud SDK commands.

Sample Applications

Try one of our sample managed VM applications that uses the Java standard runtime: