Enable live migration between heterogeneous kvm hypervisors.
Modified NovaComputeLibvirtContext in nova_compute_context.py to transclude 'cpu-mode' and 'cpu-model' into nova.conf. Added conditional tags for 'cpu_mode' and 'cpu_model' to the havana, icehouse, juno, and kilo nova.conf templates. Added 'cpu-mode' and 'cpu-model' string params and descriptions to config.yaml. Fixes Bug #1499611
This commit is contained in:
parent
0d6ad4872a
commit
efdc35cfaa
16
config.yaml
16
config.yaml
|
@ -211,6 +211,22 @@ options:
|
|||
order for this charm to function correctly, the privacy extension must be
|
||||
disabled and a non-temporary address must be configured/available on
|
||||
your network interface.
|
||||
cpu-mode:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
Set to 'host-model' to clone the host CPU feature flags; to
|
||||
'host-passthrough' to use the host CPU model exactly; to 'custom' to
|
||||
use a named CPU model; to 'none' to not set any CPU model. If
|
||||
virt_type='kvm|qemu', it will default to 'host-model', otherwise it will
|
||||
default to 'none'.
|
||||
cpu-model:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
Set to a named libvirt CPU model (see names listed in
|
||||
/usr/share/libvirt/cpu_map.xml). Only has effect if cpu_mode='custom' and
|
||||
virt_type='kvm|qemu'.
|
||||
# Storage configuration options
|
||||
libvirt-image-backend:
|
||||
type: string
|
||||
|
|
|
@ -124,6 +124,12 @@ class NovaComputeLibvirtContext(context.OSContextGenerator):
|
|||
if config('disk-cachemodes'):
|
||||
ctxt['disk_cachemodes'] = config('disk-cachemodes')
|
||||
|
||||
if config('cpu-mode'):
|
||||
ctxt['cpu_mode'] = config('cpu-mode')
|
||||
|
||||
if config('cpu-model'):
|
||||
ctxt['cpu_model'] = config('cpu-model')
|
||||
|
||||
if config('hugepages'):
|
||||
ctxt['hugepages'] = True
|
||||
|
||||
|
|
|
@ -128,6 +128,12 @@ server_proxyclient_address = {{ console_listen_addr }}
|
|||
{% endif -%}
|
||||
|
||||
[libvirt]
|
||||
{% if cpu_mode -%}
|
||||
cpu_mode = {{ cpu_mode }}
|
||||
{% endif -%}
|
||||
{% if cpu_model -%}
|
||||
cpu_model = {{ cpu_model }}
|
||||
{% endif -%}
|
||||
{% if libvirt_images_type -%}
|
||||
images_type = {{ libvirt_images_type }}
|
||||
images_rbd_pool = {{ rbd_pool }}
|
||||
|
|
|
@ -146,6 +146,12 @@ server_proxyclient_address = {{ console_listen_addr }}
|
|||
{% endif -%}
|
||||
|
||||
[libvirt]
|
||||
{% if cpu_mode -%}
|
||||
cpu_mode = {{ cpu_mode }}
|
||||
{% endif -%}
|
||||
{% if cpu_model -%}
|
||||
cpu_model = {{ cpu_model }}
|
||||
{% endif -%}
|
||||
{% if libvirt_images_type -%}
|
||||
images_type = {{ libvirt_images_type }}
|
||||
images_rbd_pool = {{ rbd_pool }}
|
||||
|
|
|
@ -142,6 +142,12 @@ server_proxyclient_address = {{ console_listen_addr }}
|
|||
{% endif -%}
|
||||
|
||||
[libvirt]
|
||||
{% if cpu_mode -%}
|
||||
cpu_mode = {{ cpu_mode }}
|
||||
{% endif -%}
|
||||
{% if cpu_model -%}
|
||||
cpu_model = {{ cpu_model }}
|
||||
{% endif -%}
|
||||
{% if libvirt_images_type -%}
|
||||
images_type = {{ libvirt_images_type }}
|
||||
images_rbd_pool = {{ rbd_pool }}
|
||||
|
|
|
@ -147,6 +147,12 @@ server_proxyclient_address = {{ console_listen_addr }}
|
|||
{% endif -%}
|
||||
|
||||
[libvirt]
|
||||
{% if cpu_mode -%}
|
||||
cpu_mode = {{ cpu_mode }}
|
||||
{% endif -%}
|
||||
{% if cpu_model -%}
|
||||
cpu_model = {{ cpu_model }}
|
||||
{% endif -%}
|
||||
{% if libvirt_images_type -%}
|
||||
images_type = {{ libvirt_images_type }}
|
||||
images_rbd_pool = {{ rbd_pool }}
|
||||
|
|
Loading…
Reference in New Issue