AWSがEC2インスタンスでネスト型仮想化を導入
AWSは、KVMまたはHyper-Vを実行する仮想化EC2インスタンス内でのネストされた仮想マシンのサポートを発表し、アプリケーションエミュレーションやハードウェアシミュレーションなどのユースケースをC8i、M8i、R8iインスタンスで可能にした。
キーポイント
新機能の発表
AWSがEC2インスタンス上でのネストされた仮想化(仮想マシン内での仮想マシン実行)のサポートを発表した。
対応ハイパーバイザー
この機能はKVMまたはHyper-Vを実行する仮想化EC2インスタンスで利用可能である。
主なユースケース
アプリケーションエミュレーションやハードウェアシミュレーションなどの用途が想定されている。
対応インスタンスタイプ
C8i、M8i、R8iインスタンスシリーズでサポートされている。
影響分析・編集コメントを表示
影響分析
この発表は、クラウド環境での開発・テストワークフローの柔軟性を大幅に向上させる。特にレガシーアプリケーションの移行や特殊なハードウェア環境のシミュレーションが必要な企業にとって実用的な価値が高い。ただし、AI/ML分野への直接的な影響は限定的であり、より広範なクラウドインフラストラクチャの進化として位置付けられる。
編集コメント
クラウドネイティブ開発の進化を示す重要な機能追加だが、AI/ML分野への直接的な革新性は限定的。開発・テスト環境の柔軟性向上という実用面での価値が主なポイント。
AWS は最近、KVM または Hyper-V を実行する仮想化された EC2 インスタンス内でネスト型仮想マシンをサポートすることを発表しました。コミュニティから長年待ち望まれていたこの新機能により、対応する C8i、M8i、R8i インスタンス上でアプリのエミュレーションやハードウェアシミュレーションといったユースケースが可能になります。
開発者はこの機能を使用して、モバイルアプリのエミュレータを実行したり、車載自動車ハードウェアをシミュレートしたり、Windows ワークステーション上で Windows Subsystem for Linux (WSL) を利用したりできます。ドキュメントによると、Nitro System は Intel VT-x などのプロセッサ機能をインスタンスに公開し、その中で仮想マシンを実行できるようにします。
ネスト型仮想化のアーキテクチャには 3 つの層があります:物理的な AWS インフラストラクチャと Nitro ハイパーバイザー (L0)、独自のハイパーバイザーを実行する EC2 インスタンス (L1)、そしてそのインスタンス内で実行される仮想マシン (L2) です。新機能は C8i、M8i、R8i インスタンス上で KVM と Hyper-V をサポートします。AWS のエンジニアリングディレクターである Ioannis Aslanidis は次のように述べています。
この機能により、開発者や企業は、幅広い標準的な仮想 EC2 インスタンスタイプを使用して、柔軟なネスト型環境を構築できるようになります。
この機能はコミュニティからの長期的な要望であり、ある開発者が 2018 年に Reddit で次のように投稿しています。
Azure では、私の仮想マシン内で KVM を実行できます。これはネスト型仮想化と呼ばれる技術です。Amazon は EC2 上で HyperV/VMware/KVM を許可する方面で進展がありましたか?
新機能に関する多くのコメントは、その感情を反映しています。Meta のプロダクションエンジニアである Rolf Neugebauer 氏は「なぜもっと早くしなかったのか?」と書き、Igor Sfiligoi 氏は「これまで本当に不可能だったのですか?」と付け加えています。人気の高い Hacker News のスレッドでは、Google のソフトウェアエンジニアである Michael Boulos 氏が以下のように述べています。
vindicated された気分です :)。私たちは数年前から GCE(Google Compute Engine)上でネスト型仮想化をうまく動作させるために、多くの顧客と共に多大な努力を払ってきましたが、AWS がようやくその方向に舵を切ったと聞いて嬉しく思います。人々に「別のことをすればいい」と言ったり、「おそらく自然な別解がある」と言ったりすることもできますが、時にはピークパフォーマンスのいくらかを犠牲にしてでも、運用と制御の一貫性を得たいと思うものです。
Render の創設者兼 CEO である Anurag Goel 氏は以下のように付け加えています。
これは大きな出来事です。なぜなら、高価な AWS ベアメタルインスタンスの代わりに、AWS VM(仮想マシン)内で Firecracker やその他のマイクロ VM を実行できるようになったからです。
AWS のシニアソリューションアーキテクトである Guillermo Ruiz 氏は、インスタンス内で Firecracker マイクロ VM を実行するテストを行い、今後のベンチマーク結果を約束しています。Ruiz 氏は以下のように述べています。
分離性や Lambda スタイルのランタイムに興味がある方、あるいはパフォーマンスと密度の観点からマイクロ VM とコンテナを比較しようとしている方にとって、興味深いアプローチです。
過去には、EC2 でネスト型仮想化を実行する唯一の選択肢は、ハイパーバイザーを持たない物理サーバーであるベアメタルインスタンスを使用することでした。多くの開発者は、回避策として EC2 Mac インスタンス(最も小さく安価なベアメタルオプション)を利用していました。ネスト型仮想化の有効化は、起動時に設定する API オプションとなりました。例えば以下のようになります:
aws ec2 run-instances \
--image-id ami-0abcdef1234567890 \
--instance-type r8i.4xlarge \
--cpu-options "NestedVirtualization=enabled" \
--key-name my-key-pair \
--placement "Tenancy=host"
AWS はなお、ハードウェア仮想化を必要とするワークロードを実行する顧客、パフォーマンスに敏感な顧客、または低レイテンシを必要とする顧客に対しては、ネスト型仮想化ではなくベアメタルインスタンスの継続使用を推奨しています。
ネスト型仮想化は、C8i、M8i、R8i インスタンスタイプにおいて全リージョンで利用可能です。Graviton インスタンスはまだサポートされていません。KVM と Hyper-V が唯一サポートされている L1 ハイパーバイザーです。
About the Author
Renato Losio
Renato はクラウドアーキテクト、技術リーダー、クラウドサービススペシャリストとして豊富な経験を持っています。現在、彼はベルリンに住み、リモートでシニアクラウドアーキテクトとして勤務しています。彼の主な関心領域はクラウドサービスとリレーショナルデータベースです。彼は InfoQ の編集者であり、認定された AWS Data Hero です。LinkedIn で彼に連絡することができます。
Show moreShow less
原文を表示
AWS recently announced support for nested virtual machines within virtualized EC2 instances running KVM or Hyper-V. A long-awaited feature by the community, the new option enables use cases such as app emulation and hardware simulation on supported C8i, M8i, and R8i instances.
Developers can use this feature to run mobile app emulators, simulate in-car automotive hardware, and use Windows Subsystem for Linux (WSL) on Windows workstations. According to the documentation, the Nitro System exposes processor features such as Intel VT-x to the instance, allowing it to run virtual machines inside it.
The architecture for nested virtualization has three layers: the physical AWS infrastructure and Nitro hypervisor (L0), your EC2 instance running its own hypervisor (L1), and the virtual machines running inside that instance (L2). The new feature supports KVM and Hyper-V on C8i, M8i, and R8i instances. Ioannis Aslanidis, director of engineering at AWS, writes:
This capability empowers developers and enterprises to build flexible, nested environments with a wide range of standard virtual EC2 instance types.
The feature has been a long-term requirement from the community, with a developer writing in 2018 on Reddit:
In Azure, I can run KVM in my virtual machine, a technique known as nested virtualization. Has Amazon made any progress in allowing HyperV/VMware/KVM in EC2?
Most comments on the new feature echo that sentiment: Rolf Neugebauer, production engineer at Meta, writes, "What took you so long?" while Igor Sfiligoi adds: "This really was not possible until now?" In a popular Hacker News thread, Michael Boulos, software engineer at Google, writes:
I feel vindicated :). We put in a lot of effort with great customers to get nested virtualization running well on GCE years ago, and I'm glad to hear AWS is coming around. You can tell people to just do something else, there's probably a separate natural solution, etc. but sometimes you're willing to sacrifice some peak performance just have that uniformity of operations and control.
Anurag Goel, founder and CEO of Render, adds:
This is a big deal because you can now run Firecracker/other microVMs in an AWS VM instead of expensive AWS bare-metal instances.
Guillermo Ruiz, senior solution architect at AWS, tested running Firecracker microVMs inside an instance, promising future benchmarks. Ruiz writes:
Interesting angle for anyone looking at isolation, Lambda-style runtimes, or just comparing microVMs vs containers from a performance and density perspective.
In the past, the only option to run nested virtualization on EC2 was to use bare metal instances, physical servers without a hypervisor. Many developers resorted to EC2 Mac instances, the smallest and cheapest bare metal option, as a workaround. Enabling nested virtualization is now an API option set at launch, for example:
aws ec2 run-instances \
--image-id ami-0abcdef1234567890 \
--instance-type r8i.4xlarge \
--cpu-options "NestedVirtualization=enabled" \
--key-name my-key-pair \
--placement "Tenancy=host"
AWS still suggests that customers running workloads that require hardware virtualization, are sensitive to performance, or require low latency should continue using bare-metal instances rather than nested virtualization.
Nested virtualization is available in all regions on C8i, M8i, and R8i instance types; Graviton instances are not currently supported. KVM and Hyper-V are the only supported L1 hypervisors.
About the Author
Renato Losio
Renato has extensive experience as a cloud architect, tech lead, and cloud services specialist. Currently, he lives in Berlin and works remotely as a principal cloud architect. His primary areas of interest include cloud services and relational databases. He is an editor at InfoQ and a recognized AWS Data Hero. You can connect with him on LinkedIn.
Show moreShow less
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み