Update documentation around enabling KVM for POWER architecture

Update "Enable KVM" section under config-reference to reflect
steps to enable KVM based hardware virtualization on POWER platform.

Change-Id: I8d1c4e12b442ab765e0af9b9eef1dc5c9643a748
This commit is contained in:
Deepthi Dharwar 2014-09-25 13:45:11 +05:30
parent 7ab3948e5d
commit 18b5a1e8b0

View File

@ -5,98 +5,142 @@
version="5.0" version="5.0"
xml:id="section_kvm_enable"> xml:id="section_kvm_enable">
<title>Enable KVM</title> <title>Enable KVM</title>
<para>To perform these steps, you must be logged in as the <para>The following sections outline how to enable KVM based
<systemitem>root</systemitem> user.</para> hardware virtualisation on different architectures
<procedure> and platforms. To perform these steps, you must be logged
<step> in as the <systemitem>root</systemitem> user.</para>
<para>To determine whether the <literal>svm</literal> or <section xml:id="x86_based_systems">
<literal>vmx</literal> CPU extensions are present, <title>For x86 based systems</title>
run this command:</para> <procedure>
<screen><prompt>#</prompt> <userinput>grep -E 'svm|vmx' /proc/cpuinfo</userinput></screen> <step>
<para>This command generates output if the CPU is <para>To determine whether the <literal>svm</literal> or
hardware-virtualization capable. Even if output is <literal>vmx</literal> CPU extensions are present,
shown, you might still need to enable virtualization run this command:</para>
in the system BIOS for full support.</para> <screen><prompt>#</prompt> <userinput>grep -E 'svm|vmx' /proc/cpuinfo</userinput></screen>
<para>If no output appears, consult your system <para>This command generates output if the CPU is
documentation to ensure that your CPU and motherboard capable of hardware-virtualization. Even if output is
support hardware virtualization. Verify that any shown, you might still need to enable virtualization
relevant hardware virtualization options are enabled in the system BIOS for full support.</para>
in the system BIOS.</para> <para>If no output appears, consult your system
<para>The BIOS for each manufacturer is different. If you documentation to ensure that your CPU and motherboard
must enable virtualization in the BIOS, look for an support hardware virtualization. Verify that any
option containing the words relevant hardware virtualization options are enabled
in the system BIOS.</para>
<para>The BIOS for each manufacturer is different. If you
must enable virtualization in the BIOS, look for an
option containing the words
<literal>virtualization</literal>, <literal>virtualization</literal>,
<literal>VT</literal>, <literal>VMX</literal>, or <literal>VT</literal>, <literal>VMX</literal>, or
<literal>SVM</literal>.</para> <literal>SVM</literal>.</para>
</step> </step>
<step> <step>
<para>To list the loaded kernel modules and verify that <para>To list the loaded kernel modules and verify that
the <literal>kvm</literal> modules are loaded, run the <literal>kvm</literal> modules are loaded, run
this command:</para> this command:</para>
<screen><prompt>#</prompt> <userinput>lsmod | grep kvm</userinput></screen> <screen><prompt>#</prompt> <userinput>lsmod | grep kvm</userinput></screen>
<para>If the output includes <para>If the output includes
<systemitem>kvm_intel</systemitem> or <systemitem>kvm_intel</systemitem> or
<systemitem>kvm_amd</systemitem>, the <systemitem>kvm_amd</systemitem>, the
<systemitem>kvm</systemitem> hardware <systemitem>kvm</systemitem> hardware
virtualization modules are loaded and your kernel virtualization modules are loaded and your kernel
meets the module requirements for OpenStack meets the module requirements for OpenStack
Compute.</para> Compute.</para>
<para>If the output does not show that the <para>If the output does not show that the
<literal>kvm</literal> module is loaded, run this <literal>kvm</literal> module is loaded, run this
command to load it:</para> command to load it:</para>
<screen><prompt>#</prompt> <userinput>modprobe -a kvm</userinput></screen> <screen><prompt>#</prompt> <userinput>modprobe -a kvm</userinput></screen>
<para>Run the command for your CPU. For Intel, run this <para>Run the command for your CPU. For Intel, run this
command:</para> command:</para>
<screen><prompt>#</prompt> <userinput>modprobe -a kvm-intel</userinput></screen> <screen><prompt>#</prompt> <userinput>modprobe -a kvm-intel</userinput></screen>
<para>For AMD, run this command:</para> <para>For AMD, run this command:</para>
<screen><prompt>#</prompt> <userinput>modprobe -a kvm-amd</userinput></screen> <screen><prompt>#</prompt> <userinput>modprobe -a kvm-amd</userinput></screen>
<para>Because a KVM installation can change user group <para>Because a KVM installation can change user group
membership, you might need to log in again for changes membership, you might need to log in again for changes
to take effect.</para> to take effect.</para>
<para>If the kernel modules do not load automatically, use <para>If the kernel modules do not load automatically, use
the procedures listed in these subsections.</para> the procedures listed in these subsections.</para>
</step> </step>
</procedure> </procedure>
<para>If the checks indicate that required hardware virtualization <para>If the checks indicate that required hardware virtualization
support or kernel modules are disabled or unavailable, you support or kernel modules are disabled or unavailable, you
must either enable this support on the system or find a system must either enable this support on the system or find a system
with this support.</para> with this support.</para>
<note> <note>
<para>Some systems require that you enable VT support in the <para>Some systems require that you enable VT support in the
system BIOS. If you believe your processor supports system BIOS. If you believe your processor supports
hardware acceleration but the previous command did not hardware acceleration but the previous command did not
produce output, reboot your machine, enter the system produce output, reboot your machine, enter the system
BIOS, and enable the VT option.</para> BIOS, and enable the VT option.</para>
</note> </note>
<para>If KVM acceleration is not supported, configure Compute to <para>If KVM acceleration is not supported, configure Compute to
use a different hypervisor, such as <link use a different hypervisor, such as <link
xlink:href="http://docs.openstack.org/trunk/config-reference/content/qemu.html" xlink:href="http://docs.openstack.org/trunk/config-reference/content/qemu.html"
>QEMU</link> or <link >QEMU</link> or <link
xlink:href="http://docs.openstack.org/trunk/config-reference/content/introduction-to-xen.html" xlink:href="http://docs.openstack.org/trunk/config-reference/content/introduction-to-xen.html"
>Xen</link>.</para> >Xen</link>.</para>
<para>These procedures help you load the kernel modules for <para>These procedures help you load the kernel modules for
Intel-based and AMD-based processors if they do not load Intel-based and AMD-based processors if they do not load
automatically during KVM installation.</para> automatically during KVM installation.</para>
<section xml:id="kvm-intel"> <section xml:id="kvm-intel">
<title>Intel-based processors</title> <title>Intel-based processors</title>
<para>If your compute host is Intel-based, run these commands <para>If your compute host is Intel-based, run these commands
as root to load the kernel modules:</para> as root to load the kernel modules:</para>
<screen><prompt>#</prompt> <userinput>modprobe kvm</userinput> <screen><prompt>#</prompt> <userinput>modprobe kvm</userinput>
<prompt>#</prompt> <userinput>modprobe kvm-intel</userinput></screen> <prompt>#</prompt> <userinput>modprobe kvm-intel</userinput></screen>
<para>Add these lines to the <filename>/etc/modules</filename> <para>Add these lines to the <filename>/etc/modules</filename>
file so that these modules load on reboot:</para> file so that these modules load on reboot:</para>
<programlisting>kvm <programlisting>kvm
kvm-intel</programlisting> kvm-intel</programlisting>
</section> </section>
<section xml:id="kvm-amd"> <section xml:id="kvm-amd">
<title>AMD-based processors</title> <title>AMD-based processors</title>
<para>If your compute host is AMD-based, run these commands as <para>If your compute host is AMD-based, run these commands as
root to load the kernel modules:</para> root to load the kernel modules:</para>
<screen><prompt>#</prompt> <userinput>modprobe kvm</userinput> <screen><prompt>#</prompt> <userinput>modprobe kvm</userinput>
<prompt>#</prompt> <userinput>modprobe kvm-amd</userinput></screen> <prompt>#</prompt> <userinput>modprobe kvm-amd</userinput></screen>
<para>Add these lines to <filename>/etc/modules</filename> <para>Add these lines to <filename>/etc/modules</filename>
file so that these modules load on reboot:</para> file so that these modules load on reboot:</para>
<programlisting>kvm <programlisting>kvm
kvm-amd</programlisting> kvm-amd</programlisting>
</section>
</section>
<section xml:id="kvm-on-POWER">
<title>For POWER based systems</title>
<para>KVM as a hypervisor is supported on POWER system's PowerNV
platform.</para>
<procedure>
<step>
<para>To determine if your POWER platform
supports KVM based virtualization run the
following command:</para>
<screen><prompt>#</prompt><userinput>cat /proc/cpuinfo | grep PowerNV</userinput></screen>
<para>If the previous command generates the following output,
then CPU supports KVM based virtualization</para>
<screen><computeroutput>platform: PowerNV</computeroutput></screen>
<para>If no output is displayed, then your POWER platform does not
support KVM based hardware virtualization.</para>
</step>
<step>
<para>To list the loaded kernel modules and verify that
the <literal>kvm</literal> modules are loaded, run
the following command:</para>
<screen><prompt>#</prompt> <userinput>lsmod | grep kvm</userinput></screen>
<para>If the output includes
<systemitem>kvm_hv</systemitem>, the
<systemitem>kvm</systemitem> hardware
virtualization modules are loaded and your kernel
meets the module requirements for OpenStack Compute.</para>
<para>If the output does not show that the
<literal>kvm</literal> module is loaded, run the
following command to load it:</para>
<screen><prompt>#</prompt> <userinput>modprobe -a kvm</userinput></screen>
<para>For PowerNV platform, run the following command:</para>
<screen><prompt>#</prompt> <userinput>modprobe -a kvm-hv</userinput></screen>
<para>Because a KVM installation can change user group
membership, you might need to log in again for changes
to take effect.</para>
</step>
</procedure>
</section> </section>
</section> </section>