LoginSignup
2
2

More than 5 years have passed since last update.

nova-computeにCPU Passthroughさせるための設定

Last updated at Posted at 2015-09-07

Live Migrationが、同じCPUモデルのホスト間でしかできなくなるので注意。

nova-compute.ini
[libvirt]
cpu_mode = host-passthrough

QEMU/KVMでOpenStack Novaを使っている場合、デフォルトではドメイン定義時に/usr/share/libvirt/cpu_map.xmlを見て、最もそれっぽいCPUモデルがlibvirtのドメインXMLに書き込まれる。

psなどでQEMUの引数を見ると、CPUのモデルと機能が長々と指定されているのが分かる。

/usr/bin/qemu-system-x86_64
-name instance-000000ea
-S
-machine pc-i440fx-trusty,accel=kvm,usb=off
-cpu Westmere,+rdtscp,+pdpe1gb,+dca,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pclmuldq,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme
-m 4096
-realtime mlock=off
-smp 1,sockets=1,cores=1,threads=1
(snip. 余談だけどQEMUの引数ってめっちゃ長いよね)

パススルーを設定すると、

/usr/bin/qemu-system-x86_64
-name instance-000000eb
-S
-machine pc-i440fx-trusty,accel=kvm,usb=off
-cpu host
-m 4096
-realtime mlock=off
-smp 1,sockets=1,cores=1,threads=1
(snip.)

-cpuオプションが変わる。

ゲスト内からは、/proc/cpuinfoなんかを見るとCPUのCapabilitiesが変わったりキャッシュサイズが増えたりしていることが確認できると思う。

ところでNested VMXのおかげでvmxなんかもExportされるから、OpenStack on OpenStack on OpenStack ... とかできるんじゃないだろうか。

2
2
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
2
2