3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

BitVisorAdvent Calendar 2019

Day 12

BitVisor on VirtualBox チャレンジ (Intel編)

Posted at

2019年12月10日にリリースされたVirtualBox 6.1でIntel CPUに対するnested virtualizationのサポートが追加されました1 (changelog).

Virtualization core: Support for nested hardware-virtualization on Intel CPUs (starting with 5th generation Core i, codename Broadwell), so far tested only with guest running VirtualBox

VirtualBox on VirtualBoxしかテストしてないと書いてありますが,BitVisorは動作するでしょうか.Mac版のVirtualBoxで試してみます.

Nested機能の有効化

VirtualBox6.1をインストールして,プロセッサの設定項目を見ると,nested virtualizationの項目がありますが,なぜか有効化できません.

スクリーンショット 2019-12-12 16.31.42.png

そこでコマンドラインから強制的に有効化してみます.

VBoxManage modifyvm <VM名> --nested-hw-virt on

これで上記の設定項目は有効になります.
スクリーンショット 2019-12-12 16.32.23.png

Ubuntuをインストールして/proc/cpuinfoをみてみると,とりあえずvmxは見えます.

image.png

BitVisorのインストール

こちらの記事を参考にUbuntuにUEFI+grub環境でBitVisorをインストールしました.

結果

😇

PCI device concealer registered
PCI device monitor registered
PCI: finding devices...
PCI: 10 devices found
Starting a virtual machine.
panic(CPU0): Fatal error: VM Entry failure.
CR0 80010013    CR2 00000000    CR3 25CCF000    CR4 000026A8
RFLAGS 00000016  GDTR 40347428+0000FFFF  IDTR 401F2740+0000FFFF
stackdump: 0 40347788 4015A8A0 401259C4 0 4013760A 40137628 24900000 3E601CA0 0 4015A8A0 0 40347788 4011EC00 401274D4 40126276 0 4
012673B 9F FFFFFFFFFFFFFFFF 4024F440 8 414E7E68 414E7E08 A000100000004 0 0 41600000 0 0 3E601CA0 80000021
backtrace: 401259C4 4013760A 40137628 4011EC00 401274D4 40126276 4012673B 401330EF 4011A81F 40133C18 40128D56 401274E1 40126F65 40
127519 4012756C 40120394 4011CD1D 4011FC15 4010E81B 40101580
Guest state and registers of cpu 0 ------------
RAX 80010033    RCX 00000000    RDX 00000000    RBX 00000000
RSP 3F237038    RBP 00000000    RSI 00000000    RDI 00000000
R8  00000000    R9  00000000    R10 00000000    R11 00000000
R12 00000000    R13 00000000    R14 00000000    R15 00000000
CR0 00000010    CR2 00000000    CR3 3F001000    CR4 00000628
ACR   ES 000000F3 CS 000000F3 SS 000000F3 DS 000000F3 FS 000000F3 GS 000000F3
LIMIT ES 0000FFFF CS 0000FFFF SS 0000FFFF DS 0000FFFF FS 0000FFFF GS 0000FFFF
BASE  ES 00000000 CS 0009FD30 SS 00000000 DS 00000000 FS 00000000 GS 00000000
SEL   ES 00000000 CS 00009FD3 SS 00000000 DS 00000000 FS 00000000 GS 00000000
RIP 00000004  RFLAGS 00010002  GDTR 3EFF2018+00000047  IDTR 3EC10018+00000FFF
EFER 00000900
Exit reason: -2147483615=0x80000021 (VM-entry failure due to invalid guest state)  VM entry failure
Exit qualification 00000000  VM exit interrupt information 00000000
VM entry interruption-information 00000000  errcode 00000000  instlen 00000000
VM exit errcode 00000000  VMCS IDTR 00000000+00000000   VMCS RFLAGS 00030002
re=1 pg=0 sw:en=0x0 es=0x0 cs=0x0 ss=0x0 ds=0x0 fs=0x0 gs=0x0
------------------------------------------------
panic(CPU0): Fatal error: VM Entry failure.
s:shell r:reboot ?
  1. AMDに関しては6.0からあります.

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?