SlideShare a Scribd company logo
1 of 30
Download to read offline
Copyright © NTT Communications Corporation. All rights reserved.
macOSの仮想化技術について
~ virtualization-rs Rust bindings for Virtualization.framework ~
Copyright © NTT Communications Corporation. All rights reserved.
■ macOS 11 Big Surから新しくLinux VM作成の⾼レベルAPI
Virtualization.frameworkが登場
• Objective-C、SwiftのAPIが提供されている
■ あれ︖ Rust APIがないなぁ︖(唐突)
👉 Rust bindingsの virtualization-rsを作ってみた
■ 本発表の内容
• まず仮想化技術についての基本的な背景、macOS の仮想化技術の
変遷や仮想化技術を⽀えるツールについて
• 次にvirtualization-rsのご紹介とLinux boot DEMO
• 最後に従来の仮想化技術との性能⽐較
概要
2
Copyright © NTT Communications Corporation. All rights reserved.
1. Who am I ?
2. 仮想化技術の背景
3. macOSの仮想化技術
4. Virtualization.framework
5. virtualization-rs
6. 各種仮想化技術のベンチマーク測定
7. まとめ
Agenda
3
Copyright © NTT Communications Corporation. All rights reserved.
■ ⽒名︓鈴ヶ嶺 聡哲
■ 2020年4⽉ NTT Com⼊社
• イノベーションセンターテクノロジー部⾨
AIインフラ チーム
■ 興味のある技術分野
• クラウドに関すること
• 機械学習基盤
• 仮想化技術
• Rust
■ NTT Comでの活動
• 業務
パブリック・ハイブリッドクラウドの技術検証
機械学習基盤の技術検証
• AWS GameDay Online APN Cup.vol1 結果発表︕ | Amazon Web Services
3位⼊賞
• NTT Com Qiita アドベントカレンダー 2020
Rustで実装するNetflow Collector
Who am I ?
4
@suzu_3_14159265
Copyright © NTT Communications Corporation. All rights reserved.
仮想化技術の背景
5
Copyright © NTT Communications Corporation. All rights reserved.
■ Formal requirements for virtualizable third generation
architectures.
• 1974年に提唱された仮想化を効率的に実現するための要件
VMM(仮想マシンモニタ)の3つの特性
1. 等価性(Equivalence)
a. 元のマシン上で直接実⾏された場合と同じ動作をする
2. 効率性(Efficiency)
a. 統計的に多くの処理をVMMソフトウェアの介⼊なしに実⾏可能であること
3. 資源管理(Resource control)
a. リソースを完全に制御可能であること
i. 明⽰的に割り当てられていないリソースにはアクセス不可能
ii. 既に割り当てられているリソースの制御を取り戻すことが可能であること
PopekとGoldbergの仮想化要件
6
Popek, Gerald J., and Robert P. Goldberg. "Formal requirements for virtualizable third generation
architectures." Communications of the ACM 17.7 (1974): 412-421.
Copyright © NTT Communications Corporation. All rights reserved.
命令の分類
1. 特権命令(privileged instruction)
a. プロセッサがユーザーモードの場合にトラップされる命令
2. センシティブ命令(sensitive instruction)
a. 制御センシティブ命令(control sensitive instruction)
i. システム資源に対する変更命令
b. 動作センシティブ命令(behavior sensitive instruction)
i. 資源の構成に依存する命令
■ この論⽂でもっとも重要な定理
• センシティブ命令が特権命令のサブセットであればVMMを構築可能
※論⽂では、計算モデルによって証明しているがここでは割愛
PopekとGoldbergの仮想化要件
7
特権命令
センシティブ命令
全ての命令
Copyright © NTT Communications Corporation. All rights reserved.
■ しかし…当時のx86はその要件を満たしていない…
• Analysis of the Intel Pentium's ability to support a secure virtual machine
monitor.
全ての命令
PopekとGoldbergの仮想化要件
8
Robin, John S., and Cynthia E. Irvine. Analysis of the Intel Pentium's ability to support a secure virtual
machine monitor. NAVAL POSTGRADUATE SCHOOL MONTEREY CA DEPT OF COMPUTER SCIENCE,
2000.
特権命令
センシティブ命令
VMMを構築可能にする仕組み
● Binary Translation
● 準仮想化
● Intel VT-x、AMD-V
トラップできない
センシティブ命令が存在する
x86
リングプロテクション
Ring0
Ring1
Ring2
Ring3
Copyright © NTT Communications Corporation. All rights reserved.
■ VMware、Virtualboxなどで⽤いられている技術
■ 問題ない命令はそのまま実⾏するが、センシティブ命令をト
ラップして動的に書き換えて実⾏する
• 動的な命令の置き換え
• OS側に特別変更は不要
Binary Translation
9
OS
VMM
hardware
センシティブ命令
そのまま
実⾏
動的
変換
問題ない命令
Copyright © NTT Communications Corporation. All rights reserved.
■ Xenで⽤いられている⼿法
■ ハイパーバイザ向けに書き換えた専⽤のゲストOSが必要
• OSの変更コストがある
■ ハードウェアを使うためには、ハイパーバイザコールを発⾏
し、処理を依頼する
• 静的な命令の置き換え
準仮想化
10
プロセス
ゲストOS(準仮想化)
システムコール
Xen
Ring3
Ring1
Ring0
Ring2
ハイパーバイザコール
Copyright © NTT Communications Corporation. All rights reserved.
■ x86を仮想化可能なアーキテクチャにするための拡張技術
• root、non-root の2つのモードがある
• 各モードでリングを割り当てることが可能なため、OSの変更が不要
• non-root modeでセンシティブな命令を実⾏するとroot modeにトラップさ
れる
• VM Exitする命令をVMCSというconfigによって制御可能
Intel VT-x
11
Ring0
Ring1
Ring2
Ring3
Ring0
Ring1
Ring2
Ring3
VMX
root mode
VMX
non-root mode
VM Entry
VM Exit
Copyright © NTT Communications Corporation. All rights reserved.
■ Intel VT-x、AMD-Vを使⽤したVMM
■ 2008年にQumranetが開発開始→後にRedHatに買収される
■ Linux Kernel 2.6.20に標準採⽤
• /dev/kvm のようにLinux kernel moduleとして存在している
■ KVM⾃体はエミュレーションは⾏わずQEMUと組み合わせる
■ Linux driverが資産として使⽤可能
■ AWSはKVMベースのNitro Hypervisorに移⾏する⾒込み
• “最終的にはすべての新しいインスタンスタイプが Nitro Hypervisor を使⽤するようになります”
https://aws.amazon.com/jp/ec2/faqs/
Linux KVM(Kernel-based Virtual Machine)
12
Linux KVM
VM QEMU
Copyright © NTT Communications Corporation. All rights reserved.
■ 平たく⾔えばFreeBSDにおけるLinux KVMのようなVMM
■ NetAppが2011年に開発
■ FreeBSD 8.4以降で使⽤可能
• FreeBSD 10.0でデフォルト
■ VT-x命令を発⾏するカーネルモジュールvmm.koとVM実⾏プ
ログラムの/usr/sbin/bhyveによって成り⽴つ
■ 余談︓元々BHyVeだったがシンプルなbhyveに名称が変更
• Q: Is it "bhyve", "Bhyve", "BHyVe" or BHyve?
A: The developers mercifully retired "BHyVe" and simply refer to it as "bhyve", after the
utility.
https://wiki.freebsd.org/bhyve
bhyve
13
FreeBSD kernel vmm.ko
VM bhyve
Copyright © NTT Communications Corporation. All rights reserved.
■ EL2というException Levelを追加
■ AppのEL0、OSのEL1のセンシティブ命令をトラップ可能
aarch64(ARM)の仮想化⽀援機構
14
https://developer.arm.com/documentation/102142/0100/Virtualization-Host-Extensions
Copyright © NTT Communications Corporation. All rights reserved.
macOSの仮想化技術
15
Copyright © NTT Communications Corporation. All rights reserved.
■ 3rd party kernel extensionsなしでユーザ空間でハイパーバ
イザを実現する
■ 当初は、Intel VT-xを制御するAPI
1. LifeCycle
1. hv_vm_createでVMの作成
2. hv_vm_mapでメモリマッピング
3. hv_vcpu_createで仮想CPUの作成
4. hv_vcpu_runでCPUの実⾏
5. VMEXITをトラップ
1. hv_vcpu_runで再度実⾏するか
hv_vcpu_destroyでCPUを消す
6. 全てのthreadが終了時
1. hv_vm_unmapでメモリのアンマップ
2. hv_vm_destroyでVMを消す
Hypervisor.framework
16
VM Life Cycle
Copyright © NTT Communications Corporation. All rights reserved.
■ IntelとApple SiliconでAPIは共通ではない
• 以下はVirtual Machine Management API
Hypervisor.framework
17
Intel
■ hv_vm_create
• Creates a VM instance for the current process.
■ hv_vm_destroy
• Destroys the VM instance associated with the
current process.
■ hv_capability
• Gets the value of capabilities of the system.
■ hv_vm_options_t
• Options you use when creating a virtual
machine.
■ hv_capability_t
• The type of system capabilities.
Apple Silicon
■ hv_vm_create
• Creates a VM instance for the current process.
■ hv_vm_destroy
• Destroys the VM instance associated with the
current process.
■ OS_hv_vm_config
• Creates a virtual machine configuration object.
■ hv_vm_config_t
• The type that defines a virtual-machine
configuration.
https://developer.apple.com/documentation/hypervisor/apple_silicon?language=objc
https://developer.apple.com/documentation/hypervisor/intel-based_mac?language=objc
Copyright © NTT Communications Corporation. All rights reserved.
■ 作者︓Michael Steil
• toy projectとしてHypervisor.framework上にDOS Emulatorであるhvdos
を作っていた
■ 本格的なハイパーバイザとしてmacOS向けにbhyveのポート
としてxhyveを実装
■ Big surでは現状動かない
■ 初期のDocker for Macはxhyve上のLinuxで実装されていた
• 後にhyperkitに移⾏
xhyve
18
“The Docker engine is running in an Alpine Linux distribution on top of an
xhyve Virtual Machine on Mac OS X”
https://www.docker.com/blog/docker-for-mac-windows-beta/
Copyright © NTT Communications Corporation. All rights reserved.
■ moby(Docker)がxhyveをforkして開発しているツール
• VPNKit、DataKitと連携するため
■ Big surのintel Macには対応、Apple siliconは未サポート
■ 現状、Intel Macでdockerをcom.docker.hyperkitが動作
• Apple Siliconでは別(後述)
■ minikubeはhyperkit driverをサポート
• Hypervisor.framework上でk8sを構築可能
hyperkit
19
Tiny Core Linuxを動かすコマンド例
Copyright © NTT Communications Corporation. All rights reserved.
Virtualization.framework
20
Copyright © NTT Communications Corporation. All rights reserved.
■ macOS 11 Big Surから追加されたVM作成の⾼レベルAPI
• Linux専⽤ API
vmlinuz, initrdを指定
• Intel、Apple SiliconベースMacの両対応の抽象化されたAPI
簡単にLinux VMを作成可能
• Objective-C、SwiftのAPIが提供されている
• NAT、Bridge Networkが設定可能
Virtualization.framework
21
VZVirtualMachineConfiguration
bootLoader
CPUCount
memorySize
networkDevices
socketDevices
serialPorts
storageDevices
entropyDevices
VMのConfiguration
Copyright © NTT Communications Corporation. All rights reserved.
■ 2020年12⽉16⽇に発表されたTech Preview of Docker
Desktop for M1ではhyperkitからVirtualization.framework
に移⾏している
• “Migrate from HyperKit to the Virtualization Framework.”
https://www.docker.com/blog/download-and-try-the-tech-preview-of-docker-desktop-for-m1
■ Intelでも移⾏を検討している発⾔が⾒られる
Docker Desktop for M1
22
https://github.com/docker/roadmap/issues/142#issuecomment-758508126
■ 今後Hyperkitのsupportどうなるんだろう🤔
• minikube…
Copyright © NTT Communications Corporation. All rights reserved.
virtualization-rs
23
Copyright © NTT Communications Corporation. All rights reserved.
■ Virtualization.frameworkのRust bindingを作成
• https://github.com/suzusuzu/virtualization-rs
• https://crates.io/crates/virtualization-rs
■ Rustの特徴
• modernな型システム、型推論、パターンマッチ
• ボローチェッカーによるメモリ安全性
• ゼロコスト抽象化による⾼速実⾏
• 並列実⾏時にデータ競合が発⽣しないことが保証されている
• Cargoなどの⾼機能なエコシステム
virtualization-rs
24
Linux VMを作成する今回のようなシステムソフトウェアを
書く⾔語として⾮常に適している︕
Copyright © NTT Communications Corporation. All rights reserved.
Objective-C
Rust call Objective-C
25
Rust
https://crates.io/crates/objc
■ objcを⽤いてObjective-Cのオブジェクトを操作可能
• Objective-C likeなAPI
• 有名どころでは、servoなどもこのpackageを使⽤している
• 内部的な実装
Objective-C Runtimeというdynamic libraryのC APIを使⽤している
typedef struct objc_class *Class;
void objc_msgSend(void);
Rust ⇔ Objective-C Runtime(C API) ⇔ Objective C
https://developer.apple.com/documentation/objectivec/objective-c_runtime?language=objc
Copyright © NTT Communications Corporation. All rights reserved.
■ インスタンス初期化の標準⼿法
• 元々はAWS EC2⽤に開発されたツール
• meta-data
hostname、instance-id
• user-data
user、password、ssh key
■ NoCloud
• ネットワークサービスを実⾏することなく初期
設定を可能とする仕様
• meta-dataやuser-dataをvfat、iso9660
filesystem(volume labelをcidataに設
定)を介して渡すことが可能
■ Ubuntu Cloud image
• 最新のアップデートが適⽤
• クラウドインスタンやdockerなどで使⽤
されているイメージ
• このイメージをcloud-initで初期化する
cloud-init
26
https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
NoCloudのisoの作成例
● ubuntu、rootのpasswordを設定
● hostnameをfoobarに設定
● label idにcidataを設定
Copyright © NTT Communications Corporation. All rights reserved.
DEMO
27
https://youtu.be/IRqYMykuRsQ
Copyright © NTT Communications Corporation. All rights reserved.
各種仮想化技術のベンチマーク測定
28
Copyright © NTT Communications Corporation. All rights reserved.
■ sysbenchによる性能評価
• 実⾏コマンド
sysbench cpu run --threads=4
• 30回測定
• 環境
Ubuntu 20.04
• 測定対象
virtualization-rs
docker(hyperkit)
virtualbox(binary translation)
■ 結果
• Virtualization.frameworkは従来の
hyperkitと同程度の性能であること
が⽰された
各種仮想化技術のベンチマーク測定
29
Good
Copyright © NTT Communications Corporation. All rights reserved.
■ macOS Big surからLinux VMが作成可能な⾼レベルAPIの
Virtualization.frameworkが登場
■ Virtualization.frameworkのRust bindingsを作成した
■ sysbenchによる性能評価の結果から従来のhyperkitと同程
度の性能であることが分かった
まとめ
30

