Google Compute Engine FAQ

About Compute Engine

What is Compute Engine? What can it do?

Compute Engine is an Infrastructure-as-a-Service product offering flexible, self-managed virtual machines (VMs) hosted on Google's infrastructure. Compute Engine includes Linux and Windows based VMs running on KVM, local and durable storage options, and a simple REST based API for configuration and control. The service integrates with Google Cloud technologies such as Cloud Storage, App Engine, and BigQuery to extend beyond the basic computational capability to create more complex and sophisticated apps.

What is a virtual CPU in Compute Engine?

On Compute Engine, each virtual CPU (vCPU) is implemented as a single hardware hyper-thread on one of the available CPU Platforms. On Intel Xeon processors, Intel Hyper-Threading Technology allows multiple application threads to run on each physical processor core. You configure your Compute Engine VMs with one or more of these hyper-threads as vCPUs. The machine type specifies the number of vCPUs that your instance has.

You can identify the specific CPU platform for your instance using one of the following options:

If you want to change the CPU platform for your instance, you can specify a minimum CPU platform.

How do App Engine and Compute Engine relate to each other?

We see the two as being complementary. App Engine is Google's Platform-as-a-Service offering and Compute Engine is Google's Infrastructure-as-a-Service offering. App Engine is great for running web-based apps, line of business apps, and mobile backends. Compute Engine is great for when you need more control of the underlying infrastructure. For example, you might use Compute Engine when you have highly customized business logic or you want to run your own storage system.

How do I get started?

Try the Getting Started guides for the service. After you have finished the quickstart, read the Virtual machine instances overview to start learning about Compute Engine.

You may be eligible for a free trial. For information about how the free trial works, including information about quotas, see the Free Trial Guide.

Billing

How does pricing and purchasing work?

Compute Engine charges based on compute instance, storage, and network use. VMs are charged on a per-second basis with a 1 minute minimum. Storage cost is calculated based on the amount of data you store. Network cost is calculated based on the amount of data transferred between VMs that communicate with each other and with the Internet. For more information, review our price sheet.

Do your prices include tax?

No, the price sheet does not include tax.

Support and feedback

Do you offer paid support?

Yes, we offer paid support for enterprise customers. For more information, contact our sales organization.

Do you offer a Service Level Agreement (SLA)?

Yes, we offer a Compute Engine SLA.

Where can I send feedback?

For billing-related questions, you can send questions to the appropriate support channel.

For feature requests and bug reports, submit an issue to our issues tracker.

Authentication

How can I authenticate to the Compute Engine API?

How you authenticate to the Compute Engine API depends on the method used to access the API: client libraries, Google Cloud CLI, or REST. For more information, see Authenticate to Compute Engine.

To authenticate apps or workloads to Google Cloud APIs, see Choose a workload authentication method.

What are service accounts?

A service account is a Google account that represents an application, as opposed to representing an end user. These accounts can be used to authorize Compute Engine to act on the behalf of the user to access non-sensitive information. A service account is never used to access user information. Service accounts simplify the process of authenticating from Compute Engine to other services by handling the authorization process for the user.

Compute Engine developers typically use Compute Engine service accounts in their applications. For more information about service accounts, see Service accounts.

How do I create a service account?

Compute Engine creates a service account automatically when you create a new instance and specify a service account scope for that instance.

Projects

What are projects?

A project is a container for all Compute Engine resources. Each project is a totally compartmentalized world; projects do not share resources, can have different owners and users, are billed separately, and are no more accessible to each other than your home computer is accessible to your neighbor's computer.

How can I create a project?

  1. Sign in to your Google account. If you don't already have one, Sign up for a new account.
  2. Go to the Google Cloud console. When prompted, select an existing project or create a new project.
  3. Follow the prompts to set up billing. If you are new to Google Cloud, you have free trial credit to pay for your instances.

What is the difference between a project number and a project ID?

Every project can be identified in two ways: the project number or the project ID. The project number is automatically created when you create the project, whereas the project ID is created by you, or whoever created the project. The project ID is optional for many services, but is required by Compute Engine. For more information, see Google Cloud console Projects.

