6wind-virtual-accelerator-plugin: add option for cpu host emulation
This patch adds an option to enable/disable the cpu host emulation for guests. Signed-off-by: Francesco Santoro <francesco.santoro@6wind.com> Change-Id: I8826b3662069368ce2dff30bb45558595d08ba63 (cherry picked from commit fa106a27358d9517676f9cad0eba339a6fe7498f) Signed-off-by: Francesco Santoro <francesco.santoro@6wind.com>
This commit is contained in:
parent
c2d0bffaef
commit
51b6fcd8b3
|
@ -15,6 +15,7 @@ class virtual_accelerator {
|
|||
$vm_mem = $settings['vm_mem']
|
||||
$va_conf_file = ''
|
||||
$disable_ipset = $settings['disable_ipset']
|
||||
$enable_host_cpu = $settings['enable_host_cpu']
|
||||
|
||||
if $settings['va_conf_file'] {
|
||||
$va_conf_file = $settings['va_conf_file'][content]
|
||||
|
|
|
@ -4,6 +4,14 @@
|
|||
class virtual_accelerator::service inherits virtual_accelerator {
|
||||
|
||||
$NOVA_CONF_FILE = "/etc/nova/nova.conf"
|
||||
$enable_host_cpu = $virtual_accelerator::enable_host_cpu
|
||||
|
||||
if $enable_host_cpu == true {
|
||||
exec { 'cpu_host':
|
||||
command => "crudini --set ${NOVA_CONF_FILE} libvirt cpu_mode host-passthrough",
|
||||
notify => Exec['vcpu_pin'],
|
||||
}
|
||||
}
|
||||
|
||||
exec { 'vcpu_pin':
|
||||
command => "crudini --set ${NOVA_CONF_FILE} DEFAULT vcpu_pin_set $(python /usr/local/bin/get_vcpu_pin_set.py)",
|
||||
|
|
|
@ -80,6 +80,17 @@ Note, default libvirt and qemu packages on MOS 7.0 do not have all the features
|
|||
required for proper 6WIND Virtual Accelerator integration. Thus we strongly
|
||||
advise to keep the **Use updated external packages** enabled.
|
||||
|
||||
Use cpu host emulation for guests
|
||||
---------------------------------
|
||||
|
||||
Openstack makes possible to launch instances that emulate compute physical
|
||||
(or virtual) CPU. In order to that libvirt should be configured accordingly
|
||||
via the Nova configuration file.
|
||||
|
||||
This plugin offers the possibility to enable/disable such configuration in Nova
|
||||
with a specific option (`Host cpu emulation for guests`) in the advanced
|
||||
parameters.
|
||||
|
||||
Configure hugepages support for virtual machines
|
||||
------------------------------------------------
|
||||
|
||||
|
|
|
@ -61,18 +61,28 @@ attributes:
|
|||
- condition: "settings:6wind-virtual-accelerator.advanced_params_enabled.value == false"
|
||||
action: hide
|
||||
|
||||
disable_ipset:
|
||||
value: true
|
||||
label: 'Disable neutron ipset'
|
||||
description: 'Set/unset support for ipset when using security groups'
|
||||
enable_host_cpu:
|
||||
value: false
|
||||
label: 'Host cpu emulation for guests'
|
||||
description: 'Set/unset host cpu emulation for guests'
|
||||
weight: 75
|
||||
type: "checkbox"
|
||||
restrictions:
|
||||
- condition: "settings:6wind-virtual-accelerator.advanced_params_enabled.value == false"
|
||||
action: hide
|
||||
|
||||
infos:
|
||||
disable_ipset:
|
||||
value: true
|
||||
label: 'Disable neutron ipset'
|
||||
description: 'Set/unset support for ipset when using security groups'
|
||||
weight: 80
|
||||
type: "checkbox"
|
||||
restrictions:
|
||||
- condition: "settings:6wind-virtual-accelerator.advanced_params_enabled.value == false"
|
||||
action: hide
|
||||
|
||||
infos:
|
||||
weight: 90
|
||||
type: "hidden"
|
||||
value: true
|
||||
label: "Important notes:"
|
||||
|
|
Loading…
Reference in New Issue