License changes and restrictions

Linux

Only certain Premium Linux OS licenses are eligible to be appended, removed, or replaced. License changes are supported for Red Hat Enterprise Linux (RHEL), RHEL for SAP, SUSE Linux Enterprise Server (SLES), SLES for SAP, Ubuntu, and Ubuntu Pro for the following use cases:

  • Changing between BYOS and PAYG billing models for RHEL, RHEL for SAP, SLES, and SLES for SAP
  • In-place upgrades from Ubuntu to Ubuntu Pro
  • Adding or removing RHEL ELS add-on licenses

The license owner can change valid license changes for a given license. Before you change a license, confirm that the target license change is valid. Thisguide outlines how to find the current valid license changes for a particularlicense. It also outlines any restrictions that apply to changing that license.

Before you begin

Review license information

In Cloud Shell, run the following command. ReplaceLICENSE_URLwith the license that you want to investigate. For a list of common Linuxlicense URLs, see theValid licenses table.

curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"LICENSE_URL

For example, to examine the RHEL 7 PAYG License:

curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-server

The output is similar to the following:

{  "kind": "compute#license",  "name": "rhel-7-server",  "chargesUseFee": true,  "id": "6080198135500386054",  "licenseCode": "1000006",  "creationTimestamp": "2013-08-19T17:17:57.000-07:00",  "description": "RedHat Enterprise Linux 7",  "transferable": true,  "selfLink": "https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-server",  "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/6080198135500386054",  "appendableToDisk": true,  "removableFromDisk": false,  "allowedReplacementLicenses": [    "1492188837615955530",    "8475125252192923229",    "601259152637613565",    "489291035512960571",    "1270685562947480748"  ],  "osLicense": false,  "soleTenantOnly": false,  "multiTenantOnly": false,  "minimumRetention": {    "seconds": "0",    "nanos": 0  },  "updateTimestamp": ""}

The response outlines the following key fields:

  • removableFromDisk: iftrue, the license can be removed from thedisk. Iffalse, the license cannot be removed without replacing it witha valid license.
  • allowedReplacementLicenses: this is a list of license codes forlicenses that can serve as valid replacements. To find out which licensecode corresponds to which license, seevalid licenses.
  • minimumRetention: the minimum amount of time that the license needs tobe present on the VM before another license change can be applied.

Example: Replace RHEL 7 PAYG with RHEL 8 PAYG

To replace a RHEL 7 PAYG license with a RHEL 8 PAYG license, use the followinginformation to find the license code and license URL for RHEL 8 PAYG:

License NameLicense CodeLicense URL
RHEL 8 PAYG601259152637613565https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-server

Since the license code for RHEL 8 PAYG (601259152637613565) was listed underallowedReplacementLicenses for RHEL 7 PAYG, this indicates that a validlicense replacement is possible.

To perform the license replacement, use the following command:

  gcloud compute disks updateDISK_NAME      --replace-license=projects/rhel-cloud/global/licenses/rhel-7-server,projects/rhel-cloud/global/licenses/rhel-8-server      --zone=DISK_ZONE

Valid licenses

Valid licenses for RHEL, SLES, Ubuntu, and Ubuntu Pro are listed in the followingtables.

RHEL license information

License NameLicense CodeLicense URL
RHEL 6 PAYG1000002https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-6-server
RHEL 7 PAYG1000006https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-server
RHEL 7 ELS4646774207868449156https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-els
RHEL 8 PAYG601259152637613565https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-server
RHEL 9 PAYG7883559014960410759https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-9-server
RHEL 6 BYOS4720191914037931587https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-6-byos
RHEL 7 BYOS1492188837615955530https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-byos
RHEL 8 BYOS8475125252192923229https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-byos
RHEL 9 BYOS3837518230911135854https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-9-byos
RHEL 8 for SAP PAYG1270685562947480748https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-8-sap
RHEL 9 for SAP PAYG8291906032809750558https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-9-sap
RHEL 8 for SAP BYOS489291035512960571https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-8-sap-byos
RHEL 9 for SAP BYOS6753525580035552782https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-9-sap-byos

SLES license information

License NameLicense CodeLicense URL
SLES 11 PAYG1000004https://www.googleapis.com/compute/v1/projects/suse-cloud/global/licenses/sles-11
SLES 12 PAYG1000008https://www.googleapis.com/compute/v1/projects/suse-cloud/global/licenses/sles-12
SLES 15 PAYG5422776498422280384https://www.googleapis.com/compute/v1/projects/suse-cloud/global/licenses/sles-15
SLES 11 BYOS3562683225507985416https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-11-byos
SLES 12 BYOS5995918435054614609https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-12-byos
SLES 15 BYOS7429287564402499183https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-15-byos
SLES 12 for SAP PAYG4079932016749305610https://www.googleapis.com/compute/v1/projects/suse-sap-cloud/global/licenses/sles-sap-12
SLES 15 for SAP PAYG4764125400812555962https://www.googleapis.com/compute/v1/projects/suse-sap-cloud/global/licenses/sles-sap-15
SLES 12 for SAP BYOS7194268483061119118https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-sap-12-byos
SLES 15 for SAP BYOS6035015651111738499https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-sap-15-byos

Ubuntu and Ubuntu Pro license information

License NameLicense CodeLicense URL
Ubuntu 16.04 (Xenial Xerus)1000201https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1604-xenial
Ubuntu Pro 16.04 (Xenial Xerus)8045211386737108299https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-1604-lts
Ubuntu 18.04 LTS (Bionic Beaver)5926592092274602096https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1804-lts
Ubuntu Pro 18.04 LTS (Bionic Beaver)6022427724719891830https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-1804-lts
Ubuntu 20.04 LTS (Focal Fossa)2211838267635035815https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-2004-lts
Ubuntu Pro 20.04 LTS (Focal Fossa)599959289349842382https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-2004-lts
Ubuntu 22.04 LTS (Jammy Jellyfish)5511465778777431107https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-2204-lts
Ubuntu Pro 22.04 LTS (Jammy Jellyfish)2592866803419978320https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-2204-lts
Ubuntu 24.04 LTS (Noble Numbat)3242930272766215801https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-2404-lts
Ubuntu Pro 24.04 LTS (Noble Numbat)2176054482269786025https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-2404-lts

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-09 UTC.