More Related Content

What's hot

Hyper-V ネットワークの基本
Hyper-V ネットワークの基本Hyper-V ネットワークの基本
Hyper-V ネットワークの基本Syuichi Murashima
 
PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)
PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)
PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)NTT DATA Technology & Innovation
 
コンテナ未経験新人が学ぶコンテナ技術入門
コンテナ未経験新人が学ぶコンテナ技術入門コンテナ未経験新人が学ぶコンテナ技術入門
コンテナ未経験新人が学ぶコンテナ技術入門Kohei Tokunaga
 
分散システムについて語らせてくれ
分散システムについて語らせてくれ分散システムについて語らせてくれ
分散システムについて語らせてくれKumazaki Hiroki
 
Ansible ではじめるインフラのコード化入門
Ansible ではじめるインフラのコード化入門Ansible ではじめるインフラのコード化入門
Ansible ではじめるインフラのコード化入門Sho A
 
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】Masahito Zembutsu
 
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)NTT DATA Technology & Innovation
 
単なるキャッシュじゃないよ!?infinispanの紹介
単なるキャッシュじゃないよ!?infinispanの紹介単なるキャッシュじゃないよ!?infinispanの紹介
単なるキャッシュじゃないよ!?infinispanの紹介AdvancedTechNight
 
Dockerfile を書くためのベストプラクティス解説編
Dockerfile を書くためのベストプラクティス解説編Dockerfile を書くためのベストプラクティス解説編
Dockerfile を書くためのベストプラクティス解説編Masahito Zembutsu
 
