Skip to main content

Getting Started with Google Compute Engine: Virtual Machines

InGoogle Compute Engine Icon my last post, I introduced you to the core concepts of Google Compute Engine. Like any other IaaS offering, VMs form the core of the platform. If you are serious about mastering GCE, you should focus on learning everything about Virtual Machines, which are also called Instances.

To launch a VM, you need to make the following choices:
• Region & Zone
• Machine Type
• Boot Source
• OS Type

When you use the Google Developer Console, you will find the screen similar to the following:

Location and resources screen Google Compute Engine
Region & Zone

Google Compute Engine allows you to choose the region and zone where certain resources live, giving you control over where your data is stored and used. Google Cloud Platform (GCP) resources are hosted in multiple locations worldwide. These locations are composed of regions and zones within those regions. Regions are the geographic locations where GCP resources are hosted. As on date, GCP is available in US-Central1, Europe-West1, and Asia-East1. Each region is further divided into isolated facilities called zones. Zones in a region provide isolation for many types of infrastructure, hardware, and software failures. Every region has at least 2 zones available for the customers. Putting resources in different zones in a region provides isolation for many types of infrastructure, hardware, and software failures. Putting resources in different regions provides an even higher degree of failure independence. When you expand the Zone dropdown list in the Google Developer Console, you will see the available regions and zones:

GCE Instance Metadata dropdown
For example, when you launch an instance in Europe-west1, you can choose to launch the instance in either Europe-west1-a or Europe-west1-b. You could then launch 2 instances that have better uptime and redundancy.

Machine Type

When do you deal with traditional infrastructure, you will assess the power of each server based on its CPU, RAM and storage capacity, later on, the same server can be upgraded to support better CPU, additional memory and storage. On GCE, the machine type influences the power of an instance. Machine types determine the physical specifications of the instances running in GCE, such as the amount of memory, virtual cores, and disk storage limits an instance will have. Currently, GCE supports a variety of machine types:

  • Standard machine types
  • High CPU machine types
  • High memory machine types
  • Small machine types

Standard machine types are suitable for most of the workloads including web applications, application servers, database servers, and backend tasks. High CPU machine types are ideal for compute-intensive tasks that require more virtual cores relative to memory while high memory instances are ideal for tasks that require more memory relative to virtual cores. Small machine types are more cost-effective for running small, non-resource intensive applications than standard, high-memory or high-CPU instance types. You can select the right machine type from the Google Developer Console.

Boot Source

Each instance is backed by a persistent disk that has a bootable root file system. Technically, when you launch an instance, GCE first creates a disk and then attaches that to a VM before booting it up. This disk can come from a variety of sources. If you choose a new disk, that will be a read-write replica of a special disk called image. The boot source can also be an existing disk that was used to boot an instance.

Since GCE doesn’t support temporarily stopping and starting the instances, the instance can be deleted while retaining the boot disk. Later on, the same disk can be used to launch a new instance that contains all the configuration of the original instance. Finally, the boot source can be pointed to an existing snapshot. A snapshot is a point-in-time backup of a persistent disk. If you want quickly clone a running instance with minimal downtime, you can take a snapshot of the boot disk and use that to launch another identical instance. This is a flexible yet powerful way to launch symmetrical instances in a short span of time. Google Developer Console makes it easy to choose the right option. (The next post discusses the concepts of persistent disks and snapshots in-depth. Stay tuned).


OS Type

If you choose to boot your instance from a new disk, then you have to choose the right image. As discussed above, an image is a persistent disk that contains a bootable operating system and root file system. As on date, GCE supports the following operating systems:
• Debian Linux
• CentOS Linux
• SUSE Enterprise Linux
• Red Hat Enterprise Linux
• Microsoft Windows Server

Debian and CentOS are the generic open source operating systems while SUSE, RHEL and Windows Servers images are considered to be premier operating systems that are charged slightly more than the other open source OS images.

In this post, you learned about the key parameters required to launch a GCE instance. In the next post, I will introduce persistent disks and snapshots that form one of the key building blocks of GCE.

Avatar

Written by

Janakiram MSV

Janakiram MSV heads the Cloud Infrastructure Services at Aditi Technologies. He contributes to cloud related articles on YourStory.com. A former employee of Microsoft and Amazon, Janakiram built a cloud consulting company that recently got acquired by Aditi Technologies. He is an analyst with Gigaom Research contributing to the Cloud related market research and analysis. He can be reached at jani@janakiram.com.

Related Posts

Albert Qian
Albert Qian
— June 19, 2018

Preparing for the Microsoft Azure 70-535 Exam

(Update) The Azure 70-535 exam was retired on December 31, 2018, and it was replaced by the AZ-300 and AZ-301 exams. To prepare for these exams, we recommend the Cloud Academy's AZ-300 Exam Preparation: Technologies for Microsoft Azure Architects and the AZ-301 Exam Preparation: Designi...