Where can I find my project ID?

You can find your project ID on the Google Cloud console, which provides a list of your projects and their project IDs upon entry.

Where can I request more quota for my project?

By default, all Compute Engine projects have default quotas for various resource types. However, these default quotas can be increased on a per-project basis. Check your quota limits and usage in the quota page on the Google Cloud console. If you reach the limit for your resources and need more quota, make a request to increase the quota for certain resources using the IAM quotas page. You can make a request using the Edit Quotas button on the top of the page.

Instances

What kind of machine configuration (memory, RAM, CPU) can I choose for my instance?

Compute Engine offers several configurations for your instance. You can also create custom configurations that match your exact instance needs. See the full list of available options on the Machine Types page.

If I accidentally delete my instance, can I retrieve it?

No, instances that have been deleted cannot be retrieved. However, if an instance is simply stopped, you can start it again.

What operating systems can my instances run on?

Compute Engine supports several operating system images and third-party images. Additionally, you can create a customized version of an image or build your own image.

What are the available zones I can create my instance in?

For a list of available regions and zones, see regions and zones.

How do I find out how much quota I have used or have left?

Check your quota limits and usage in the quota page on the Google Cloud console. If you reach the limit for your resources and need more quota, click the Request increase button on the quota page and complete the request form.

What kind of virtual CPU do I have running on my instance?

Check the specific CPU platform for your instance using one of the following options:

What are Preemptible VM instances, and how are Preemptible instances different than normal instances?

Preemptible instances are instances that you can create and run at a much lower price than normal instances, but might stop if Compute Engine needs to reclaim the compute capacity for allocation to other VMs. For more information, see Creating a Preemptible VM Instance.

How can I send outbound emails from a Compute Engine instance?

Generally, Compute Engine blocks outbound traffic through these blocked ports. However, you can set up a mail gateway through Google using SMTP. For more information, read Sending Email from an Instance.

There was a host error with my virtual machine and it was restarted. What happened?

A host error (compute.instances.hostError) means that there was a hardware or software issue on the physical machine or the data center infrastructure hosting your compute instance that caused your instance to crash. A host error involving a total hardware failure or other hardware issues might prevent the live migration of your instance. If your instance is set to automatically restart, which is the default setting, Compute Engine restarts your instance, typically within three minutes from the time the error was detected. Depending on the issue, the restart might take up to 5.5 minutes.

Occasionally, a compute instance might become unresponsive before a host error is signaled. You can reduce the amount of time Compute Engine waits to restart or terminate the instance by setting the host error recovery timeout (Preview). For more information, see Set availability policies.

Physical hardware and software failures can happen occasionally but are rare occurrences. To protect your applications and services from these potentially disruptive system events, review the following resources:

Google also offers managed services such as App Engine and the App Engine flexible environment.

To determine if a host error caused your VM to shut down, see Diagnosing VM shutdowns and reboots.

Images

Do I need to enable the Cloud Storage service before I can store my images externally?

Yes, to store images externally, you need to enable the Cloud Storage service.

Persistent disks

How do I choose the right size for my persistent disk?

Persistent disk performance scales with the size of the persistent disk. Use the persistent disk performance chart to help decide what size disk works for you. If you're not sure, read the documentation to decide how big to make your persistent disk.

Do persistent disks cache writes?

No, persistent disks do not cache writes. Successful completion of a write command occurs only after the data has been transferred to stable media.

LVM for Compute Engine

Logical Volume Manager (LVM) is not supported for Google Cloud provided images.

We recommend the following approaches to volume management on Compute Engine:

  • Use secondary disks. You can avoid the need for root disk resizing by using secondary disks without partitions. Depending on the scenario, using secondary disks can lower the risk of an outage due to error.
  • Resize the file system and partitions on a zonal persistent disk. Before you make any file system modifications, backup your disk by taking a snapshot. In the event of failures during the file system resize, you can use the snapshot to recover the disk.
  • Create custom images with LVM roots based on an existing image that you have.