Dockerfileを改善するためのBest Practice 2019年版
Dockerfileを改善するためのBest Practice 2019年版Dockerfileを改善するためのBest Practice 2019年版
Dockerfileを改善するためのBest Practice 2019年版Masahito Zembutsu
 
Redisの特徴と活用方法について
Redisの特徴と活用方法についてRedisの特徴と活用方法について
Redisの特徴と活用方法についてYuji Otani
 
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)NTT DATA Technology & Innovation
 
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/FallZabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/FallAtsushi Tanaka
 
Dockerセキュリティ: 今すぐ役に立つテクニックから,次世代技術まで
 Dockerセキュリティ: 今すぐ役に立つテクニックから,次世代技術まで Dockerセキュリティ: 今すぐ役に立つテクニックから,次世代技術まで
Dockerセキュリティ: 今すぐ役に立つテクニックから,次世代技術までAkihiro Suda
 
OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門VirtualTech Japan Inc.
 
DockerとPodmanの比較
DockerとPodmanの比較DockerとPodmanの比較
DockerとPodmanの比較Akihiro Suda
 
「おうちクラウド」が今熱い!
「おうちクラウド」が今熱い!「おうちクラウド」が今熱い!
「おうちクラウド」が今熱い!Hirotaka Sato
 

What's hot (20)