Read more
  • Azure
  • Compute
  • Database
  • Security
Avatar
Stuart Scott
— May 8, 2017

Which AWS Compute Service Do I Need?

With the ever increasing and expanding service catalog being developed by the engineers at AWS, it's easy to get confused when it comes to understanding which AWS Compute service you need and which service you should be using for your deployments. Which service offers me the quickest de...

Read more
  • AWS
  • Compute
  • Lightsail
Avatar
Sudhi Seshachala
— February 21, 2017

Which Cloud Computing Platform? Advantages of a Multi-Cloud Strategy

The rivalry is warming up in the cloud space as vendors continue to offer innovative features and reduced pricing. In this post, we will highlight the competition between the three titans of the cloud: Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft’s Azure. Which ...

Read more
  • AWS
  • Azure
  • Compute
  • Google Cloud Platform
Avatar
Paul Carlstroem
— May 5, 2016

Compute Fundamentals for AWS: Updated Course

Innovation fuels cloud computing.Compute Fundamentals for AWS: Updated, Improved, and Better than EverCloud Academy happily announces a major update to a popular course: Compute Fundamentals for AWS.David Robinson originally built this course an introduction to AWS's cornerstone comp...

Read more
  • AWS
  • Compute
Avatar
David Clinton
— May 19, 2015

Preemptible Virtual Machines: Cheap Instances From Google Compute Engine

Could you use some serious computing power? Say hello to Google's Preemptible Virtual Machines.One of the nice things about having access to hundreds of thousands of computers is that you get to do cool stuff. Arguably, the fact that, with enough creativity, you can use that access to...

Read more
  • Compute
  • Google Cloud Platform
Avatar
Sanket Dangi
— March 24, 2015

EC2 vs Google Compute Engine: Comparing the Big Players in IaaS

IaaS: EC2 vs Google Compute EngineArguably, Infrastructure as a Service (IaaS) is the most important cloud computing vertical. Within that, in terms of services and features, AWS enjoys the top position, while Google Cloud Platform is slowly catching up. In this post, we'll discuss th...

Read more
  • AWS
  • Compute
  • EC2
  • Google Cloud Platform
Igor Putilov
Igor Putilov
— February 26, 2015

EC2 Pricing: Understanding Compute Costs on AWS

Amazon EC2 pricing considerations (& how to save your money)After a first glance at the Amazon EC2 pricing page, you might find absorbing so much information a little intimidating. In this post, we will try to break EC2 pricing down and provide strategies to not only ease the pain...

Read more
  • AWS
  • Compute
  • EC2
Avatar
Andrea Colangelo
— October 23, 2014

Learn Google Compute Engine – New Course

After the launch of our first course introducing the Google Cloud Platform, David Clinton is back with a brand new course - Launching a GCE instance. We just launched it, and you can watch it on CloudAcademy.Google is one of the hottest cloud platform, probably the most interesting ...

Read more
  • Compute
  • Google Cloud Platform
Avatar
Madan Ganesh Velayudham (ActOnMagic)
— August 8, 2014

Deploying a MEAN Stack Onto Google Compute Engine

Gone are the days where a product team used to spend a considerable amount of time to build a basic web application.  Say Hi to MEAN! If you are familiar with LAMP/WAMP stacks, you could consider MEAN as a complete stack based on JavaScript. In fact, MEAN represents MongoDB,  Express, A...

Read more
  • Azure
  • Compute
Avatar
Praveen Kumar Muppala
— July 21, 2014

How Identity and Access Management Works in Google Compute Engine

Google Cloud Platform is gaining momentum, and it seems that Google is warming up to compete with Amazon Web Services. During the last quarter, Google has invested heavily on new services and features for both Google App Engine and Google Compute Engine. Like any other cloud computing p...

Read more
  • Compute
  • Google Cloud Platform
Avatar
Janakiram MSV
— July 14, 2014

Load Balancing in Google Compute Engine

Load balancing is an important feature of cloud infrastructure services. With the ability to rapidly launch VMs, it is important to ensure that all the VMs are evenly utilized. Amazon’s Elastic Load Balancer (ELB) is quite popular for its ability to route the traffic across a set of ins...

Read more
  • Compute
  • Elastic Load Balancer
  • Google Cloud Platform
Avatar
Janakiram MSV
— July 4, 2014

Overview of Replica Pools in Google Compute Engine

Cloud is all about elasticity. Cloud infrastructure running web-scale applications can shrink and grow dynamically. Batch processing on the cloud will have to deal with on-demand instantiation of the machines based on the load.Google Compute Engine is a high performance, next-genera...

Read more
  • Compute
  • Google Cloud Platform