您可以透過 Red Hat Cloud Access 訂閱方案中的映像檔,在 Compute Engine 上建立虛擬機器 (VM) 執行個體。
選擇這個選項後,您只需支付產生的基礎架構費用,授權訂閱費用則會支付給 Red Hat。 Trusted Cloud by S3NS在 Trusted Cloud by S3NS上使用 Red Hat Cloud Access 訂閱方案的 OS 映像檔時,您必須直接向 Red Hat 申請支援。如要申請支援,請登入 Red Hat 客戶入口網站,然後開立支援單。
建立使用 RHEL OS 映像檔的 VM 時,您可以使用 Trusted Cloud 控制台提供的單一登入 (SSO) 選項,存取 Red Hat 知識庫。
事前準備
-
如果尚未設定驗證,請先完成設定。
「驗證」是指驗證身分的程序,確認您有權存取 Trusted Cloud by S3NS 服務和 API。如要從本機開發環境執行程式碼或範例,請選取下列任一選項,向 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
-
安裝 Google Cloud CLI,然後 使用同盟身分登入 gcloud CLI。 登入後,執行下列指令初始化 Google Cloud CLI:
gcloud init
- Set a default region and zone.
必要的角色
如要取得建立 VM 所需的權限,請要求管理員授予您專案的 Compute 執行個體管理員 (v1) (
roles/compute.instanceAdmin.v1
) IAM 角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和機構的存取權」。這個預先定義的角色具備建立 VM 所需的權限。如要查看確切的必要權限,請展開「必要權限」部分:
所需權限
如要建立 VM,必須具備下列權限:
-
專案的
compute.instances.create
-
如要使用自訂映像檔建立 VM:
compute.images.useReadOnly
在映像檔上 -
如要使用快照建立 VM:
compute.snapshots.useReadOnly
快照 -
如要使用執行個體範本建立 VM,請按照下列步驟操作:
compute.instanceTemplates.useReadOnly
在執行個體範本上 -
如要將舊版網路指派給 VM,請按照下列步驟操作:
compute.networks.use
專案 -
如要為 VM 指定靜態 IP 位址:
專案的
compute.addresses.use
-
使用舊版網路時,如要將外部 IP 位址指派給 VM,請在專案中設定
compute.networks.useExternalIp
。 -
如要為 VM 指定子網路,請在專案或所選子網路上授予
compute.subnetworks.use
權限。 -
使用虛擬私有雲網路時,如要將外部 IP 位址指派給 VM,請在專案或所選子網路上取得
compute.subnetworks.useExternalIp
權限。 -
如要為 VM 設定 VM 執行個體中繼資料,請在專案中執行下列指令:
compute.instances.setMetadata
-
如要為 VM 設定標記,請按照下列步驟操作:
compute.instances.setTags
在 VM 上 -
如要為 VM 設定標籤,請按照下列步驟操作:
compute.instances.setLabels
在 VM 上 -
如要設定 VM 使用的服務帳戶:
compute.instances.setServiceAccount
在 VM 上 -
為 VM 建立新磁碟:
compute.disks.create
專案的 -
如要以唯讀或讀寫模式附加現有磁碟:
磁碟的
compute.disks.use
-
如要以唯讀模式連接現有磁碟:
compute.disks.useReadOnly
磁碟的
使用 RHEL BYOS 映像檔建立 VM
總而言之,如要在 Trusted Cloud by S3NS上使用 Red Hat Cloud Access 訂閱,請完成下列步驟:
- 授予 Trusted Cloud by S3NS Red Hat Cloud Access 訂閱中的映像檔存取權。
- 使用 Trusted Cloud 控制台或 Google Cloud CLI 建立 VM。
授予 Google 群組 RHEL 訂閱項目存取權
如要授予 Google 群組存取 RHEL BYOS 映像檔的權限,請完成下列步驟:
- 選取現有或建立 Google 群組。
- 將要使用這些 BYOS 映像檔的所有使用者和服務帳戶新增至 Google 群組。請參閱「將使用者加入群組」。
- 登入 Red Hat 客戶入口網站,然後完成下列步驟:
- 在導覽選單中,選取「Cloud Access」。
- 按一下「啟用新的供應商」。
- 在「Select a Red Hat Certified Cloud and Service Provider」(選取 Red Hat 認證的雲端和服務供應商) 選單中,選取「Google Compute Engine」。
- 輸入 Google Compute Engine ID。這是您在步驟 1 中建立的 Google 群組電子郵件地址。
- 選取要啟用的產品。
- 按一下「啟用」。
帳戶連結至 Red Hat 客戶入口網站可能需要 3 到 4 小時。 Trusted Cloud by S3NS
建立 VM
授予 Google 群組存取 RHEL 訂閱的權限後,您就能在 Compute Engine 的
rhel-byos-cloud
專案中使用 RHEL BYOS 映像檔。接著,您可以使用 RHEL BYOS 映像檔建立 VM。主控台
前往 Trusted Cloud 控制台的「Create an instance」(建立執行個體) 頁面。
指定 VM 的「Name」(名稱)。詳情請參閱資源命名慣例。
選用:變更這個 VM 的「Zone」(區域)。如果選取「Any」(任何),Google 會根據機器類型和可用性,自動為您選擇區域。
選取 VM 的「Machine configuration」(機器設定)。
在「Boot disk」(開機磁碟) 區段,按一下 [Change] (變更)。
在「Public images」(公開映像檔) 分頁中,完成下列步驟:
- 在「作業系統」下拉式選單中,選取下列其中一個選項:
- Red Hat Enterprise Linux
- Red Hat Enterprise Linux for SAP
- 在「版本類型」下拉式選單中,選取要使用的映像檔。
- 在「授權類型」部分中,選取「自備訂閱或授權 (BYOS/BYOL)」。
- 指定開機磁碟類型。
- 指定開機磁碟大小。
- 選用:如需進階設定選項,請按一下「顯示進階設定」。
- 如要確認開機磁碟選項,請按一下「Select」(選取)。
- 在「作業系統」下拉式選單中,選取下列其中一個選項:
視需要進一步自訂 VM。
如要建立並啟動 VM,請按一下 [Create] (建立)。
gcloud
查看可用的 RHEL BYOS 映像檔清單。如要查看 RHEL BYOS 映像檔清單,請執行下列指令。
gcloud compute images list \ --project=rhel-byos-cloud \ --no-standard-images
執行
gcloud compute instances create
指令,建立具有 BYOS 映像檔的 VM。gcloud compute instances create VM_NAME \ --image-family=IMAGE_FAMILY \ --image-project=rhel-byos-cloud
更改下列內容:
VM_NAME
:新 VM 的名稱IMAGE_FAMILY
:您要使用的 RHEL BYOS 映像檔系列。例如rhel-9-byos
或rhel-9-2-sap-byos
。
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-08 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-08 (世界標準時間)。"],[[["You can use images from your Red Hat Cloud Access subscription to create virtual machine (VM) instances on Google Cloud's Compute Engine, paying Red Hat for the license and Google Cloud for infrastructure."],["To utilize a Red Hat Cloud Access subscription, you must first grant a Google Group access to your RHEL subscription via the Red Hat Customer Portal, then create a VM using either the Google Cloud console or the Google Cloud CLI."],["Creating a VM with a Red Hat Enterprise Linux (RHEL) image allows you to access the Red Hat Knowledgebase through a single-sign-on (SSO) option in the Google Cloud console."],["To create VMs, you'll need specific permissions, including the `Compute Instance Admin (v1)` role, which can be granted by your administrator."],["The RHEL BYOS images are available in the `rhel-byos-cloud` project on Compute Engine once access has been given in the Red Hat Customer Portal, and this process might take a few hours."]]],[]] -