分散トレーシング技術について(Open tracingやjaeger)
分散トレーシング技術について(Open tracingやjaeger)分散トレーシング技術について(Open tracingやjaeger)
分散トレーシング技術について(Open tracingやjaeger)
 
Hyper-V ネットワークの基本
Hyper-V ネットワークの基本Hyper-V ネットワークの基本
Hyper-V ネットワークの基本
 
PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)
PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)
PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)
 
コンテナ未経験新人が学ぶコンテナ技術入門
コンテナ未経験新人が学ぶコンテナ技術入門コンテナ未経験新人が学ぶコンテナ技術入門
コンテナ未経験新人が学ぶコンテナ技術入門
 
分散システムについて語らせてくれ
分散システムについて語らせてくれ分散システムについて語らせてくれ
分散システムについて語らせてくれ
 
Ansible ではじめるインフラのコード化入門
Ansible ではじめるインフラのコード化入門Ansible ではじめるインフラのコード化入門
Ansible ではじめるインフラのコード化入門
 
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
 
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
 
単なるキャッシュじゃないよ!?infinispanの紹介
単なるキャッシュじゃないよ!?infinispanの紹介単なるキャッシュじゃないよ!?infinispanの紹介
単なるキャッシュじゃないよ!?infinispanの紹介
 
Dockerfile を書くためのベストプラクティス解説編
Dockerfile を書くためのベストプラクティス解説編Dockerfile を書くためのベストプラクティス解説編
Dockerfile を書くためのベストプラクティス解説編
 
Dockerfileを改善するためのBest Practice 2019年版
Dockerfileを改善するためのBest Practice 2019年版Dockerfileを改善するためのBest Practice 2019年版
Dockerfileを改善するためのBest Practice 2019年版
 
Redisの特徴と活用方法について
Redisの特徴と活用方法についてRedisの特徴と活用方法について
Redisの特徴と活用方法について
 
Docker超入門
Docker超入門Docker超入門
Docker超入門
 
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
 
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/FallZabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
 
Guide To AGPL
Guide To AGPLGuide To AGPL
Guide To AGPL
 
Dockerセキュリティ: 今すぐ役に立つテクニックから,次世代技術まで
 Dockerセキュリティ: 今すぐ役に立つテクニックから,次世代技術まで Dockerセキュリティ: 今すぐ役に立つテクニックから,次世代技術まで
Dockerセキュリティ: 今すぐ役に立つテクニックから,次世代技術まで
 
OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門
 
DockerとPodmanの比較
DockerとPodmanの比較DockerとPodmanの比較
DockerとPodmanの比較
 
「おうちクラウド」が今熱い!
「おうちクラウド」が今熱い!「おうちクラウド」が今熱い!
「おうちクラウド」が今熱い!
 

Similar to macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~

Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorAnil Madhavapeddy
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSDocker, Inc.
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0guest72e8c1
 
Virtualization-the Cloud Enabler by INSPIRE-groups
Virtualization-the Cloud Enabler by INSPIRE-groupsVirtualization-the Cloud Enabler by INSPIRE-groups
Virtualization-the Cloud Enabler by INSPIRE-groupsPraveen Hanchinal
 
Virtualization Everywhere
Virtualization EverywhereVirtualization Everywhere
Virtualization Everywherewebhostingguy
 
Presentation cloud computing workshop - virtualization
Presentation   cloud computing workshop - virtualizationPresentation   cloud computing workshop - virtualization
Presentation cloud computing workshop - virtualizationxKinAnx
 
IITCC15: The Bare-Metal Hypervisor as a Platform for Innovation
IITCC15: The Bare-Metal Hypervisor as a Platform for InnovationIITCC15: The Bare-Metal Hypervisor as a Platform for Innovation
IITCC15: The Bare-Metal Hypervisor as a Platform for InnovationThe Linux Foundation
 
Bridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized EnvironmentBridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized EnvironmentAndy Lee
 
Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...
Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...
Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...Peter Tripp
 
Experiences porting KVM to SmartOS
Experiences porting KVM to SmartOSExperiences porting KVM to SmartOS
Experiences porting KVM to SmartOSbcantrill
 
Virtualize All The Things!
Virtualize All The Things!Virtualize All The Things!
Virtualize All The Things!Sparkhound Inc.
 
Cloud-computing.ppt
Cloud-computing.pptCloud-computing.ppt
Cloud-computing.pptAjit Mali
 
Implementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migrationImplementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migrationYan Vugenfirer
 
Virtualize All the Things!
Virtualize All the Things!Virtualize All the Things!
Virtualize All the Things!David Pechon
 
F19 slidedeck (OpenStack^H^H^H^Hhift, what the)
F19 slidedeck (OpenStack^H^H^H^Hhift, what the)F19 slidedeck (OpenStack^H^H^H^Hhift, what the)
F19 slidedeck (OpenStack^H^H^H^Hhift, what the)Gerard Braad
 
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaafTechnical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaafSyed Shaaf
 
Client Side Hypervisors - Victoria Russell
Client Side Hypervisors - Victoria RussellClient Side Hypervisors - Victoria Russell
Client Side Hypervisors - Victoria Russellrussvd1
 

Similar to macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~ (20)

Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library Hypervisor
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOS
 
RMLL / LSM 2009
RMLL / LSM 2009RMLL / LSM 2009
RMLL / LSM 2009
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0
 
Virtualization-the Cloud Enabler by INSPIRE-groups
Virtualization-the Cloud Enabler by INSPIRE-groupsVirtualization-the Cloud Enabler by INSPIRE-groups
Virtualization-the Cloud Enabler by INSPIRE-groups
 
