Solo alcune licenze del sistema operativo Linux Premium possono essere aggiunte, rimosse o sostituite. Le modifiche alle licenze sono supportate per Red Hat Enterprise Linux (RHEL), RHEL for SAP, SUSE Linux Enterprise Server (SLES), SLES for SAP, Ubuntu e Ubuntu Pro per i seguenti casi d'uso:
- Passaggio tra i modelli di fatturazione BYOS e PAYG per RHEL, RHEL for SAP, SLES e SLES for SAP
- Upgrade in loco da Ubuntu a Ubuntu Pro
- Aggiunta o rimozione di licenze del componente aggiuntivo RHEL ELS
Il proprietario della licenza può modificare le modifiche valide della licenza per una determinata licenza. Prima di modificare una licenza, verifica che la modifica della licenza di destinazione sia valida. Questa guida descrive come trovare le modifiche alla licenza valide correnti per una determinata licenza. Inoltre, vengono descritte le eventuali limitazioni applicate alla modifica della licenza.
Prima di iniziare
-
Se non l'hai ancora fatto, configura l'autenticazione.
L'autenticazione verifica la tua identità per l'accesso a Google Cloud servizi e API. Per eseguire
codice o esempi da un ambiente di sviluppo locale, puoi autenticarti su
Compute Engine selezionando una delle seguenti opzioni:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
-
Installa Google Cloud CLI. Dopo l'installazione, inizializza Google Cloud CLI eseguendo il seguente comando:
gcloud initSe utilizzi un provider di identità (IdP) esterno, devi prima accedere a gcloud CLI con la tua identità federata.
- Set a default region and zone.
-
Rivedere le informazioni sulla licenza
In Cloud Shell, esegui questo comando. Sostituisci LICENSE_URL con la licenza che vuoi esaminare. Per un elenco degli URL delle licenze Linux comuni, consulta la tabella Licenze valide.
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" LICENSE_URL
Ad esempio, per esaminare la licenza RHEL 7 PAYG:
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
L'output è simile al seguente:
{
"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": ""
}
La risposta delinea i seguenti campi chiave:
removableFromDisk: setrue, la licenza può essere rimossa dal disco. Sefalse, la licenza non può essere rimossa senza essere sostituita con una licenza valida.allowedReplacementLicenses: questo è un elenco di codici di licenza per le licenze che possono fungere da sostituzioni valide. Per scoprire a quale licenza corrisponde quale codice, consulta Licenze valide.minimumRetention: il periodo di tempo minimo in cui la licenza deve essere presente sulla VM prima che possa essere applicata un'altra modifica alla licenza.
Esempio: sostituisci RHEL 7 PAYG con RHEL 8 PAYG
Per sostituire una licenza PAYG RHEL 7 con una licenza PAYG RHEL 8, utilizza le seguenti informazioni per trovare il codice e l'URL della licenza PAYG RHEL 8:
| Nome licenza | Codice licenza | URL licenza |
|---|---|---|
| RHEL 8 PAYG | 601259152637613565 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-server |
Poiché il codice di licenza per RHEL 8 PAYG (601259152637613565) era elencato in
allowedReplacementLicenses per RHEL 7 PAYG, ciò indica che è possibile
sostituire la licenza con una valida.
Per eseguire la sostituzione della licenza, utilizza il comando seguente:
gcloud compute disks update DISK_NAME
--replace-license=projects/rhel-cloud/global/licenses/rhel-7-server,projects/rhel-cloud/global/licenses/rhel-8-server
--zone=DISK_ZONE
Licenze valide
Le licenze valide per RHEL, SLES, Ubuntu e Ubuntu Pro sono elencate nelle tabelle seguenti.
Informazioni sulla licenza RHEL
| Nome licenza | Codice licenza | URL licenza |
|---|---|---|
| RHEL 6 PAYG | 1000002 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-6-server |
| RHEL 7 PAYG | 1000006 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-server |
| RHEL 7 ELS | 4646774207868449156 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-els |
| RHEL 8 PAYG | 601259152637613565 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-server |
| RHEL 9 PAYG | 7883559014960410759 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-9-server |
| RHEL 6 BYOS | 4720191914037931587 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-6-byos |
| RHEL 7 BYOS | 1492188837615955530 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-byos |
| RHEL 8 BYOS | 8475125252192923229 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-byos |
| RHEL 9 BYOS | 3837518230911135854 | https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-9-byos |
| RHEL 8 per SAP PAYG | 1270685562947480748 | https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-8-sap |
| RHEL 9 per SAP PAYG | 8291906032809750558 | https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-9-sap |
| RHEL 8 per SAP BYOS | 489291035512960571 | https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-8-sap-byos |
| RHEL 9 per SAP BYOS | 6753525580035552782 | https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-9-sap-byos |
Informazioni sulla licenza SLES
| Nome licenza | Codice licenza | URL licenza |
|---|---|---|
| SLES 11 PAYG | 1000004 | https://www.googleapis.com/compute/v1/projects/suse-cloud/global/licenses/sles-11 |
| SLES 12 PAYG | 1000008 | https://www.googleapis.com/compute/v1/projects/suse-cloud/global/licenses/sles-12 |
| SLES 15 PAYG | 5422776498422280384 | https://www.googleapis.com/compute/v1/projects/suse-cloud/global/licenses/sles-15 |
| SLES 11 BYOS | 3562683225507985416 | https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-11-byos |
| SLES 12 BYOS | 5995918435054614609 | https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-12-byos |
| SLES 15 BYOS | 7429287564402499183 | https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-15-byos |
| SLES 12 per SAP PAYG | 4079932016749305610 | https://www.googleapis.com/compute/v1/projects/suse-sap-cloud/global/licenses/sles-sap-12 |
| SLES 15 per SAP PAYG | 4764125400812555962 | https://www.googleapis.com/compute/v1/projects/suse-sap-cloud/global/licenses/sles-sap-15 |
| SLES 12 per SAP BYOS | 7194268483061119118 | https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-sap-12-byos |
| SLES 15 per SAP BYOS | 6035015651111738499 | https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-sap-15-byos |
Informazioni sulle licenze Ubuntu e Ubuntu Pro
| Nome licenza | Codice licenza | URL licenza |
|---|---|---|
| Ubuntu 16.04 (Xenial Xerus) | 1000201 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1604-xenial |
| Ubuntu Pro 16.04 (Xenial Xerus) | 8045211386737108299 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-1604-lts |
| Ubuntu 18.04 LTS (Bionic Beaver) | 5926592092274602096 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1804-lts |
| Ubuntu Pro 18.04 LTS (Bionic Beaver) | 6022427724719891830 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-1804-lts |
| Ubuntu 20.04 LTS (Focal Fossa) | 2211838267635035815 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-2004-lts |
| Ubuntu Pro 20.04 LTS (Focal Fossa) | 599959289349842382 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-2004-lts |
| Ubuntu 22.04 LTS (Jammy Jellyfish) | 5511465778777431107 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-2204-lts |
| Ubuntu Pro 22.04 LTS (Jammy Jellyfish) | 2592866803419978320 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-2204-lts |
| Ubuntu 24.04 LTS (Noble Numbat) | 3242930272766215801 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-2404-lts |
| Ubuntu Pro 24.04 LTS (Noble Numbat) | 2176054482269786025 | https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-2404-lts |