Google Distributed Cloud 的 VM Runtime 是重要元件,可讓您在 Bare Metal 上安裝 Google Distributed Cloud (僅限軟體),並執行以虛擬機器為基礎的工作負載。
什麼是 GDC 上的 VM Runtime?
GDC 的 VM Runtime 是 Google Distributed Cloud 的一部分,可讓您在 Kubernetes 之上執行 VM,做法與執行容器相同。透過 GDC 上的 VM 執行階段,您可以在開發及執行新的容器式應用程式時,同時執行現有的 VM 型工作負載。GDC 上的 VM Runtime 就像其他虛擬化環境中的管理程序。
您可以使用 GDC 上的 VM Runtime 查看及管理 VM 狀態,並收集稽核或主控台記錄。VM Runtime on GDC 的運作方式,與其他虛擬化環境中使用的管理控制台工具類似。
您不必強制將現有的 VM 工作負載現代化或升級,才能使用 VM Runtime on GDC。VM 的運作方式與其他虛擬化環境相同,但可為叢集中的應用程式提供單一工作流程和程序,準備就緒後,您可以將這些 VM 工作負載遷移至容器,並繼續使用相同的 Google Kubernetes Engine (GKE) Enterprise 版管理工具。
優點
GDC 上的 VM 執行階段具備下列優勢:
能夠以程式輔助方式使用 VM 資源,就像使用容器一樣。
有效運用容器和 VM 的資源。
統一管理及運作 VM 和容器。
統一控管新容器化應用程式和舊版 VM 型應用程式之間的流量,並清楚掌握相關資訊。
簡化遷移至雲端或容器化應用程式的體驗。
透過 GDC 的 VM Runtime,您可以在裸機叢集上移轉 VM 或建立新的 VM。
GDC 的 VM Runtime 與 KubeVirt 的差異
GDC 上的 VM Runtime 是以 KubeVirt 開放原始碼專案為基礎。Kubevirt 專為 Kubernetes 而建,並遵循宣告式 API 模型,使用 Kubernetes 資源模型、自訂資源定義或運算符。GDC 的 VM Runtime 會將 Kubevirt 整合到 Google Distributed Cloud 軟體專屬安裝作業中,提供一致的應用程式管理方式。本節將列出 VM Runtime on GDC 的部分主要功能,這些功能在 KubeVirt 中無法使用。
生命週期
VM Runtime on GDC 充分運用 GKE Enterprise 的強大功能,並與 GKE Enterprise 平台完全整合。您可以使用 CLI 指令、透過 API 或使用 Google Cloud 控制台,在 GDC 上安裝、升級及解除安裝 VM Runtime。搭配相容的儲存空間使用時,GKE Enterprise 叢集升級作業會包含主機間的 VM 工作負載即時遷移 (搶先版),盡量減少 VM 工作負載中斷的可能性。
雲端支援的管理體驗
GDC 上的 VM 執行階段可為內部部署安裝提供類似雲端的體驗。這項體驗包含下列新的雲端式基本元素:
物件,管理員可以建立具有特定 CPU 和記憶體設定的預先定義 VM 類型。VirtualMachineType
GDC 的 VM Runtime 擴充了 KubeVirt 的預設 pod-network 產品,提供更適合用於實際工作環境 VM 工作負載的網路選項。VM Runtime on GDC 會擴充現有的網路堆疊,該堆疊是以容器網路介面 (CNI) 架構為基礎。GDC 的 VM 執行階段會新增 Network 物件,在 Kubernetes 中啟用類似虛擬交換器的功能。Kubernetes 提供網路外掛程式,但這些外掛程式需要自行安裝、管理生命週期。透過 GDC 上的 VM 執行階段,VM 可以與多個第 2 層網路介面互動,包括支援 VLAN 標記、外部 DHCP 等。GDC 上的 VM 執行階段也導入了介面物件,即使 VM 重新啟動、遷移或重新建立,IP 和 MAC 位址仍可保持不變。新版網路堆疊也與 NetworkPolicy 整合,因此您可以使用 Kubernetes 基本元素,控制 VM 之間的第 4 層流量。
觀測能力
GDC 上的 VM Runtime 會自動支援Google Cloud 控制台中的 VM 可觀測性。除了 GKE 叢集和 GDC VM Runtime 記錄檔,VM 序列埠記錄檔也會自動串流至 Cloud Logging。您可以在記錄檔探索工具中查看 VM 記錄檔和容器記錄檔。您可以在Google Cloud 控制台中查看 VM 的 CPU、記憶體、磁碟和網路指標。您也可以使用熟悉的 Google Cloud 服務,實作資訊主頁、快訊和通知整合功能。
管理
您可以使用指令列、API 和 Google Cloud 控制台,存取 GDC VM 執行階段的大部分功能。這種彈性做法支援多種開發人員和作業風格。運用 GKE Enterprise 堆疊的強大功能,Config Sync 和 Policy Controller 也可用來實作 GitOps 方法和精細政策。最後,KubeVirt 工具 (例如 virtctl) 也已擴充,可支援 GDC 上的額外 VM Runtime 功能。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-31 (世界標準時間)。"],[],[],null,["VM Runtime on Google Distributed Cloud is the key component for running virtual machine-based\nworkloads in installations of Google Distributed Cloud (software only) on bare\nmetal.\n\nWhat is VM Runtime on GDC?\n\nVM Runtime on GDC is a part of Google Distributed Cloud that lets you\nrun VMs on top of Kubernetes in the same way that you run containers. With\nVM Runtime on GDC, you can run existing VM-based workloads as you\nalso develop and run new container-based applications.\nVM Runtime on GDC is like the hypervisor in another virtualized\nenvironment.\n\nVM Runtime on GDC lets you view and manage the state of VMs and\ngather audit or console logs. VM Runtime on GDC acts like management\nconsole tools that are used in other virtualized environments.\n\nYou aren't forced to modernize or upgrade existing VM-based workloads to use\nVM Runtime on GDC. VMs run like they do in other virtualized\nenvironments, but benefit from a single set of workflows and processes for your\napplications in a cluster. When you're ready, you can migrate these VM-based\nworkloads to containers and continue using the same management tools.\n\nBenefits\n\nThe VM Runtime on GDC has the following benefits:\n\n- Ability to use VM resources programmatically, like you use containers.\n- Efficient use of resources across containers and VMs.\n- Unified management and operation for VMs and containers.\n- Unified visibility and control for traffic between new containerized applications and legacy VM-based apps.\n- A simplified migration experience to cloud or containerized apps.\n\nThe VM Runtime on GDC helps you migrate your VMs, or build new ones,\non top of your bare metal cluster.\n\nHow VM Runtime on GDC differs from KubeVirt\n\nVM Runtime on GDC builds on the [KubeVirt open source\nproject](https://kubevirt.io/). Kubevirt is built specifically for Kubernetes,\nand follows the declarative API model to use the Kubernetes Resource Model,\ncustom resource definitions, or operators. VM Runtime on GDC\nintegrates Kubevirt into your Google Distributed Cloud software-only installation\nto give a consistent way to manage your applications. This section outlines some\nof the key capabilities of VM Runtime on GDC that aren't available\nin KubeVirt.\n\nLifecycle\n\nBuilding on the power of Google Kubernetes Engine,\nVM Runtime on GDC is fully integrated with the\nGoogle Cloud. You can install, upgrade, and uninstall\nVM Runtime on GDC with a CLI command, through the API, or by using\nthe Google Cloud console. When used with compatible storage,\ncluster upgrades include *live migration* of VM workloads\n([Preview](/products#product-launch-stages)) between hosts to minimize\npotential VM workload disruption.\n\nCloud-backed management experience\n\nVM Runtime on GDC provides a cloud-like experience for your on-premises\ninstallation. This experience includes the following new cloud-like primitives:\n\n- `VirtualMachineType` object lets administrators create\n [predefined VM types](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/compute-configurations)\n with specific CPU and memory configurations.\n\n- `VirtualMachineDisk` and `StorageProfile` objects add\n [support for multiple disks](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/create-manage-disks) and\n [centralized management of `StorageClass` properties](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/storage-classes).\n\n- `Network` object enables\n [virtual switch-like capabilities](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/create-networks)\n in Kubernetes.\n\nStorage\n\nVM Runtime on GDC automatically generates a storage profile object,\n`StorageProfile`, for each `StorageClass` in a cluster. This new profile object\nlets you\n[configure `StorageClass` properties for VMs](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/storage-classes#configure_storage_profiles),\nincluding `accessMode` and `volumeMode`, from a single location.\n\nYou can attach multiple disks to a VM. You can attach an existing disk or you\ncan create and attach new disks. The new `VirtualMachineDisk` custom resource\nlets you create blank disks or disks from existing images using the bundled\nContainerized Data Importer (CDI). CDI even lets you pull\n[images from Cloud Storage secured with credentials](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/create-storage-credentials).\n\nNetworking\n\nVM Runtime on GDC expands on the default `pod-network` offering of\nKubeVirt to provide\n[networking options more suitable for production VM workloads](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/create-networks#create_and_use_virtual_networks).\nVM Runtime on GDC extends the existing network stack that's based on\nContainer Network Interface (CNI) framework. VM Runtime on GDC adds\na `Network` object that enables virtual switch-like capabilities in Kubernetes.\nWhile network plugins are available for Kubernetes, they require their own\ninstallation, lifecycle, and management. With VM Runtime on GDC, out\nof the box VMs can interact with multiple Layer 2 network interfaces, including\nsupport for VLAN tags, external DHCP, and more. VM Runtime on GDC\nalso introduces the interfaces object, which enables both IP and MAC address\nstickiness even if VMs are restarted, migrated, or recreated. The new network\nstack also integrates with `NetworkPolicy` so you can use Kubernetes primitives\nto control Layer 4 traffic between VMs.\n\nObservability\n\nVM Runtime on GDC automatically supports VM observability in the\nGoogle Cloud console. In addition to the GKE cluster and\nVM Runtime on GDC logging,\n[VM serial console](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/view-console-logs) logs are\nautomatically streamed to Cloud Logging. Your VM logs can be viewed in the\n[Logs Explorer](/logging/docs/view/logs-explorer-interface) along with\ncontainer logs. You can see VM CPU, memory, disk, and network metrics in the\nGoogle Cloud console. You can also implement dashboards, alerts, and integration\nwith notifications using familiar Google Cloud services.\n\nManagement\n\nMost VM Runtime on GDC capabilities are available from the command\nline, APIs, and Google Cloud console. This flexible approach supports multiple\ndeveloper and operational styles. The Google Cloud produccts Config Sync\nand Policy Controller can also be used to implement both GitOps\nmethodology and granular policies. Finally, KubeVirt tools, such as `virtctl`,\nhave also been extended to support the additional VM Runtime on GDC\ncapabilities.\n\nGPU Support\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nVM Runtime on GDC lets you\n[enable supported NVIDIA GPU cards](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/use-gpu)\nin your VMs, enabling machine learning and other specialized workloads.\n\nGet started\n\nTo start using VM Runtime on GDC, see the following documents:\n\n- [Enable or disable VM Runtime on GDC](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/enable-disable)\n- [Quickstart: Create a VM](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/quickstart)\n- [Manage the power state of VMs that use VM Runtime on GDC](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/manage-power-state)\n- [View console logs for VMs that use VM Runtime on GDC](/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/view-console-logs)"]]