Virtualization Everywhere
Virtualization EverywhereVirtualization Everywhere
Virtualization Everywhere
 
Handout2o
Handout2oHandout2o
Handout2o
 
Presentation cloud computing workshop - virtualization
Presentation   cloud computing workshop - virtualizationPresentation   cloud computing workshop - virtualization
Presentation cloud computing workshop - virtualization
 
IITCC15: The Bare-Metal Hypervisor as a Platform for Innovation
IITCC15: The Bare-Metal Hypervisor as a Platform for InnovationIITCC15: The Bare-Metal Hypervisor as a Platform for Innovation
IITCC15: The Bare-Metal Hypervisor as a Platform for Innovation
 
Bridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized EnvironmentBridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized Environment
 
Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...
Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...
Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...
 
Experiences porting KVM to SmartOS
Experiences porting KVM to SmartOSExperiences porting KVM to SmartOS
Experiences porting KVM to SmartOS
 
Virtualize All The Things!
Virtualize All The Things!Virtualize All The Things!
Virtualize All The Things!
 
Cloud-computing.ppt
Cloud-computing.pptCloud-computing.ppt
Cloud-computing.ppt
 
Implementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migrationImplementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migration
 
Virtualize All the Things!
Virtualize All the Things!Virtualize All the Things!
Virtualize All the Things!
 
Cloud computing components
Cloud computing componentsCloud computing components
Cloud computing components
 
F19 slidedeck (OpenStack^H^H^H^Hhift, what the)
F19 slidedeck (OpenStack^H^H^H^Hhift, what the)F19 slidedeck (OpenStack^H^H^H^Hhift, what the)
F19 slidedeck (OpenStack^H^H^H^Hhift, what the)
 
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaafTechnical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
 
Client Side Hypervisors - Victoria Russell
Client Side Hypervisors - Victoria RussellClient Side Hypervisors - Victoria Russell
Client Side Hypervisors - Victoria Russell
 

More from NTT Communications Technology Development

クラウドを最大限活用するinfrastructure as codeを考えよう
クラウドを最大限活用するinfrastructure as codeを考えようクラウドを最大限活用するinfrastructure as codeを考えよう
クラウドを最大限活用するinfrastructure as codeを考えようNTT Communications Technology Development
 
【たぶん日本初導入!】Azure Stack Hub with GPUの性能と機能紹介
【たぶん日本初導入!】Azure Stack Hub with GPUの性能と機能紹介【たぶん日本初導入!】Azure Stack Hub with GPUの性能と機能紹介
【たぶん日本初導入!】Azure Stack Hub with GPUの性能と機能紹介NTT Communications Technology Development
 
マルチクラウドでContinuous Deliveryを実現するSpinnakerについて
マルチクラウドでContinuous Deliveryを実現するSpinnakerについて マルチクラウドでContinuous Deliveryを実現するSpinnakerについて
マルチクラウドでContinuous Deliveryを実現するSpinnakerについて NTT Communications Technology Development
 
Can we boost more HPC performance? Integrate IBM POWER servers with GPUs to O...
Can we boost more HPC performance? Integrate IBM POWER servers with GPUs to O...Can we boost more HPC performance? Integrate IBM POWER servers with GPUs to O...
Can we boost more HPC performance? Integrate IBM POWER servers with GPUs to O...NTT Communications Technology Development
 
イケてない開発チームがイケてる開発を始めようとする軌跡
イケてない開発チームがイケてる開発を始めようとする軌跡イケてない開発チームがイケてる開発を始めようとする軌跡
イケてない開発チームがイケてる開発を始めようとする軌跡NTT Communications Technology Development
 

More from NTT Communications Technology Development (20)

クラウドを最大限活用するinfrastructure as codeを考えよう
クラウドを最大限活用するinfrastructure as codeを考えようクラウドを最大限活用するinfrastructure as codeを考えよう
クラウドを最大限活用するinfrastructure as codeを考えよう
 
【たぶん日本初導入!】Azure Stack Hub with GPUの性能と機能紹介
【たぶん日本初導入!】Azure Stack Hub with GPUの性能と機能紹介【たぶん日本初導入!】Azure Stack Hub with GPUの性能と機能紹介
【たぶん日本初導入!】Azure Stack Hub with GPUの性能と機能紹介
 
マルチクラウドでContinuous Deliveryを実現するSpinnakerについて
マルチクラウドでContinuous Deliveryを実現するSpinnakerについて マルチクラウドでContinuous Deliveryを実現するSpinnakerについて
マルチクラウドでContinuous Deliveryを実現するSpinnakerについて
 
Argo CDについて
Argo CDについてArgo CDについて
Argo CDについて
 
SpinnakerとKayentaで 高速・安全なデプロイ!
SpinnakerとKayentaで 高速・安全なデプロイ!SpinnakerとKayentaで 高速・安全なデプロイ!
SpinnakerとKayentaで 高速・安全なデプロイ!
 
100Gbps OpenStack For Providing High-Performance NFV
100Gbps OpenStack For Providing High-Performance NFV100Gbps OpenStack For Providing High-Performance NFV
100Gbps OpenStack For Providing High-Performance NFV
 
Can we boost more HPC performance? Integrate IBM POWER servers with GPUs to O...
Can we boost more HPC performance? Integrate IBM POWER servers with GPUs to O...Can we boost more HPC performance? Integrate IBM POWER servers with GPUs to O...
Can we boost more HPC performance? Integrate IBM POWER servers with GPUs to O...
 
AWS re:Invent2017で見た AWSの強さとは
AWS re:Invent2017で見た AWSの強さとは AWS re:Invent2017で見た AWSの強さとは
AWS re:Invent2017で見た AWSの強さとは
 
Mexico ops meetup発表資料 20170905
Mexico ops meetup発表資料 20170905Mexico ops meetup発表資料 20170905
Mexico ops meetup発表資料 20170905
 
