summaryrefslogtreecommitdiffstats
path: root/nova/context.py
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-06-13 17:57:03 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-06-28 18:20:04 +0100
commit4f4ffc91a8fc28b273660837593d925aa6892efb (patch)
tree6852da338274443a93d4c033e6bb806a28ed6999 /nova/context.py
parentb4abb92b815988a4700313274ac7182f374a2286 (diff)
downloadnova-4f4ffc91a8fc28b273660837593d925aa6892efb.tar.gz
nova-4f4ffc91a8fc28b273660837593d925aa6892efb.tar.xz
nova-4f4ffc91a8fc28b273660837593d925aa6892efb.zip
Allow specification of the libvirt guest CPU model per host
Currently Nova does not configure any CPU model for libvirt guests. This is sub-optimal because the default KVM CPU model has changed a number of times, and more importantly VMs are not able to take advantage of many performance features in newer CPUs. To get a consistent CPU model exposed to the guest and maximize performance of VMs in the cloud, explicit specification of CPU models per host is desirable. This change adds a new Nova config flag: libvirt_cpu_mode = host-model|host-passthrough|custom Where * host-model == configure a model that matches the features available in the host CPU * host-passthrough == passthrough the host CPU precisely with no change at all * custom == configure a specific named CPU model If the 'custom' mode is used, then the additional flag is available to choose the model: libvirt_cpu_model = <one of the names from /usr/share/libvirt/cpu_model.xml> eg libvirt_cpu_model = core2duo If specifying a custom CPU model, it is wise to choose one that is capable of running on all the various different Nova hosts in the cloud. That said, libvirt will enforce compatibility at time of starting or migrating guests & refuse the operation if required. If using either the host-model or host-passthrough modes, and use of live migration is desired, admins should ensure that all hosts have a homogeneous CPU model. If hosts have a hetergeneous CPU models, then a custom named CPU model is a better choice This configuration only works for libvirt >= 0.9.10, due to the use of the 'mode' attribute on the <cpu> element for configuring host models. Fixes: bug #1003373 Implements: blueprint libvirt-xml-cpu-model Change-Id: I90ce78d7e29bd0d563e3bc547b7cc5d64dd9496e Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'nova/context.py')
0 files changed, 0 insertions, 0 deletions