CPU Virtualization Checklist

Posted in , , ,   with  No comments     Edit
Every time you start to play with virtualization or have to work with it, you must check if your processor has virtualization support. This feature is helpful, because you can improve the guest/vm performance. Instructions are trapped and emulated at the hardware level (Intel® VT-x/VT-i and AMD-V™). This means that a guest can run without specific modifications to allow for virtualization.

Most of the times this feature is disabled from the bios, and you have to enabled in order to take full advantage of the processor capabilities. 

For example in a Sun x6270 Server, we can review the information from more /proc/cpuinfo. This a common way that many sites and blogs recommend.

[root@oraclevm etc]# dmidecode | grep -A3 '^System Information'
System Information
        Manufacturer: Oracle Corporation
        Product Name: Sun Blade X6270 M3
        Version: N/A

[root@oraclevm ~]# more /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz
stepping        : 7
microcode       : 0x710
cpu MHz         : 2494.092
cache size      : 15360 KB
physical id     : 0
siblings        : 12
core id         : 0
cpu cores       : 6
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu de tsc msr pae mce cx8 apic sep mca cmov pat clflush acpi
mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc eag
erfpu pni pclmulqdq monitor est ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_tim
er aes xsave avx hypervisor lahf_lm ida arat epb pln pts dtherm xsaveopt
bugs            :
bogomips        : 4988.18
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

We need to search for the following flags

      vmx – (intel)
      svm – (amd)

We are not able to see in our case the vmx flag. Let's move to the bios

Once I logged into the bios I went to Main->Cpu Information .I can confirm that virtualization support is enabled

I also went to IO->IO Virtualization and enabled each option

      VT-d:   Enabled
      SR-IOV:  Enabled
      ARI:  Enabled

and saved the changes and rebooted the server

After that I'm not able to see again the vmx flag

[root@oraclevm ~]# grep vmx /proc/cpuinfo
[root@oraclevm ~]#

After digging into google, I found this article

I'm using Oracle VM, that runs a XEN kernel and according to the previous article 

Tip # 3: XEN Kernel

By default, if you booted into XEN kernel it will not display svm or vmx flag using the grep command. To see if it is enabled or not from xen, enter:
cat /sys/hypervisor/properties/capabilities

You must see hvm flags in the output. If not reboot the box and set Virtualization in the BIOS

Once I run cat /sys/hypervisor/properties/capabilities ,i can see the right values

[root@oraclevm ~]# cat /sys/hypervisor/properties/capabilities

xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64

So I think we are good :).

Another tool that I found useful and interesting during this research was virsh.

Thanks for visiting



0 comentarios:

Post a Comment