NTT Tech Conference #2 - closing -
NTT Tech Conference #2 - closing -NTT Tech Conference #2 - closing -
NTT Tech Conference #2 - closing -
 
イケてない開発チームがイケてる開発を始めようとする軌跡
イケてない開発チームがイケてる開発を始めようとする軌跡イケてない開発チームがイケてる開発を始めようとする軌跡
イケてない開発チームがイケてる開発を始めようとする軌跡
 
GPU Container as a Service を実現するための最新OSS徹底比較
GPU Container as a Service を実現するための最新OSS徹底比較GPU Container as a Service を実現するための最新OSS徹底比較
GPU Container as a Service を実現するための最新OSS徹底比較
 
SpinnakerとOpenStackの構築
SpinnakerとOpenStackの構築SpinnakerとOpenStackの構築
SpinnakerとOpenStackの構築
 
Troveコミュニティ動向
Troveコミュニティ動向Troveコミュニティ動向
Troveコミュニティ動向
 
Web rtc for iot, edge computing use cases
Web rtc for iot, edge computing use casesWeb rtc for iot, edge computing use cases
Web rtc for iot, edge computing use cases
 
OpenStack Ops Mid-Cycle Meetup & Project Team Gathering出張報告
OpenStack Ops Mid-Cycle Meetup & Project Team Gathering出張報告OpenStack Ops Mid-Cycle Meetup & Project Team Gathering出張報告
OpenStack Ops Mid-Cycle Meetup & Project Team Gathering出張報告
 
NTT Tech Conference #1 Opening Keynote
NTT Tech Conference #1 Opening KeynoteNTT Tech Conference #1 Opening Keynote
NTT Tech Conference #1 Opening Keynote
 
NTT Tech Conference #1 Closing Keynote
NTT Tech Conference #1 Closing KeynoteNTT Tech Conference #1 Closing Keynote
NTT Tech Conference #1 Closing Keynote
 
OpsからみたOpenStack Summit
OpsからみたOpenStack SummitOpsからみたOpenStack Summit
OpsからみたOpenStack Summit
 
