Google Compute Engine is compatible with many operating systems and distributions. You can use any operating system images offered by Compute Engine or you can create a custom image .
There are a number of operating systems that are currently available and ready to use on Compute Engine. These operating systems are provided by Google or by a third-party vendor. For more information, see the Images documentation.
The following table specifically describes each operating system that is known to work with Compute Engine.
Operating system | Documentation | Support channel | Compute Engine image | Notes |
---|---|---|---|---|
Debian 7 Wheezy | Website | Google Compute Engine team |
debian-7-wheezy-vYYYYMMDD
|
|
Debian 7 Wheezy Backports | Website | Google Compute Engine team |
backports-debian-7-wheezy-vYYYYMMDD
|
|
CentOS 6 | Website | Google Compute Engine team |
centos-6-vYYYYMMDD
|
|
openSUSE | Website | openSUSE community |
opensuse-13-1-vYYYYMMDD
|
|
CoreOS | Website | CoreOS forums |
|
|
Red Hat Enterprise Linux | Website | Google Compute Engine team |
rhel-6-4-vYYYYMMDD
|
PAID |
SUSE | Website | Google Compute Engine team |
sles-11-sp3-vYYYYMMDD
|
PAID |
Windows Server | Website | Google Compute Engine team |
windows-server-2008-r2-dc-vYYYYMMDD
|
PAID |
FreeBSD * | Website | FreeBSD forums | Import instructions | |
SELinux * | Website | Community Wiki | Import instructions |
* Compute Engine does not manage these operating systems and any questions or costs would be determined by the corresponding operating system community.
Contents
Debian
Debian is a free operating system offered by the Debian community . Compute Engine offers and supports two flavors of Debian 7 Wheezy images:
- Standard Debian 7 Wheezy images
- Debian 7 Wheezy backport images
Accessing Debian images
To get a list of available Debian 7 Wheezy images:
$ gcloud compute images list
To use a Debian 7 image:
# Create an instance from a standard Debian image.
$ gcloud compute instances create example-instance --zone ZONE --image debian-7
# Create an instance from a backports Debian image.
$ gcloud compute instances create example-instance --zone ZONE --image debian-7-backports
Specifying
--image debian-7
causes Compute Engine to automatically
pick up the latest Debian 7 image in
gcloud compute
. If you want to use another version
of a Debian 7 image, specify the full image name and image project:
--image debian-7-wheezy-vYYYYMMDD --image-project debian-cloud
For a backports image:
--image backports-debian-7-wheezy-vYYYYMMDD --image-project debian-cloud
In the API, you must always provide the full URL to the image, in the format:
https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
For backports images:
https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-debian-7-wheezy-vYYYYMMDD
Backported Debian 7 Wheezy
Google releases a set of special Debian 7 images that are marked by the use of
backports
in the image name. These images use the kernel from the
Debian Backports
repository, which provides
access to the latest bug fixes and new features in Debian. For example, the
backports image provides a fix to the
memory leak issue in
virtio-scsi
that is
not yet incorporated in the stable version of the Debian 7 distribution. The
backports image also provides support for features like multi-queue networking.
Generally, it takes some time before changes from the backports repository are merged into main repositories, so Compute Engine provides the backport image as a way for users to apply new fixes and access new features prior to the stable releases. However, the backports repository has not been fully tested by the Debian community and you should use the backports image at your own risk. Changes from the backports repository are pulled into stable releases once they are deemed ready, so you could also choose to wait for the next stable Debian release that contains your desired feature or fix, rather than using the backports image.
Support
If you run into issues running the Debian images offered by Google, file a report or post your question to the gce-discussion forum.
If you run into issues trying to run another version of Debian that isn't provided by Google, send your question to the Debian community .
CentOS
CentOS is a free operating system platform that is derived from the sources of Red Hat Enterprise Linux (RHEL). Compute Engine supports and offers CentOS 6 images.
Accessing CentOS images
To get a list of available CentOS 6 images:
$ gcloud compute images list
To use a CentOS 6 image:
# Create an instance from the CentOS image.
$ gcloud compute instances create example-instance --zone ZONE --image centos-6
Specifying
--image centos-6
causes Compute Engine to automatically
pick up the latest CentOS 6 image in
gcloud compute
. If you want to use another version
of a CentOS 6 image, specify the image name and the image project:
--image centos-6-vYYYYMMDD --image-project centos-cloud
In the API, you must always provide the full URL to the image, in the format:
https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-vYYYYMMDD
Support
If you run into issues running the CentOS images offered by Google, file a report or post your question to the gce-discussion forum.
If you run into issues trying to run another version of CentOS that is not provided by Google, contact the CentOS community for support.
openSUSE
openSUSE is a free Linux-based operating system sponsored by SUSE. Compute Engine offers openSUSE 13.1 images built by SUSE.
Accessing openSUSE images
To get a list of available openSUSE 13.1 images, use:
$ gcloud compute images list
To use an openSUSE image:
# Create an instance from the openSUSE image.
$ gcloud compute instances create example-instance --zone ZONE --image opensuse-13-1
Specifying
--image opensuse-13-1
causes Compute Engine to automatically
pick up the latest openSUSE 13.1 image in
gcloud compute
. If you want to use another version
of a openSUSE 13.1 image, specify the image name and image project:
--image opensuse-13-1-vYYYYMMDD --image-project opensuse-cloud
In the API, you must always provide the full URL to the image, in the format:
https://www.googleapis.com/compute/v1/projects/opensuse-cloud/global/images/opensuse-13-1-vYYYYMMDD
Support
If you run into issues running these openSUSE images, please contact the openSUSE community for support.
CoreOS
CoreOS is a new distribution that provide features needed to run modern infrastructure stacks. CoreOS uses Linux containers to manage your services at a higher level of abstraction. Compute Engine provides CoreOS images built and supported by CoreOS.
Accessing CoreOS images
CoreOS offers a stable, alpha, and beta version of their operating system. To get a list of available CoreOS images, use:
$ gcloud compute images list
To use an CoreOS image:
# Create an instance from a CoreOS image.
$ gcloud compute instances create example-instance --zone ZONE --image coreos
Specifying
--image coreos
causes Compute Engine to
automatically pick up the latest stable CoreOS image in
gcloud compute
. To
use a specific version of a CoreOS image, specify the image name and
image project:
--image coreos-{alpha,beta,stable}-XXX-X-X-vYYYYMMDD --image-project coreos-cloud
In the API, you must always provide the full URL to the image, in the format:
https://www.googleapis.com/compute/v1/projects/coresos-cloud/global/images/coreos-{alpha,beta,stable}-XXX-X-X-vYYYYMMDD
Support
For detailed instructions on using CoreOS images, see Running CoreOS on Google Compute Engine .
If you run into issues running these CoreOS images, please contact the CoresOS forum for support.
Red Hat Enterprise Linux (RHEL)
Red Hat Enterprise Linux (RHEL) is an open-source Linux operating system that provides both server and desktop operating systems.
Google-provided RHEL 6 images mostly operate like publicly-available RHEL images and other Compute Engine images, except for a couple of notable differences noted below.
Red Hat Cloud Access: bring your own RHEL subscription
As an added benefit for subscribers of Red Hat Enterprise products, Red Hat Cloud Access enables enterprise customers to migrate their current subscriptions for use on Google Compute Engine. This allows you to use different version of RHEL than is currently offered by Google on your Compute Engine instances, or to migrate your own RHEL image to Compute Engine. For example, Google offers RHEL 6.4 images. If you require RHEL 5.4, you can purchase a RHEL subscription directly from Red Hat and apply it to your usage on Compute Engine. For more information, see the Red Hat Cloud Access page.
Accessing RHEL images
You can see a list of available RHEL images using the
gcloud compute images list
command:
$ gcloud compute images list
To use a RHEL image:
# Create an instance from the RHEL image.
$ gcloud compute instances create example-instance --zone ZONE --image rhel-6
Specifying
--image rhel-6
automatically picks up the latest RHEL 6 image in
gcloud compute
.
In the API, you must always provide the full URL to the image, in the format:
https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/images/rhel-6-vYYYYMMDD
Support
If you have paid support with Google Cloud Platform, please file a report through one of the support channels . If you do not have paid support, please post to the gce-discussion group.
If you are already a subscriber to Red Hat Cloud Access, contact your Red Hat representative for information on how to migrate your subscription to Compute Engine.
Notable differences from standard RHEL images
Compute Engine-provided RHEL images differ from standard RHEL images in the following ways:
-
Contain Compute Engine tools, such as
gcloud compute
, gsutil , and gcimagebundle . - Allow inbound SSH access through the RHEL firewall, and the ssh server is enabled by default.
- Contain a pre-installed package set that the remains close to the default package set provided by RHEL, with a few differences. For example, there are some additional packages added that are required by some tools, and some unneeded hardware-specific packages have been removed. All RHEL packages remain available.
-
Augment the rsyslog configuration to support a Debian-style
/etc/rsyslog.d
directory. This enables the Compute Engine-standard/var/log/google.log
and/var/log/startupscript.log
files. -
Set the default SSH server configuration to disable password authentication
and root login, and sends each client a keepalive packet after 7 minutes of
idleness to allow long-lived SSH connections. These SSH server options
remain configurable via
/etc/ssh/sshd_config
. -
Use Red Hat Update Infrastructure (RHUI) update servers hosted on Compute Engine.
Notable differences from other Compute Engine images
Compute Engine-provided RHEL images differ from other Compute Engine images in the following ways:
- Enable SELinux by default.
-
Enable iptables because of Red Hat support requirements. Note that Compute Engine has firewall rules controllable through the API or
gcloud compute
that can be enabled to block incoming traffic. iptables only restricts outgoing traffic packages and it is possible to disable iptables with the standard RHEL mechanism, includingsudo system-config-firewall-tui
orsudo chkconfig iptables off; sudo service iptables stop
.
SUSE images
SLES is a Linux enterprise operating system that is backed by Novell. Compute Engine offers SUSE Linux Enterprise Server (SLES) 11 images for your virtual machine instances. These images have a similar configuration to the Google-provided Debian and CentOS images, and comes pre-installed with the Compute Engine image packages
Accessing SUSE images
You can see a list of available SUSE images using the
gcloud compute images list
command:
# List available images
$ gcloud compute images list
To use a SUSE image:
# Create an instance from the SUSE image.
$ gcloud compute instances create example-instance --zone ZONE --image sles-11
Specifying
--image sles-11
automatically picks up the latest SUSE 11 image in
gcloud compute
.
In the API, you must provide the full URL to the SUSE image in your request. A full URL to a SUSE image looks like the following:
https://www.googleapis.com/compute/v1/projects/suse-cloud/global/images/sles-11-sp3-vYYYYMMDD
Support
If you have paid support with Google Cloud Platform, please file a report through one of the support channels . If you do not have paid support, please post to the gce-discussion group.
Notable differences from standard SUSE images
Compute Engine-provided SUSE images differ from standard SUSE images in the following ways:
-
Contain Compute Engine tools, such as
gcloud compute
and gsutil . -
Use update servers for the SUSE Subscription Management Tool (SMT) hosted on Compute Engine.
Windows Server images
Google Compute Engine offers Windows Server 2008 R2 Datacenter Edition images for Compute Engine instances. These images are very similar to the standard Windows Server 2008 R2 operating system, with a few notable changes, described below.
You can see a full list of available Windows images using the
listimages
command:
# List available images
$ gcloud compute --project windows-cloud images list
Windows images are a paid resource and incur additional fees to use. For more information, see the price sheet .
Starting a new Windows virtual machine instance
You can start a new Windows virtual machine instance using
gcloud compute
and the
API
. Currently, it is not yet possible to
successfully create and log into a Window's instance from the Google Developers Console.
To create a Windows instance, you must select a username and password and pass
that information into
gcloud compute
when you create your instance. When
creating a password, your password must meet the
complexity requirements
.
It is also recommended that you use a password file, which is more secure than
passing in your password directly on the command line.
Your password file must follow the following password requirements:
- Have at least 8 characters.
- Follow these complexity requirements .
- Cannot contain any unicode characters, which are not supported.
See the instructions below on creating your first Windows instance.
gcloud compute
gcloud compute
automatically creates a
root persistent disk
as part of the instance
creation request. This root persistent disk has a default size of 100GB.
Create a new Windows instance in
gcloud compute
To create a new Windows instance, run the following command:
$ gcloud compute instances create windows-instance --image windows-2008-r2 \
--metadata gce-initial-windows-user=USERNAME \
--metadata-from-file gce-initial-windows-password=PASSWORD_FILE \
--zone ZONE
Specifying
--image windows-2008-r2
automatically picks up the
latest Windows images in
gcloud compute
.
Make sure you restrict access to your password file so it is not accessible
without the right permissions. For example, on UNIX, you can run
s
chmod 600 password-file.txt
to restrict access to the user who originally
created the file. On Windows, see the
Windows documentation
.
Creating a root persistent disk and attaching it to a Windows instance
If you need a root persistent disk that is larger than 100GB, you can create your root persistent disk separately and then use it with a new virtual machine instance.
-
Create your root persistent disk separate from your virtual machine instance.
$ gcloud compute disks create windows-root-pd \ --image windows-2008-r2 \ --zone ZONE --size 200GB
-
Check that your persistent disk is 200GB.
$ gcloud compute disks describe windows-root-pd creationTimestamp: '2014-06-16T13:13:37.015-07:00' description: '' id: '3957804754268499039' kind: compute#disk licenses: - https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-2008-r2-dc name: windows-root-pd selfLink: https://www.googleapis.com/compute/v1/projects/my-project/zones/ZONE/disks/windows-root-pd sizeGb: '200' sourceImage: https://www.googleapis.com/compute/v1/projects/windows-cloud/global/images/windows-server-2008-r2-dc-vYYYYMMDD sourceImageId: '13115725462461107888' status: READY type: https://www.googleapis.com/compute/v1/projects/my-project/zones/ZONE/diskTypes/pd-standard zone: https://www.googleapis.com/compute/v1/projects/my-project/zones/ZONE
-
Create your virtual machine instance with your root persistent disk, passing in a Windows password file and a username.
$ gcloud compute instances create windows-instance --disk name=windows-root-pd boot=yes \ --metadata gce-initial-windows-user=USERNAME \ --metadata-from-file gce-initial-windows-password=PASSWORD_FILE \ --zone ZONE
Caution: Once you have initiated the request to create an instance using a Windows persistent disk, do not interrupt the creation process as that could cause your Windows disk to become unusable.
Unlike other images, Windows images do not require that you repartition the root persistent disk in order to use additional disk space beyond the size of the operating system. This additional space is available to you immediately.
Retrieving a Windows password and username
Keep track of your username and password as you will need it to log into
your Windows instance. If you forget either your username or password, you
can retrieve it by looking at the instance's metadata, using the
gcloud compute instances describe
command:
$ gcloud compute instances describe windows-instance --zone ZONE
Checking if your instance has successfully started
Windows instances experience a longer start up time because of the sysprep process. To check if your instance has successfully started up and is ready to be used, take a look at the serial port output, which prints out the following lines once an instance is ready to use:
$ gcloud compute instances get-serial-port-output windows-instance
...snip...
--> Updated 1 rule(s). Ok.
Restarting Terminal Service services, to enable RDP.
Enabled Remote Desktop
Clearing events in EventViewer
Calling oobe-script from metadata.
Running schtasks with arguments /run /tn GCEStartup
--> SUCCESS: Attempted to run the scheduled task "GCEStartup".
-------------------------------------------------------------
Instance setup finished. test-windows-0609 is ready to use.
API
To create an instance in the API, use the
initializeParams
property in your instance creation request with a Windows image. You must
also provide the metadata key/value pair
gce-initial-windows-password:<password>
to set your initial password. You
will use this password to log into your machine. You chosen password must
match the following requirements:
- Be at least 8 characters long.
- Follow these complexity requirements
- Cannot contain any unicode characters.
You can also select your desired user name by passing in the
gce-initial-windows-user
metadata key as well. For example, your request
body might look like the following:
instance = {
'name': NEW_INSTANCE_NAME,
'machineType': machine_type_url,
'disks': [{
'boot': 'true',
'type': 'PERSISTENT',
'initializeParams': {
'diskName': 'my-windows-root-disk',
'sourceImage': '<full-uri-to-windows-image>',
}
}],
'networkInterfaces': [{
'accessConfigs': [{
'type': 'ONE_TO_ONE_NAT',
'name': 'External NAT'
}],
'network': network_url
}],
'serviceAccounts': [{
'email': DEFAULT_SERVICE_EMAIL,
'scopes': DEFAULT_SCOPES
}],
'metadata': {
'items': [
{
'key': 'gce-initial-windows-password',
'value': '<password>'
},
{
'key': 'gce-initial-windows-user',
'value': <username>'
}
]
}
}
Your
full-uri-to-windows-image
must be a fully-qualified URL to the
desired Windows image. For example:
https://www.googleapis.com/compute/v1/projects/windows-cloud/global/images/<windows-image-name>
For more information on creating a virtual machine instance, read the
instances : insert
documentation.
Logging into a Windows virtual machine instance
You must connect to the virtual machine using a Remote Desktop Protocol (RDP) client. This can be a client of your choice or you can download the Chrome RDP extension . To log into your Windows instance after you have created it:
-
Add a firewall rule to allow RDP traffic.
In
gcloud compute
, you can do this by running the following command:gcloud compute firewall-rules rdp --allow tcp:3389 --sources-ranges CIDR_ADDRESSES
It may take a couple minutes for the firewall to propagate.
-
Install a RDP client if you do not already have one.
If you don't have a preference, you can install the Chrome RDP extension
-
Find the instance's external IP address.
You will need your instance's external IP address to properly connect to the instance. To get an instance's external IP address in gcutil:
$ gcloud compute instances describe INSTANCE
In the Developers Console:
- Log into the Google Developers Console .
- Click on the project where your instance was created.
- Click Compute Engine in the left-hand menu.
- On the VM Instances page, click on the Windows instance you just created.
- Scroll to the External IP section to find the external IP address.
-
Connect to your instance using your RDP client.
In your RDP client, provide your virtual machine instance's external IP address as the IP address to connect to. For example, in the Chrome RDP extension, you would enter the IP address in the following format:
Next, enter in your login information. The default account on a Windows instance is always the
gceadmin
account.-
Domain:
<leave blank>
-
Username:
gceadmin
-
Password:
<initial-windows-password-you-chose>
-
Domain:
You can now use your Windows virtual machine instance.
Using startup scripts on Windows
Specifying a startup script for a Windows virtual machine instance is slightly
different than using a startup script for a Linux-based virtual machine. You
will need to pass in special parameters that indicate to
Compute Engine whether to run your startup script before or after the
instance has been syspreppred, and how often your script should run. Depending
on your use case, you need to provide a startup script flag from the list below,
with the
--metadata-from-file
flag. For example:
$ gcloud compute instances create windows-instance \
--image windows-2008-r2 \
--zone us-central1-a \
--metadata-from-file sysprep-specialize-script-cmd=/path/to/my/file
Runs during sysprep, before reboot | Runs once, after sysprep is complete | Runs after sysprep is complete and on every subsequent boot | |
---|---|---|---|
cmd
startup scripts
|
sysprep-specialize-script-cmd
|
sysprep-oobe-script-cmd
|
windows-startup-script-cmd
|
bat
startup scripts
|
sysprep-specialize-script-bat
|
sysprep-oobe-script-bat
|
windows-startup-script-bat
|
PowerShell startup scripts |
sysprep-specialize-script-ps1
|
sysprep-oobe-script-ps1
|
windows-startup-script-ps1
|
Migrating windows instances to another zone
To migrate an existing Windows instance to a different zone, you can create a custom image of your Windows root persistent disk and use it to start another instance in another zone. For more information, see Creating an image from a root persistent disk .
Support
If you have paid support with Google Cloud Platform, file a report through one of the support channels . If you do not have paid support, post to the gce-discussion group .
Notable differences
Although Compute Engine attempts to keep Windows images as close to the out-of-box experience as possible, there are some notable differences from other Windows experiences:
- Compute Engine's Window images use the System Preparation (sysprep) tool to set up your instance. This tool automatically builds and configures a Windows installation. When starting an instance with a Windows image, you will need to allow extra time for sysprep tool to run after the instance has been created.
- These Windows images come pre-installed with Internet Explorer 10.
- Windows Firewall is turned on by default.
- Users are responsible for patching in updates that are not available when the image is released.
- Compute Engine's Windows images are patched with all the current security updates during the time of release. Every month, Compute Engine will release an updated Windows image.
- Windows Remote Desktop connection is enabled by default. However, you will need to manually enable port 3389 in your Compute Engine Firewall before you can use remote desktop.
- .Net 4.5.1 and WMF 4.0 are pre-installed.
Known issues
The following are known issues with Windows images:
- Dynamic attach and detaching of persistent disks is not currently supported.
- Once a new instance is created, you cannot connect to it instantly. All new instances are syspreped, which can take 5-10 mins to finish.
- Kernel software accessing non-emulated Model Specific Registers will generate General Protection Faults, which can cause a system crash depending on the guest operating system.