1. はじめに
IBM CloudにはClassic Infrastructureと呼ばれる旧SoftLayer時代のサーバー群と、VPC Gen2と呼ばれる次世代のサーバー群があります。
まだVPC Gen2は2020年6月現在では日本では実装されていませんが、もうすぐGAされる予定です。KVMで構成されており、1仮想サーバーあたり最大で80Gbpsまで性能を出すことができます。
どうやら、このVPC Gen2の仮想サーバーはnested VMがサポートされているようです。有効化できるかを確認してみます。
2. 仮想サーバーのCPUに仮想化支援機能に対応しているかどうかの確認
ClassicInfrastructure
# egrep '(vmx|svm)' /proc/cpuinfo
(何も表示されない)
# lscpu|grep -i virtualization
Virtualization type: full
VPCGen2
# egrep '(vmx|svm)' /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat md_clear spec_ctrl
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat md_clear spec_ctrl
# lscpu|grep -i virtualization
Virtualization: VT-x
Virtualization type: full
# lsmod|grep kvm
kvm_intel 188688 0
kvm 636931 1 kvm_intel
irqbypass 13503 1 kvm
VPCGen2でnested機能を有効化
# cat /sys/module/kvm_intel/parameters/nested
N
# modprobe -r kvm_intel
# modprobe kvm_intel nested=1
# cat /sys/module/kvm_intel/parameters/nested
Y
参考リンク
- https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-system_requirements-kvm_requirements
- https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-nested_virt_setup