RabbitMQ can scale out!!(jp ops-workshop-3)
RabbitMQ can scale out!!(jp ops-workshop-3)RabbitMQ can scale out!!(jp ops-workshop-3)
RabbitMQ can scale out!!(jp ops-workshop-3)
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~

  • 1. Copyright © NTT Communications Corporation. All rights reserved. macOSの仮想化技術について ~ virtualization-rs Rust bindings for Virtualization.framework ~
  • 2. Copyright © NTT Communications Corporation. All rights reserved. ■ macOS 11 Big Surから新しくLinux VM作成の⾼レベルAPI Virtualization.frameworkが登場 • Objective-C、SwiftのAPIが提供されている ■ あれ︖ Rust APIがないなぁ︖(唐突) 👉 Rust bindingsの virtualization-rsを作ってみた ■ 本発表の内容 • まず仮想化技術についての基本的な背景、macOS の仮想化技術の 変遷や仮想化技術を⽀えるツールについて • 次にvirtualization-rsのご紹介とLinux boot DEMO • 最後に従来の仮想化技術との性能⽐較 概要 2
  • 3. Copyright © NTT Communications Corporation. All rights reserved. 1. Who am I ? 2. 仮想化技術の背景 3. macOSの仮想化技術 4. Virtualization.framework 5. virtualization-rs 6. 各種仮想化技術のベンチマーク測定 7. まとめ Agenda 3
  • 4. Copyright © NTT Communications Corporation. All rights reserved. ■ ⽒名︓鈴ヶ嶺 聡哲 ■ 2020年4⽉ NTT Com⼊社 • イノベーションセンターテクノロジー部⾨ AIインフラ チーム ■ 興味のある技術分野 • クラウドに関すること • 機械学習基盤 • 仮想化技術 • Rust ■ NTT Comでの活動 • 業務 パブリック・ハイブリッドクラウドの技術検証 機械学習基盤の技術検証 • AWS GameDay Online APN Cup.vol1 結果発表︕ | Amazon Web Services 3位⼊賞 • NTT Com Qiita アドベントカレンダー 2020 Rustで実装するNetflow Collector Who am I ? 4 @suzu_3_14159265
  • 5. Copyright © NTT Communications Corporation. All rights reserved. 仮想化技術の背景 5
  • 6. Copyright © NTT Communications Corporation. All rights reserved. ■ Formal requirements for virtualizable third generation architectures. • 1974年に提唱された仮想化を効率的に実現するための要件 VMM(仮想マシンモニタ)の3つの特性 1. 等価性(Equivalence) a. 元のマシン上で直接実⾏された場合と同じ動作をする 2. 効率性(Efficiency) a. 統計的に多くの処理をVMMソフトウェアの介⼊なしに実⾏可能であること 3. 資源管理(Resource control) a. リソースを完全に制御可能であること i. 明⽰的に割り当てられていないリソースにはアクセス不可能 ii. 既に割り当てられているリソースの制御を取り戻すことが可能であること PopekとGoldbergの仮想化要件 6 Popek, Gerald J., and Robert P. Goldberg. "Formal requirements for virtualizable third generation architectures." Communications of the ACM 17.7 (1974): 412-421.
  • 7. Copyright © NTT Communications Corporation. All rights reserved. 命令の分類 1. 特権命令(privileged instruction) a. プロセッサがユーザーモードの場合にトラップされる命令 2. センシティブ命令(sensitive instruction) a. 制御センシティブ命令(control sensitive instruction) i. システム資源に対する変更命令 b. 動作センシティブ命令(behavior sensitive instruction) i. 資源の構成に依存する命令 ■ この論⽂でもっとも重要な定理 • センシティブ命令が特権命令のサブセットであればVMMを構築可能 ※論⽂では、計算モデルによって証明しているがここでは割愛 PopekとGoldbergの仮想化要件 7 特権命令 センシティブ命令 全ての命令
  • 8. Copyright © NTT Communications Corporation. All rights reserved. ■ しかし…当時のx86はその要件を満たしていない… • Analysis of the Intel Pentium's ability to support a secure virtual machine monitor. 全ての命令 PopekとGoldbergの仮想化要件 8 Robin, John S., and Cynthia E. Irvine. Analysis of the Intel Pentium's ability to support a secure virtual machine monitor. NAVAL POSTGRADUATE SCHOOL MONTEREY CA DEPT OF COMPUTER SCIENCE, 2000. 特権命令 センシティブ命令 VMMを構築可能にする仕組み ● Binary Translation ● 準仮想化 ● Intel VT-x、AMD-V トラップできない センシティブ命令が存在する x86 リングプロテクション Ring0 Ring1 Ring2 Ring3
  • 9. Copyright © NTT Communications Corporation. All rights reserved. ■ VMware、Virtualboxなどで⽤いられている技術 ■ 問題ない命令はそのまま実⾏するが、センシティブ命令をト ラップして動的に書き換えて実⾏する • 動的な命令の置き換え • OS側に特別変更は不要 Binary Translation 9 OS VMM hardware センシティブ命令 そのまま 実⾏ 動的 変換 問題ない命令
  • 10. Copyright © NTT Communications Corporation. All rights reserved. ■ Xenで⽤いられている⼿法 ■ ハイパーバイザ向けに書き換えた専⽤のゲストOSが必要 • OSの変更コストがある ■ ハードウェアを使うためには、ハイパーバイザコールを発⾏ し、処理を依頼する • 静的な命令の置き換え 準仮想化 10 プロセス ゲストOS(準仮想化) システムコール Xen Ring3 Ring1 Ring0 Ring2 ハイパーバイザコール
  • 11. Copyright © NTT Communications Corporation. All rights reserved. ■ x86を仮想化可能なアーキテクチャにするための拡張技術 • root、non-root の2つのモードがある • 各モードでリングを割り当てることが可能なため、OSの変更が不要 • non-root modeでセンシティブな命令を実⾏するとroot modeにトラップさ れる • VM Exitする命令をVMCSというconfigによって制御可能 Intel VT-x 11 Ring0 Ring1 Ring2 Ring3 Ring0 Ring1 Ring2 Ring3 VMX root mode VMX non-root mode VM Entry VM Exit
  • 12. Copyright © NTT Communications Corporation. All rights reserved. ■ Intel VT-x、AMD-Vを使⽤したVMM ■ 2008年にQumranetが開発開始→後にRedHatに買収される ■ Linux Kernel 2.6.20に標準採⽤ • /dev/kvm のようにLinux kernel moduleとして存在している ■ KVM⾃体はエミュレーションは⾏わずQEMUと組み合わせる ■ Linux driverが資産として使⽤可能 ■ AWSはKVMベースのNitro Hypervisorに移⾏する⾒込み • “最終的にはすべての新しいインスタンスタイプが Nitro Hypervisor を使⽤するようになります” https://aws.amazon.com/jp/ec2/faqs/ Linux KVM(Kernel-based Virtual Machine) 12 Linux KVM VM QEMU
  • 13. Copyright © NTT Communications Corporation. All rights reserved. ■ 平たく⾔えばFreeBSDにおけるLinux KVMのようなVMM ■ NetAppが2011年に開発 ■ FreeBSD 8.4以降で使⽤可能 • FreeBSD 10.0でデフォルト ■ VT-x命令を発⾏するカーネルモジュールvmm.koとVM実⾏プ ログラムの/usr/sbin/bhyveによって成り⽴つ ■ 余談︓元々BHyVeだったがシンプルなbhyveに名称が変更 • Q: Is it "bhyve", "Bhyve", "BHyVe" or BHyve? A: The developers mercifully retired "BHyVe" and simply refer to it as "bhyve", after the utility. https://wiki.freebsd.org/bhyve bhyve 13 FreeBSD kernel vmm.ko VM bhyve
  • 14. Copyright © NTT Communications Corporation. All rights reserved. ■ EL2というException Levelを追加 ■ AppのEL0、OSのEL1のセンシティブ命令をトラップ可能 aarch64(ARM)の仮想化⽀援機構 14 https://developer.arm.com/documentation/102142/0100/Virtualization-Host-Extensions
  • 15. Copyright © NTT Communications Corporation. All rights reserved. macOSの仮想化技術 15
  • 16. Copyright © NTT Communications Corporation. All rights reserved. ■ 3rd party kernel extensionsなしでユーザ空間でハイパーバ イザを実現する ■ 当初は、Intel VT-xを制御するAPI 1. LifeCycle 1. hv_vm_createでVMの作成 2. hv_vm_mapでメモリマッピング 3. hv_vcpu_createで仮想CPUの作成 4. hv_vcpu_runでCPUの実⾏ 5. VMEXITをトラップ 1. hv_vcpu_runで再度実⾏するか hv_vcpu_destroyでCPUを消す 6. 全てのthreadが終了時 1. hv_vm_unmapでメモリのアンマップ 2. hv_vm_destroyでVMを消す Hypervisor.framework 16 VM Life Cycle
  • 17. Copyright © NTT Communications Corporation. All rights reserved. ■ IntelとApple SiliconでAPIは共通ではない • 以下はVirtual Machine Management API Hypervisor.framework 17 Intel ■ hv_vm_create • Creates a VM instance for the current process. ■ hv_vm_destroy • Destroys the VM instance associated with the current process. ■ hv_capability • Gets the value of capabilities of the system. ■ hv_vm_options_t • Options you use when creating a virtual machine. ■ hv_capability_t • The type of system capabilities. Apple Silicon ■ hv_vm_create • Creates a VM instance for the current process. ■ hv_vm_destroy • Destroys the VM instance associated with the current process. ■ OS_hv_vm_config • Creates a virtual machine configuration object. ■ hv_vm_config_t • The type that defines a virtual-machine configuration. https://developer.apple.com/documentation/hypervisor/apple_silicon?language=objc https://developer.apple.com/documentation/hypervisor/intel-based_mac?language=objc
  • 18. Copyright © NTT Communications Corporation. All rights reserved. ■ 作者︓Michael Steil • toy projectとしてHypervisor.framework上にDOS Emulatorであるhvdos を作っていた ■ 本格的なハイパーバイザとしてmacOS向けにbhyveのポート としてxhyveを実装 ■ Big surでは現状動かない ■ 初期のDocker for Macはxhyve上のLinuxで実装されていた • 後にhyperkitに移⾏ xhyve 18 “The Docker engine is running in an Alpine Linux distribution on top of an xhyve Virtual Machine on Mac OS X” https://www.docker.com/blog/docker-for-mac-windows-beta/
  • 19. Copyright © NTT Communications Corporation. All rights reserved. ■ moby(Docker)がxhyveをforkして開発しているツール • VPNKit、DataKitと連携するため ■ Big surのintel Macには対応、Apple siliconは未サポート ■ 現状、Intel Macでdockerをcom.docker.hyperkitが動作 • Apple Siliconでは別(後述) ■ minikubeはhyperkit driverをサポート • Hypervisor.framework上でk8sを構築可能 hyperkit 19 Tiny Core Linuxを動かすコマンド例
  • 20. Copyright © NTT Communications Corporation. All rights reserved. Virtualization.framework 20
  • 21. Copyright © NTT Communications Corporation. All rights reserved. ■ macOS 11 Big Surから追加されたVM作成の⾼レベルAPI • Linux専⽤ API vmlinuz, initrdを指定 • Intel、Apple SiliconベースMacの両対応の抽象化されたAPI 簡単にLinux VMを作成可能 • Objective-C、SwiftのAPIが提供されている • NAT、Bridge Networkが設定可能 Virtualization.framework 21 VZVirtualMachineConfiguration bootLoader CPUCount memorySize networkDevices socketDevices serialPorts storageDevices entropyDevices VMのConfiguration
  • 22. Copyright © NTT Communications Corporation. All rights reserved. ■ 2020年12⽉16⽇に発表されたTech Preview of Docker Desktop for M1ではhyperkitからVirtualization.framework に移⾏している • “Migrate from HyperKit to the Virtualization Framework.” https://www.docker.com/blog/download-and-try-the-tech-preview-of-docker-desktop-for-m1 ■ Intelでも移⾏を検討している発⾔が⾒られる Docker Desktop for M1 22 https://github.com/docker/roadmap/issues/142#issuecomment-758508126 ■ 今後Hyperkitのsupportどうなるんだろう🤔 • minikube…
  • 23. Copyright © NTT Communications Corporation. All rights reserved. virtualization-rs 23
  • 24. Copyright © NTT Communications Corporation. All rights reserved. ■ Virtualization.frameworkのRust bindingを作成 • https://github.com/suzusuzu/virtualization-rs • https://crates.io/crates/virtualization-rs ■ Rustの特徴 • modernな型システム、型推論、パターンマッチ • ボローチェッカーによるメモリ安全性 • ゼロコスト抽象化による⾼速実⾏ • 並列実⾏時にデータ競合が発⽣しないことが保証されている • Cargoなどの⾼機能なエコシステム virtualization-rs 24 Linux VMを作成する今回のようなシステムソフトウェアを 書く⾔語として⾮常に適している︕
  • 25. Copyright © NTT Communications Corporation. All rights reserved. Objective-C Rust call Objective-C 25 Rust https://crates.io/crates/objc ■ objcを⽤いてObjective-Cのオブジェクトを操作可能 • Objective-C likeなAPI • 有名どころでは、servoなどもこのpackageを使⽤している • 内部的な実装 Objective-C Runtimeというdynamic libraryのC APIを使⽤している typedef struct objc_class *Class; void objc_msgSend(void); Rust ⇔ Objective-C Runtime(C API) ⇔ Objective C https://developer.apple.com/documentation/objectivec/objective-c_runtime?language=objc
  • 26. Copyright © NTT Communications Corporation. All rights reserved. ■ インスタンス初期化の標準⼿法 • 元々はAWS EC2⽤に開発されたツール • meta-data hostname、instance-id • user-data user、password、ssh key ■ NoCloud • ネットワークサービスを実⾏することなく初期 設定を可能とする仕様 • meta-dataやuser-dataをvfat、iso9660 filesystem(volume labelをcidataに設 定)を介して渡すことが可能 ■ Ubuntu Cloud image • 最新のアップデートが適⽤ • クラウドインスタンやdockerなどで使⽤ されているイメージ • このイメージをcloud-initで初期化する cloud-init 26 https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html NoCloudのisoの作成例 ● ubuntu、rootのpasswordを設定 ● hostnameをfoobarに設定 ● label idにcidataを設定
  • 27. Copyright © NTT Communications Corporation. All rights reserved. DEMO 27 https://youtu.be/IRqYMykuRsQ
  • 28. Copyright © NTT Communications Corporation. All rights reserved. 各種仮想化技術のベンチマーク測定 28
  • 29. Copyright © NTT Communications Corporation. All rights reserved. ■ sysbenchによる性能評価 • 実⾏コマンド sysbench cpu run --threads=4 • 30回測定 • 環境 Ubuntu 20.04 • 測定対象 virtualization-rs docker(hyperkit) virtualbox(binary translation) ■ 結果 • Virtualization.frameworkは従来の hyperkitと同程度の性能であること が⽰された 各種仮想化技術のベンチマーク測定 29 Good
  • 30. Copyright © NTT Communications Corporation. All rights reserved. ■ macOS Big surからLinux VMが作成可能な⾼レベルAPIの Virtualization.frameworkが登場 ■ Virtualization.frameworkのRust bindingsを作成した ■ sysbenchによる性能評価の結果から従来のhyperkitと同程 度の性能であることが分かった まとめ 30