mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-867. DOC. Incorporate reviewer comments on dynamic CPU and RAM scaling for running VMs.
This commit is contained in:
parent
683228cdc7
commit
2796f01eae
|
|
@ -22,18 +22,46 @@
|
|||
-->
|
||||
|
||||
<section id="best-practices-vm">
|
||||
<title>Best Practices for Virtual Machines</title>
|
||||
<para>The &PRODUCT; administrator should monitor the total number of VM instances in each
|
||||
cluster, and disable allocation to the cluster if the total is approaching the maximum that
|
||||
the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of
|
||||
one or more hosts failing, which would increase the VM load on the other hosts as the VMs
|
||||
are automatically redeployed. Consult the documentation for your chosen hypervisor to find
|
||||
the maximum permitted number of VMs per host, then use &PRODUCT; global configuration
|
||||
settings to set this as the default limit. Monitor the VM activity in each cluster at all
|
||||
times. Keep the total number of VMs below a safe level that allows for the occasional host
|
||||
failure. For example, if there are N hosts in the cluster, and you want to allow for one
|
||||
host in the cluster to be down at any given time, the total number of VM instances you can
|
||||
permit in the cluster is at most (N-1) * (per-host-limit). Once a cluster reaches this
|
||||
number of VMs, use the &PRODUCT; UI to disable allocation of more VMs to the
|
||||
cluster.</para>
|
||||
<title>Best Practices for Virtual Machines</title>
|
||||
<para>For VMs to work as expected and provide excellent service, follow these guidelines.</para>
|
||||
<section id="best-practices-vm-monitoring">
|
||||
<title>Monitor VMs for Max Capacity</title>
|
||||
<para>The &PRODUCT; administrator should monitor the total number of VM instances in each
|
||||
cluster, and disable allocation to the cluster if the total is approaching the maximum that
|
||||
the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of
|
||||
one or more hosts failing, which would increase the VM load on the other hosts as the VMs
|
||||
are automatically redeployed. Consult the documentation for your chosen hypervisor to find
|
||||
the maximum permitted number of VMs per host, then use &PRODUCT; global configuration
|
||||
settings to set this as the default limit. Monitor the VM activity in each cluster at all
|
||||
times. Keep the total number of VMs below a safe level that allows for the occasional host
|
||||
failure. For example, if there are N hosts in the cluster, and you want to allow for one
|
||||
host in the cluster to be down at any given time, the total number of VM instances you can
|
||||
permit in the cluster is at most (N-1) * (per-host-limit). Once a cluster reaches this
|
||||
number of VMs, use the &PRODUCT; UI to disable allocation of more VMs to the
|
||||
cluster.</para>
|
||||
</section>
|
||||
<section id="best-practices-vm-tools">
|
||||
<title>Install Required Tools and Drivers</title>
|
||||
<para>Be sure the following are installed on each VM:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>For XenServer, install PV drivers and Xen tools on each VM.
|
||||
This will enable live migration and clean guest shutdown.
|
||||
Xen tools are required in order for dynamic CPU and RAM scaling to work.</para></listitem>
|
||||
<listitem><para>For vSphere, install VMware Tools on each VM.
|
||||
This will enable console view to work properly.
|
||||
VMware Tools are required in order for dynamic CPU and RAM scaling to work.</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>To be sure that Xen tools or VMware Tools is installed, use one of the following techniques:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>Create each VM from a template that already has the tools installed; or,</para></listitem>
|
||||
<listitem><para>When registering a new template, the administrator or user can indicate whether tools are
|
||||
installed on the template. This can be done through the UI
|
||||
or using the updateTemplate API; or,</para></listitem>
|
||||
<listitem><para>If a user deploys a virtual machine with a template that does not have
|
||||
Xen tools or VMware Tools, and later installs the tools on the VM,
|
||||
then the user can inform &PRODUCT; using the updateVirtualMachine API.
|
||||
After installing the tools and updating the virtual machine, stop
|
||||
and start the VM.</para></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -23,13 +23,14 @@
|
|||
-->
|
||||
<section id="changing-service-offering-for-vm">
|
||||
<title>Changing the Service Offering for a VM</title>
|
||||
<para>To upgrade or downgrade the level of compute resources available to a virtual machine, you can change the VM's compute offering.</para>
|
||||
<orderedlist>
|
||||
<listitem><para>Log in to the &PRODUCT; UI as a user or admin.</para></listitem>
|
||||
<listitem><para>In the left navigation, click Instances.</para></listitem>
|
||||
<listitem><para>Choose the VM that you want to work with.</para></listitem>
|
||||
<listitem><para>(Skip this step if you have enabled dynamic VM scaling; see <xref linkend="change-cpu-ram-for-vm"/>.)</para>
|
||||
<para>Click the Stop button to stop the VM.<inlinemediaobject>
|
||||
<para>To upgrade or downgrade the level of compute resources available to a virtual machine, you can change the VM's compute offering.</para>
|
||||
<orderedlist>
|
||||
<listitem><para>Log in to the &PRODUCT; UI as a user or admin.</para></listitem>
|
||||
<listitem><para>In the left navigation, click Instances.</para></listitem>
|
||||
<listitem><para>Choose the VM that you want to work with.</para></listitem>
|
||||
<listitem><para>(Skip this step if you have enabled dynamic VM scaling; see <xref linkend="change-cpu-ram-for-vm"/>.)</para>
|
||||
<para>Click the Stop button to stop the VM.
|
||||
<inlinemediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/stop-instance-icon.png"/>
|
||||
</imageobject>
|
||||
|
|
@ -37,48 +38,71 @@
|
|||
<phrase>StopButton.png: button to stop a VM</phrase>
|
||||
</textobject>
|
||||
</inlinemediaobject>
|
||||
</para></listitem>
|
||||
<listitem><para>Click the Change Service button.<inlinemediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/change-service-icon.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>ChangeServiceButton.png: button to change the service of a
|
||||
VM</phrase>
|
||||
</textobject>
|
||||
</inlinemediaobject></para>
|
||||
<para>The Change service dialog box is displayed.</para></listitem>
|
||||
<listitem><para>Select the offering you want to apply to the selected VM.</para></listitem>
|
||||
<listitem><para>Click OK.</para></listitem>
|
||||
</orderedlist>
|
||||
</para></listitem>
|
||||
<listitem><para>Click the Change Service button.<inlinemediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/change-service-icon.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>ChangeServiceButton.png: button to change the service of a
|
||||
VM</phrase>
|
||||
</textobject>
|
||||
</inlinemediaobject></para>
|
||||
<para>The Change service dialog box is displayed.</para></listitem>
|
||||
<listitem><para>Select the offering you want to apply to the selected VM.</para></listitem>
|
||||
<listitem><para>Click OK.</para></listitem>
|
||||
</orderedlist>
|
||||
<section id="change-cpu-ram-for-vm">
|
||||
<!-- CLOUDSTACK-658 -->
|
||||
<!-- CS-17394 -->
|
||||
<title>CPU and Memory Scaling for Running VMs</title>
|
||||
<para>(Supported on VMware and XenServer)</para>
|
||||
<para>It is not always possible to accurately predict the CPU and RAM requirements
|
||||
when you first deploy a VM.
|
||||
You might need to increase or decrease these resources at any time during the life of a VM.
|
||||
You might need to increase these resources at any time during the life of a VM.
|
||||
You can dynamically modify CPU and RAM levels to
|
||||
change these resources for a running VM without incurring any downtime.</para>
|
||||
scale up these resources for a running VM without incurring any downtime.</para>
|
||||
<para>Dynamic CPU and RAM scaling can be used in the following cases:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>New VMs that are created
|
||||
after the installation of &PRODUCT; 4.2.
|
||||
If you are upgrading from a previous version of &PRODUCT;,
|
||||
your existing VMs created with previous versions
|
||||
will not have the dynamic scaling capability.</para>
|
||||
</listitem>
|
||||
<listitem><para>User VMs on hosts running VMware and XenServer.</para></listitem>
|
||||
<listitem><para>System VMs on VMware.</para></listitem>
|
||||
<listitem><para>VM Tools or XenServer Tools must be installed on the virtual machine.</para></listitem>
|
||||
<listitem><para>VMware Tools or XenServer Tools must be installed on the virtual machine.</para></listitem>
|
||||
<listitem><para>The new requested CPU and RAM values must be within the constraints allowed by the hypervisor
|
||||
and the VM operating system.</para></listitem>
|
||||
<listitem><para>New VMs that are created
|
||||
after the installation of &PRODUCT; 4.2
|
||||
can use the dynamic scaling feature.
|
||||
If you are upgrading from a previous version of &PRODUCT;,
|
||||
your existing VMs created with previous versions
|
||||
will not have the dynamic scaling capability
|
||||
unless you update them using the following procedure.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id="update-vms">
|
||||
<title>Updating Existing VMs</title>
|
||||
<para>If you are upgrading from a previous version of &PRODUCT;,
|
||||
and you want your existing VMs created with previous versions
|
||||
to have the dynamic scaling capability,
|
||||
update the VMs using the following steps:</para>
|
||||
<orderedlist>
|
||||
<listitem><para>Make sure the zone-level setting "dynamic scalable" is set to true.</para></listitem>
|
||||
<listitem><para>Install Xen tools (for XenServer hosts) or VMware Tools (for VMware hosts) on each VM
|
||||
if they are not already installed.</para></listitem>
|
||||
<listitem><para>Stop the VM.</para></listitem>
|
||||
<listitem><para>Click the isDynamic Scaling checkbox.</para></listitem>
|
||||
<listitem><para>Restart the VM.</para></listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
<section id="configure-dynamic-scaling">
|
||||
<title>Configuring Dynamic CPU and RAM Scaling</title>
|
||||
<para>To configure this feature, use the following new global configuration variables:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>enable.dynamic.scale.vm: Set to True to enable the feature. By default, the feature is turned off.</para></listitem>
|
||||
<listitem><para>scale.retry: How many times to attempt the scaling operation. Default = 2.</para></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id="dynamic-scaling-howto">
|
||||
<title>How to Dynamically Scale CPU and RAM</title>
|
||||
<para>To modify the CPU and/or RAM capacity of a virtual machine,
|
||||
you need to change
|
||||
the compute offering of the VM to a new compute offering that has the
|
||||
|
|
@ -92,8 +116,29 @@
|
|||
If there is no host in the cluster that can fulfill the requested level of CPU and RAM,
|
||||
the scaling operation will fail.
|
||||
The VM will continue to run as it was before.</para>
|
||||
<warning><para>&PRODUCT; will not check to be sure that the new CPU and RAM levels are compatible
|
||||
with the OS running on the VM.</para></warning>
|
||||
</section>
|
||||
<section id="dynamic-scaling-limitations">
|
||||
<title>Limitations</title>
|
||||
<itemizedlist>
|
||||
<listitem><para>You can not do dynamic scaling for system VMs on XenServer.</para></listitem>
|
||||
<listitem><para>&PRODUCT; will not check to be sure that the new CPU and RAM levels are compatible
|
||||
with the OS running on the VM.</para></listitem>
|
||||
<listitem><para>When scaling memory or CPU for a Linux VM on VMware, you might
|
||||
need to run scripts in addition to the other steps mentioned above.
|
||||
For more information, see
|
||||
<ulink url="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012764">Hot adding memory in Linux (1012764)</ulink>
|
||||
in the VMware Knowledge Base.</para></listitem>
|
||||
<listitem><para>(VMware) If resources are not available on the current host,
|
||||
scaling up will fail on VMware because of a known issue where &PRODUCT; and vCenter calculate the available capacity differently.
|
||||
For more information, see
|
||||
<ulink url="https://issues.apache.org/jira/browse/CLOUDSTACK-1809">https://issues.apache.org/jira/browse/CLOUDSTACK-1809</ulink>.</para></listitem>
|
||||
<listitem><para>On VMs running Linux 64-bit and Windows 7 32-bit operating systems,
|
||||
if the VM is initially assigned a RAM of less than 3 GB,
|
||||
it can be dynamically scaled up to 3 GB, but not more.
|
||||
This is due to a known issue with these operating systems, which will freeze
|
||||
if an attempt is made to dynamically scale from less than 3 GB to more than 3 GB.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue