このドキュメントでは、ネストされた仮想化に対する Compute Engine のサポートについて説明します。ネストされた仮想化では、他の VM 内で仮想マシン(VM)インスタンスを実行して、独自の仮想環境を作成できます。ネストされた仮想化をサポートするために、Compute Engine は VM に Intel VT-x 命令を追加します。これにより、VM を作成すると、その VM 上にあるハイパーバイザは追加の VM を実行できるようになります。
Compute Engine VM は、Google のセキュリティ強化された KVM ベースのハイパーバイザを備えた物理ホストで実行されます。ネストされた仮想化では、物理ホストとそのハイパーバイザはレベル 0(L0)環境にあります。L0 環境には複数のレベル 1(L1)VM をホストできます。各 L1 VM には、レベル 2(L2)VM のインストールに使用するもう 1 つのハイパーバイザがあります。図 1 に、物理ホスト、L1 VM、L2 VM の関係を示します。
図 1. L0 物理ホスト、L1 VM、L2 VM の関係。
ユースケース
ネストされた仮想化の使用としては、次のようなシナリオが考えられます。
Compute Engine で実行できない VM があります。たとえば、オンプレミス ワークロードの障害復旧ソリューションが、Compute Engine VM にフェイルオーバーする VM 上で実行されているとします。ネストされた仮想化を実行すると、Compute Engine への VM の移植にかかる時間を短縮できます。
さまざまなバージョンの OS でソフトウェア パッケージの新しいバージョンのテストと検証を行うソフトウェア検証フレームワークがあります。ネストされた仮想化を使用すると、Compute Engine イメージのライブラリを変換して管理する必要がなくなります。
パフォーマンスに関する注意事項
ハードウェア補助によるネストされた仮想化であっても、ネストされた VM で CPU バウンドのワークロードを実行すると、パフォーマンスが 10% 以上低下することがあります。また、入出力バウンドのワークロードでも 10% 以上低下する可能性があります。
制限事項
L1 VM には次の制限事項があります。
L1 VM でサポートされているハイパーバイザは Linux KVM のみです。Microsoft Hyper-V はサポートされていません。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-12-23 UTC。"],[[["Nested virtualization in Compute Engine allows running virtual machines (VMs) inside other VMs, enabling the creation of custom virtualization environments."],["Compute Engine uses a security-hardened, KVM-based hypervisor at level 0 (L0), which hosts level 1 (L1) VMs, each capable of running another hypervisor for level 2 (L2) VMs."],["Nested virtualization can be useful for running VMs incompatible with Compute Engine or for testing software on various operating systems without managing numerous Compute Engine images."],["Nested VMs may experience a performance decrease of 10% or more, especially in CPU or input/output-bound workloads, and certain VM types are not compatible."],["Enabling nested virtualization involves checking constraints, creating an L1 VM with the feature enabled, and then creating the nested L2 VM."]]],[]]