Thursday, June 2, 2011

Oracle VM: How to Check whether Your Hardware is Capable of Full Virtualization

Oracle VM: How to Check whether Your Hardware is Capable of Full Virtualization [ID 468463.1]
Modified 22-JUN-2010 Type HOWTO Status PUBLISHED
In this Document
Goal
Solution
Checking and Setting up the BIOS for Virtualization Support
Checking the CPUs for Virtualization Support for Oracle VM 2.1.X
Checking the CPUs for Virtualization Support for Oracle VM 2.1.X, 2.2 and Up
References

Applies to:

Oracle VM - Version: 2.1 to 2.2 - Release: OVM21 to OVM22
Linux x86
Linux x86-64
Goal

You have installed OracleVM Server on your hardware and you would like to check whether the configuration will support fully virtualized guest installations (domains). The term "Full Virtualization" is synonymous with "Hardware virtualized machine". From Oracle® VM Server User's Guide - Glossary:
A virtual machine with an unmodified guest operating system. It is not recompiled for the virtual environment. There may be substantial performance penalties running as a hardware virtualized guest. Enables Microsoft Windows™ operating system to be run, and legacy operating systems. Hardware virtualization is only available on Intel VT or AMD SVM CPUs.
Solution

There are two main requirements for the hardware virtualization is to be enabled in a system:
BIOS should be setup for virtualization
The CPU should support virtualization
Checking and Setting up the BIOS for Virtualization Support

During the initial hardware boot sequence
Hit the "BIOS Setup" key. (Most commonly this is the F2 key. e.g. Dell)
Enable the "Virutalization Technology" or "Vanderpool" (development code name for the feature) option for the CPU(s)
Checking the CPUs for Virtualization Support for Oracle VM 2.1.X

In Oracle VM 2.1.X, you can check the /proc/cpuinfo for CPUs virtualization support. For checks in Oracle VM 2.2 or higher, see next section.

If you have intel CPUs and if you have keyword vmx in the flags sections of CPU information in /proc/cpuinfo your hardware supports full virtualization. This is called the INTEL-VT support.
# cat /proc/cpuinfo
...
flags : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est cid cx16 xtpr lahf_lm
...

For AMD CPUs, if you have keyword svm in the flags sections of CPU information in /proc/cpuinfo your hardware supports full virtualization. This is called the AMD-V support.
# cat /proc/cpuinfo
...
flags : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy
...

Specifically you can run the following command line script to check:
# echo; grep -q "\(vmx\|svm\)" /proc/cpuinfo; if [ $? -eq 0 ]; then echo "Full Virtualization IS supported"; else echo "Full Virtualization IS NOT supported"; fi
Note that you should NOT be checking for the vme flag which stands for Virtual Mode Extension which is not related to virtualization. (it is about the VM86 mode of the processor which is used for running DOS applications under Windows etc.)

Checking the CPUs for Virtualization Support for Oracle VM 2.1.X, 2.2 and Up

Starting with Oracle VM 2.2, the hypervisor masks the flag in /proc/cpuinfo in dom0 (management domain). The the above check does not work. The ideal check is done by using xm info as described in Note 468485.1 and Oracle VM Manager User's Guide. To check for virtualization support specifically:
# xm info | grep xen_caps
xen_caps : 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
#

If you have the hvm tags as above, the hypervisor running can support fully virtualized guests where it implies that your CPUs has Virtualization Support. If you do not have virtualization support in your CPUs you'd see something like:
# xm info | grep xen_caps
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p
#
which means that you cannot run fully virtualized guests on this server.

This method also works for Oracle VM 2.1.X, and that is the preferred method to check for virtuailzation support.


References

http://www.amd.com/virtualization
http://www.intel.com/technology/platform-technology/virtualization/index.htm
NOTE:468485.1 - Collecting Oracle VM Server Information with "xm info"
Oracle VM Manager User's Guide - Appendix D - Troubleshooting

Related
Products
Unbreakable Linux and Virtualization > Oracle VM > Oracle VM > Oracle VM
Keywords
CPUINFO; HVM; ORACLE VM SERVER; VIRTUALIZATION; ORACLE VM; WINDOWS

Back to top

No comments:

Post a Comment