NTNX>日記

個人的な趣味による Nutanix Community Edition 日記。Japanese のみですみません。

Nutanix AHV での vCPU の様子。

Nutanix CE の AHV で、ユーザ VM の vCPU の様子を見てみます。
今回は、ゲスト OS / ホスト OS で、それぞれ lscpu を見るだけです。

Oracle Linux 7 KVM での vCPU

まず比較対象として、Oracle Linux 7.5 KVM の上で起動している、virt-install で作成して特に設定をカスタマイズしていない VM の vCPU の認識を見てみます。

[root@ol7-on-kvm ~]# cat /etc/oracle-release
Oracle Linux Server release 7.5
[root@ol7-on-kvm ~]# virt-what
kvm
[root@ol7-on-kvm ~]# dmidecode | grep "System Information" -A2
System Information
        Manufacturer: Red Hat
        Product Name: KVM

lscpu で、CPU のモデルやフラグ情報などを見てみます。

[root@ol7-on-kvm ~]# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 61
Model name:            Intel Core Processor (Broadwell, IBRS)
Stepping:              2
CPU MHz:               0.000
BogoMIPS:              4608.00
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
NUMA node0 CPU(s):     0
Flags:                 fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm 3dnowprefetch invpcid_single ibrs ibpb pti fsgsbase bmi1 hle avx2 smep bmi2 invpcid rtm rdseed adx smap xsaveopt

virsh console で接続していたので、VM から抜けて KVM ホストでの VM 定義を見ておきます。

[root@ol7-on-kvm ~]#
[root@lab-kvm-01 ~]#
[root@lab-kvm-01 ~]# virsh list
 Id    名前                         状態
----------------------------------------------------
 3     vm01                           実行中

[root@lab-kvm-01 ~]#

virsh dumpxml で見ると、この VM の vCPU の定義は下記のようになっていました。

gist.github.com

KVM ホスト側の lscpu では、ゲスト OS とは CPU モデルが異なります。(実は VMware ESXi 上の Nested Nutanix CE です。)

[root@lab-kvm-01 ~]# LANG=C lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             2
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 79
Model name:            Intel(R) Core(TM) i3-6100U CPU @ 2.30GHz
Stepping:              0
CPU MHz:               2303.150
BogoMIPS:              4608.00
Virtualization:        VT-x
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K
NUMA node0 CPU(s):     0,1
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 arat invpcid_single ibrs stibp ia32_arch_caps ibpb pti tpr_shadow vnmi ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 invpcid rtm rdseed adx smap xsaveopt

AHV での vCPU

AHV 上で起動してる Oracle Linux 7 の VM です。virt-what はなぜか hyperv ですが、AHV 上の VM です。

[root@ol7-on-ahv ~]# cat /etc/oracle-release
Oracle Linux Server release 7.5
[root@ol7-on-ahv ~]# virt-what
hyperv
[root@ol7-on-ahv ~]# dmidecode | grep "System Information" -A2
System Information
        Manufacturer: Nutanix
        Product Name: AHV

lscpu の結果を見てみます。

[root@ol7-on-ahv ~]# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            15
Model:                 6
Model name:            Intel(R) Core(TM) i3-6100U CPU @ 2.30GHz
Stepping:              1
CPU MHz:               0.000
BogoMIPS:              4608.00
Hypervisor vendor:     Microsoft
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
L3 cache:              16384K
NUMA node0 CPU(s):     0
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc nopl pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm abm 3dnowprefetch arat invpcid_single stibp pti fsgsbase tsc_adjust bmi1 hle smep bmi2 invpcid rtm rdseed adx smap

AHV(192.168.5.1)側での VM 定義を見ておきます。

CVM$ ssh root@192.168.5.1 virsh list
FIPS mode initialized
 Id    Name                           State
----------------------------------------------------
 1     NTNX-68fda404-A-CVM            running
 4     3ef4bcac-624e-4ac0-9310-9006de173fe5 running

AHV での virsh dumpxml で見た、vCPU の定義情報です。

gist.github.com

AHV 側での lscpu です。

CVM$ ssh root@192.168.5.1 lscpu
FIPS mode initialized
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             4
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 79
Model name:            Intel(R) Core(TM) i3-6100U CPU @ 2.30GHz
Stepping:              0
CPU MHz:               2304.000
BogoMIPS:              4608.00
Virtualization:        VT-x
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 arat spec_ctrl stipb ia32_arch_caps retpoline tpr_shadow vnmi ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 invpcid rtm rdseed adx smap xsaveopt

AHV でも ESXi での EVC のような仕組みがあるのですが、このあたりの VM の定義を見ると具体的な実装方法が見えそうな気がします。

以上。

©2023 gowatana
クリエイティブ・コモンズ・ライセンスこの 作品 は クリエイティブ・コモンズ 表示 4.0 国際 ライセンスの下に提供されています。