ライセンスの変更と制限事項

ライセンス所有者は、特定のライセンスの有効なライセンス変更を変更できます。このガイドでは、特定のライセンスの現在有効なライセンス変更を確認する方法について要点を説明します。また、そのライセンスの変更に適用される制限についても概説しています。

始める前に

  • まだ設定していない場合は、認証を設定します。認証とは、 Trusted Cloud by S3NS サービスと API にアクセスするために ID を確認するプロセスです。ローカル開発環境からコードまたはサンプルを実行するには、次のいずれかのオプションを選択して Compute Engine に対する認証を行います。

    Select the tab for how you plan to use the samples on this page:

    Console

    When you use the Trusted Cloud console to access Trusted Cloud by S3NS services and APIs, you don't need to set up authentication.

    gcloud

      1. After installing the Google Cloud CLI, sign in to the gcloud CLI with your federated identity and then initialize it by running the following command:

        gcloud init
      2. Set a default region and zone.

ライセンス情報を確認する

Cloud Shell で次のコマンドを実行します。LICENSE_URL は、調査するライセンスに置き換えます。一般的な Linux ライセンス URL のリストについては、有効なライセンスの表をご覧ください。

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

たとえば、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

出力は次のようになります。

{
  "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": ""
}

レスポンスには、次の主要なフィールドの概要が示されます。

  • removableFromDisk: true の場合、ライセンスをディスクから削除できます。false の場合、有効なライセンスに置き換えない限り、ライセンスを削除できません。
  • allowedReplacementLicenses: 有効な置き換えとして使用できるライセンスのライセンス コードのリスト。どのライセンス コードがどのライセンスに対応しているかを確認するには、有効なライセンスをご覧ください。
  • minimumRetention: ライセンスが VM に存在する必要がある最小時間。この時間が経過するまで別のライセンス変更を適用できません。

例: RHEL 7 PAYG を RHEL 8 PAYG に置き換える

RHEL 7 PAYG ライセンスを RHEL 8 PAYG ライセンスに置き換えるには、次の情報を参照して、RHEL 8 PAYG のライセンス コードとライセンス URL を確認します。

ライセンス名 ライセンス コード ライセンスの URL
RHEL 8 PAYG 601259152637613565 https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-server

RHEL 8 PAYG のライセンス コード(601259152637613565)が RHEL 7 PAYG の allowedReplacementLicenses にリストされているため、有効なライセンスの置き換えが可能であることを示しています。

ライセンスの置き換えを行うには、次のコマンドを使用します。

  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

有効なライセンス

RHEL、Ubuntu、Ubuntu Pro の有効なライセンスを次の表に示します。

RHEL ライセンス情報

ライセンス名 ライセンス コード ライセンスの URL
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 for SAP PAYG 1270685562947480748 https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-8-sap
RHEL 9 for SAP PAYG 8291906032809750558 https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-9-sap
RHEL 8 for SAP BYOS 489291035512960571 https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-8-sap-byos
RHEL 9 for SAP BYOS 6753525580035552782 https://www.googleapis.com/compute/v1/projects/rhel-sap-cloud/global/licenses/rhel-9-sap-byos

Ubuntu と Ubuntu Pro のライセンス情報

ライセンス名 ライセンス コード ライセンスの URL
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