Chris Curvey
Chris Curvey

Reputation: 10389

create instance from template in google compute engine?

I feel silly, but I can't find this anywhere.

I've created some "instance templates" for VMs in Google Compute Engine, but I can't find a button anywhere that says "Create an instance from this template" (or the equivalent).

I've looked on the "create instance" pages and on the "template" pages.

Am I missing something obvious?

Upvotes: 0

Views: 205

Answers (3)

John Hanley
John Hanley

Reputation: 81336

The accepted answer is no longer correct.

Now you can create a VM instance from an Instance template. The following screenshot shows the "CREATE VM" button.

Creating a VM Instance from an Instance Template

Instance Templte Create VM

Upvotes: 2

Tuxdude
Tuxdude

Reputation: 49473

No, that behavior is expected.

Instance templates can only be used as part of managed instance groups. They define the properties (machine type, image, zone, etc.) of instances created in the managed instance group. They cannot be used to create a stand-alone VM (I guess you could create a managed instance group of size 1).

Instance Templates

Instance templates define the machine type, image, zone, and other instance properties for the instances in a managed instance group. A managed instance group uses an instance template to create or update the instances that are part of the group. You can create an instance template once and can reuse it for multiple groups and configuration.

An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some zonal resources in an instance template, which restricts the template to the zone where that resource resides. For example, if you include a read-only persistent disk from us-central1-b in your instance template, you cannot use that template in any other zone because that specific disk exists only in zone us-central1-b. For more information about zonal resources, read Regions and Zones.

To learn how to create an instance template, read Creating Instance Templates.

The most common application for instance templates is to use it with micro-service architectures where you define how a pool of identical backend VMs for the service should be created and size adjusted based on the load.

Upvotes: 1

PrecariousJimi
PrecariousJimi

Reputation: 1543

Instance Templates are primarily used as a blueprint for Managed Instance Groups.

A managed instance group contains identical instances that you can manage as a single entity. Managed instance groups support autoscaling, load balancing, rolling updates, and more.

See more info here: https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances

Upvotes: 1

Related Questions