About Google Compute Engine
What is Google Compute Engine? What can it do?
Google Compute Engine is an Infrastructure-as-a-Service product offering flexible, self-managed virtual machines hosted on Google's infrastructure. Google Compute Engine includes Linux and Windows based virtual machines running on KVM, local and durable storage options, and a simple REST based API for configuration and control. The service integrates with Cloud platform technologies such as Google Cloud Storage, Google App Engine, and Google BigQuery to extend beyond the basic computational capability to create more complex and sophisticated applications.
What is a virtual CPU in Google Compute Engine?
For the n1 series of machine types, a virtual CPU is implemented as a single hardware hyper-thread on a 2.6 GHz Intel Xeon E5 (Sandy Bridge), 2.5 GHz Intel Xeon E5 v2 (Ivy Bridge), 2.3 GHz Intel Xeon E5 v3 (Haswell), 2.2 GHz Intel Xeon E5 v4 (Broadwell), or 2.0 GHz Intel (Skylake) platform. You can identify the specific CPU platform for your instance using one of the following options:
- See what CPU platforms are available in each of the available regions and zones, or see the CPU Platforms page.
- Use the
compute.instances.getmethod to obtain thecpuPlatformproperty for one of your existing instances. - On Linux instances, run
cat /proc/cpuinfo.
How do Google App Engine and Google Compute Engine relate to each other?
We see the two as being complementary. Google 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. Once you have done 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?
Google Compute Engine charges based on compute instance, storage, and network use. Virtual machines 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 virtual machine instances that communicate with each other and with the Internet. For more information, review our pricesheet.
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 Google 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 on our User Voice forum.
Authentication
How can I authenticate to the Google Compute Engine API?
You can authenticate to the Google Compute Engine API using OAuth 2.0. You can authenticate through a client library, or authenticate directly with an access token.
What are service accounts?
Service accounts are special accounts that belong to a project. These
accounts can be used to authorize Google 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 Google Compute Engine to other services by handling the
authorization process for the user.
Google offers many types of service accounts, but commonly, users will want to use Google Compute Engine service accounts or Google Cloud Platform Console 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 Google 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?
- Sign in to your Google account. If you don't already have one, Sign up for a new account.
- Go to the Google Cloud Platform Console. When prompted, select an existing project or create a new project.
- Follow the prompts to set up billing. If you are new to Google Cloud Platform, 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 Google Compute Engine. For more information, see Cloud Platform Console Projects.
Where can I find my project ID?
You can find your project ID on the Google Cloud Platform 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 Google 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 Platform 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?
Google 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. For more information, see Stopping or Deleting an Instance.
What operating systems can my instances run on?
Google 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 Platform 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:
- See what CPU platforms are available in each of the available regions and zones.
- Use the
compute.instances.getmethod to obtain thecpuPlatformproperty for one of your existing instances. - On Linux instances, run
cat /proc/cpuinfo.
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 terminate if Compute Engine requires access to those resources for other tasks. For more information, see Creating a Preemptible VM Instance
How can I send outbound emails from a Google Compute Engine instance?
Generally, Google 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 means that there was a hardware or software issue on the
physical machine hosting your virtual machine that caused your virtual machine to
crash. When Compute Engine detects such an event, we add a
compute.instances.hostError entry to your operations log.
If your virtual machine is set to automatically restart, which is the default,
Google will also restart your virtual machine on a different physical
machine.
In general, physical hardware failures and software failures can happen from time-to-time, but are rare occurrences. To protect your applications and services from potentially disruptive system events like these, make sure you design robust systems and build scalable and resilient web applications. Use managed instance groups to perform health checking and scaling across groups of Compute Engine instances.
Google also offers managed services such as App Engine and the App Engine flexible environment.
Images
Do I need to sign up for Google Cloud Storage in order to be able to store my images externally?
Yes, to store images externally, you need to sign up for Google Cloud Storage.
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.
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. Disks in read-write mode can be attached only to a single instance. You cannot attach a persistent disk in both read-write mode and read-only mode at the same time.
When should I use persistent disks versus Google Cloud Storage?
Both persistent disks and Google Cloud Storage can both be used to store files but are very different offerings. Google 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.
| Google Cloud Storage | Persistent Disk | |
|---|---|---|
| Characteristics |
|
|
| Target Users |
|
|
Networking
Where can I find Compute Engine IP ranges?
Google Cloud Platform uses a large range of IP addresses, which change
over time. For historical reasons, Google Cloud Platform publishes its list
of public IP addresses in an SPF record for
_cloud-netblocks.googleusercontent.com.
When you need the literal IP addresses for Google Cloud Platform, use
one of the common DNS lookup commands (nslookup,
dig, host) to retrieve the TXT records for the
domain _cloud-netblocks.googleusercontent.com:
$ nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8
This returns a list of the domains included in Google's SPF record, such as:
_cloud-netblocks1.googleusercontent.com, _cloud-netblocks2.googleusercontent.com, _cloud-netblocks3.googleusercontent.com
Next, look up the DNS records associated with those domains, one at a time:
$ nslookup -q=TXT _cloud-netblocks1.googleusercontent.com 8.8.8.8
$ nslookup -q=TXT _cloud-netblocks2.googleusercontent.com 8.8.8.8
$ nslookup -q=TXT _cloud-netblocks3.googleusercontent.com 8.8.8.8
The results of these commands contain the current range of addresses.
Zones
Do I have the option of using a regional data center in selected countries?
Yes, Compute Engine offers data centers in the United States, Europe, and Asia. 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 Platform 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. On modern systems using systemd or upstart, startup scripts will run after google_instance_setup completes.
Infrastructure maintenance events
What are infrastructure maintenance events?
Google Compute Engine may 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 applications and work loads. This may cause some performance degradation but your instances will remain online through the maintenance event. For more information, see Scheduled 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 couple of months.
How do I know if an instance will be undergoing a 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 terminate and restart the virtual machine as part of a pending
infrastructure maintenance event. The maintenance-event attribute
will be updated before and after an event, allowing you to 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.