Hanya lisensi OS Linux Premium tertentu yang memenuhi syarat untuk ditambahkan, dihapus, atau diganti. Perubahan lisensi didukung untuk Red Hat Enterprise Linux (RHEL), RHEL untuk SAP, SUSE Linux Enterprise Server (SLES), SLES untuk SAP, Ubuntu, dan Ubuntu Pro untuk kasus penggunaan berikut:
- Beralih antara model penagihan BYOS dan PAYG untuk RHEL, RHEL untuk SAP, SLES, dan SLES untuk SAP
- Upgrade langsung dari Ubuntu ke Ubuntu Pro
- Menambahkan atau menghapus lisensi add-on RHEL ELS
Pemilik lisensi dapat mengubah perubahan lisensi yang valid untuk lisensi tertentu. Sebelum Anda mengubah lisensi, pastikan perubahan lisensi target valid. Panduan ini menguraikan cara menemukan perubahan lisensi valid saat ini untuk lisensi tertentu. Bagian ini juga menguraikan batasan apa pun yang berlaku untuk mengubah lisensi tersebut.
Sebelum memulai
-
Jika Anda belum melakukannya, siapkan autentikasi.
Autentikasi memverifikasi identitas Anda untuk mengakses Google Cloud layanan dan API. Untuk menjalankan
kode atau sampel dari lingkungan pengembangan lokal, Anda dapat melakukan autentikasi ke
Compute Engine dengan memilih salah satu opsi berikut:
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
-
Menginstal Google Cloud CLI. Setelah penginstalan, lakukan inisialisasi Google Cloud CLI dengan menjalankan perintah berikut:
gcloud initJika Anda menggunakan penyedia identitas (IdP) eksternal, Anda harus login ke gcloud CLI dengan identitas gabungan Anda terlebih dahulu.
- Set a default region and zone.
Meninjau informasi lisensi
Di Cloud Shell, jalankan perintah berikut. Ganti LICENSE_URL dengan lisensi yang ingin Anda selidiki. Untuk mengetahui daftar URL lisensi Linux umum, lihat tabel Lisensi yang valid.
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" LICENSE_URL
Misalnya, untuk memeriksa Lisensi PAYG RHEL 7:
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
Outputnya mirip dengan hal berikut ini:
{ "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": "" }Respons menguraikan kolom utama berikut:
removableFromDisk: jikatrue, lisensi dapat dihapus dari disk. Jikafalse, lisensi tidak dapat dihapus tanpa menggantinya dengan lisensi yang valid.allowedReplacementLicenses: ini adalah daftar kode lisensi untuk lisensi yang dapat berfungsi sebagai pengganti yang valid. Untuk mengetahui kode lisensi mana yang sesuai dengan lisensi mana, lihat lisensi yang valid.minimumRetention: jumlah waktu minimum yang diperlukan agar lisensi ada di VM sebelum perubahan lisensi lain dapat diterapkan.
Contoh: Mengganti RHEL 7 PAYG dengan RHEL 8 PAYG
Untuk mengganti lisensi PAYG RHEL 7 dengan lisensi PAYG RHEL 8, gunakan informasi berikut untuk menemukan kode lisensi dan URL lisensi untuk PAYG RHEL 8:
Nama Lisensi Kode Lisensi URL lisensi RHEL 8 PAYG 601259152637613565 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-serverKarena kode lisensi untuk RHEL 8 PAYG (601259152637613565) tercantum di bagian
allowedReplacementLicensesuntuk RHEL 7 PAYG, hal ini menunjukkan bahwa penggantian lisensi yang valid dapat dilakukan.Untuk melakukan penggantian lisensi, gunakan perintah berikut:
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_ZONELisensi yang valid
Lisensi yang valid untuk RHEL, SLES, Ubuntu, dan Ubuntu Pro tercantum dalam tabel berikut.
Informasi lisensi RHEL
Nama Lisensi Kode Lisensi URL lisensi RHEL 6 PAYG 1000002 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-6-serverRHEL 7 PAYG 1000006 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-serverRHEL 7 ELS 4646774207868449156 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-elsRHEL 8 PAYG 601259152637613565 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-serverRHEL 9 PAYG 7883559014960410759 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-9-serverRHEL 6 BYOS 4720191914037931587 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-6-byosRHEL 7 BYOS 1492188837615955530 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-7-byosRHEL 8 BYOS 8475125252192923229 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-byosRHEL 9 BYOS 3837518230911135854 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-9-byosRHEL 8 untuk SAP PAYG 1270685562947480748 https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-8-sapRHEL 9 untuk SAP PAYG 8291906032809750558 https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-9-sapRHEL 8 untuk SAP BYOS 489291035512960571 https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-8-sap-byosRHEL 9 untuk SAP BYOS 6753525580035552782 https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-9-sap-byosInformasi lisensi SLES
Nama Lisensi Kode Lisensi URL lisensi 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 untuk SAP PAYG 4079932016749305610 https://www.googleapis.com/compute/v1/projects/suse-sap-cloud/global/licenses/sles-sap-12 SLES 15 untuk SAP PAYG 4764125400812555962 https://www.googleapis.com/compute/v1/projects/suse-sap-cloud/global/licenses/sles-sap-15 SLES 12 untuk SAP BYOS 7194268483061119118 https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-sap-12-byos SLES 15 untuk SAP BYOS 6035015651111738499 https://www.googleapis.com/compute/v1/projects/suse-byos-cloud/global/licenses/sles-sap-15-byos Informasi lisensi Ubuntu dan Ubuntu Pro
Nama Lisensi Kode Lisensi URL lisensi Ubuntu 16.04 (Xenial Xerus) 1000201 https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1604-xenialUbuntu Pro 16.04 (Xenial Xerus) 8045211386737108299 https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-1604-ltsUbuntu 18.04 LTS (Bionic Beaver) 5926592092274602096 https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1804-ltsUbuntu Pro 18.04 LTS (Bionic Beaver) 6022427724719891830 https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-1804-ltsUbuntu 20.04 LTS (Focal Fossa) 2211838267635035815 https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-2004-ltsUbuntu Pro 20.04 LTS (Focal Fossa) 599959289349842382 https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-2004-ltsUbuntu 22.04 LTS (Jammy Jellyfish) 5511465778777431107 https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-2204-ltsUbuntu Pro 22.04 LTS (Jammy Jellyfish) 2592866803419978320 https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-2204-ltsUbuntu 24.04 LTS (Noble Numbat) 3242930272766215801 https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-2404-ltsUbuntu Pro 24.04 LTS (Noble Numbat) 2176054482269786025 https://www.googleapis.com/compute/v1/projects/ubuntu-os-pro-cloud/global/licenses/ubuntu-pro-2404-ltsKecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-10-19 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-10-19 UTC."],[],[]] -