What steps does Google take to protect my data?

See Disk Encryption.

Can I attach my persistent disk to more than one instance?

You can attach a persistent disk to multiple instances only if the disk is in read-only mode. An SSD persistent disk in multi-writer mode can be attached to two N2 virtual machine (VM) instances. You cannot attach a persistent disk in both read/write mode and read-only mode at the same time. For more information, see Share persistent disks between VMs.

When should I use persistent disks versus Cloud Storage?

Both persistent disks and Cloud Storage can both be used to store files but are very different offerings. Cloud Storage is a massive file container, designed to store extremely large amounts of relatively static data which can be accessed globally, including from Compute Engine virtual machine instances.

The following chart provides some information about the characteristic specialties of each offering and what they are best used for.

Cloud Storage Persistent disk
Characteristics
  • Accessibility
    • Global accessibility (including non-Compute Engine systems)
    • Accessible read/write from many systems
  • Scale
    • Multi-PB scale buckets
  • How to use
    • REST interface; higher latency than locally attached block storage
    • Write semantics at the file level only
    • Offers versioning
    • Files implicit in Cloud Storage
  • Accessibility
    • Regional accessibility and only by Compute Engine instances
    • Mounted read/write by one instance or read-only by many Compute Engine instances
  • Scale
    • 64 TB volume limit
  • How to use
    • SCSI interface; lower latency
    • Write semantics are transactional - random edits
    • No versioning; continuous edits
    • Must format a filesystem to make usable for files
Target Users
  • Content distribution for mobile, consumer, gaming, and SaaS
  • Rich media
  • Read-only input for parallelizable HPC work (e.g., rendering and genomics)
  • Backup and archival
  • Hadoop (via GHFS)
  • Compute Engine boot devices
  • Raw block datastore to build
    • SQL servers (e.g., MySQL)
    • NoSQL servers (e.g., Cassandra/Mongo)
    • Fileservers (e.g., Gluster)
    • Key value store persistence (e.g., Redis)

Networking

Where can I find Compute Engine IP ranges?

Google Cloud publishes a JSON-formatted list of customer-usable global and regional external IP address ranges in cloud.json.

Other Google Cloud IP ranges:

Why is traceroute missing hops to internet-bound destinations?

Running traceroute on a Compute Engine VM instance either shows only the destination or some hops towards internet-bound destinations. For more information, see Traceroute to internet-bound destinations in the VPC documentation.

Zones

Do I have the option of using a regional data center in selected countries?

Yes, Compute Engine offers data centers around the world. These data center options are designed to provide low latency connectivity options from those regions. For specific region information, including the geographic location of regions, see Regions and zones.

How can I tell if a zone is offline?

The Compute Engine Zones section in the Google Cloud console shows the status of each zone. You can also get the status of zones through the command-line tool by running gcloud compute zones list, or through the Compute Engine API with the compute.zones.list method.

Startup scripts

When does my custom startup script run?

Startup scripts run at the end of the boot process.

Infrastructure maintenance events

What are infrastructure maintenance events?

Compute Engine might periodically need to perform scheduled maintenance on zones that may affect your instances. By default, all instances are configured so that these maintenance events are transparent to your apps and work loads. This may cause some performance degradation but your instances will remain online through the maintenance event. For more information, see Transparent maintenance.

How often do scheduled infrastructure maintenance events happen?

Infrastructure maintenance events don't have a set interval between occurrences, but generally happen once every two weeks.

How do I know if an instance will be undergoing an infrastructure maintenance event?

Shortly before a maintenance event, Compute Engine changes a special attribute in a virtual machine's metadata server before any attempts to live migrate or stop and restart the virtual machine as part of a pending infrastructure maintenance event. The maintenance-event attribute is updated before and after an event, letting you detect when these events are imminent. You can use this information to help automate any scripts or commands you want to run before and/or after a maintenance event. For more information, see the Transparent maintenance notice documentation.