Commit 7b399f95 authored by Alain Takoudjou's avatar Alain Takoudjou

kvm: fix some parameters propagation, update parameter schema

parent f38436a9
No related merge requests found
......@@ -242,8 +242,8 @@
"minimum": 1
},
"disk-format": {
"title": "Type of external disk drive to create by QEMU.",
"description": "Type of QEMU disk drive, to create.",
"title": "Disk format.",
"description": "Format of QEMU disk drive, to create.",
"type": "string",
"default": "qcow2",
"enum": [
......
......@@ -74,7 +74,7 @@ config-cpu-max-count = {{ dumps(kvm_parameter_dict.get('cpu-max-count', 24)) }}
config-auto-ballooning = {{ dumps(kvm_parameter_dict.get('auto-ballooning', True)) }}
{{ setconfig('disk-cache', kvm_parameter_dict.get('disk-cache', '')) }}
{{ setconfig('disk-aio', kvm_parameter_dict.get('disk-aio', '')) }}
{{ setconfig('cpu-model', kvm_parameter_dict.get('cpu-model', '')) }}
{{ setconfig('cpu-model', kvm_parameter_dict.get('cpu-model', 'host')) }}
{{ setconfig('disk-cache', kvm_parameter_dict.get('disk-cache', '')) }}
{{ setconfig('disk-device-path', kvm_parameter_dict.get('disk-device-path', '')) }}
......
......@@ -126,7 +126,8 @@
"cpu-model": {
"title": "CPU model.",
"description": "Select the emulated CPU model. Ex: SandyBridge,+erms,+smep,+smx,+vmx",
"type": "string"
"type": "string",
"default": "host"
},
"keyboard-layout-language": {
"title": "Use keyboard layout language",
......@@ -166,7 +167,8 @@
"sv",
"th",
"tr"
]
],
"default": "fr"
},
"nbd-host": {
"title": "NBD hostname",
......
......@@ -154,7 +154,7 @@ disk-cache = ${slap-parameter:disk-cache}
disk-aio = ${slap-parameter:disk-aio}
auto-ballooning = ${slap-parameter:auto-ballooning}
machine-options = ${slap-parameter:machine-options}
cpu-hotplug-slot-size = ${slap-parameter:cpu-model}
cpu-model = ${slap-parameter:cpu-model}
log-file = ${directory:log}/qemu.log
......@@ -470,8 +470,8 @@ ipv4-network-info =
{% endif %}
{% endif %}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv6-addr', '') != "" -%}
ipv6-network-info =
{% if use_tap == 'true' and slap_configuration.get('tap-ipv6-addr', '') != "" -%}
Use these configurations below to configure IPv6 on interface {{ iface }} in your VM.
IFACE={{ iface }}
${network-config-ipv6:ipv6-add-address}
......@@ -502,8 +502,8 @@ command =
#!/bin/sh
IFACE={{ iface }}
#try to be compatible with OS with old names
grep eth0 /etc/network/interfaces &> /dev/null && [ \$IFACE = ens3 ] && IFACE=eth0
grep eth1 /etc/network/interfaces &> /dev/null && [ \$IFACE = ens4 ] && IFACE=eth1
ip a | grep eth0: && [ \$IFACE = ens3 ] && IFACE=eth0
ip a | grep eth1: && [ \$IFACE = ens4 ] && IFACE=eth1
${:ifconfig}
${:route-iface}
${:route-network}
......@@ -619,7 +619,6 @@ template = {{ ansible_promise_tpl }}
rendered = ${directory:promises}/ansible_{{ name }}
extensions = jinja2.ext.do
context =
key host {{ slap_configuration.get('tap-ipv4-addr', '') }}
raw logs ${directory:public}/ansible
raw name {{ name }}
......@@ -661,7 +660,7 @@ disk-cache = writeback
disk-aio = native
auto-ballooning = True
machine-options =
cpu-model =
cpu-model = host
nat-rules = 22 80 443
use-nat = True
......
......@@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
md5sum = bc7e721577715ae777a963bbe3c3623d
md5sum = 8ad61964dc1f6df9c7503d67f629bb9e
download-only = true
on-update = true
......@@ -108,7 +108,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm-cluster.cfg.jinja2.in
mode = 644
md5sum = 0a3e8fa290b78fa92367c9167077f520
md5sum = 63fa784d8946d0b6e3fbd6381e1ea9f4
download-only = true
on-update = true
......@@ -186,7 +186,7 @@ ignore-existing = true
url = ${:_profile_base_location_}/template/template-kvm-run.in
mode = 644
filename = template-kvm-run.in
md5sum = 8d681430f03ae4d35fc64b1625653a22
md5sum = 9e40246b4bc4f968f0631016c939b014
download-only = true
on-update = true
......@@ -196,7 +196,7 @@ ignore-existing = true
url = ${:_profile_base_location_}/template/kvm-controller-run.in
mode = 644
filename = kvm-controller-run.in
md5sum = c86cd67bbdd26b7b14b7449a1bbd959b
md5sum = b96cba47c97f277c857176d69e086a12
download-only = true
on-update = true
......
......@@ -15,7 +15,7 @@ pid_file = '{{ parameter_dict.get("pid-file") }}'
vnc_password = '{{ parameter_dict.get("vnc-passwd") }}'
status_path = '{{ parameter_dict.get("kvm-status-path") }}'
cpu_amount = {{ parameter_dict.get("cpu-count") }}
cpu_model = '{{ parameter_dict.get("cpu-model", "qemu64-x86_64-cpu") }}'
cpu_model = '{{ parameter_dict.get("cpu-model", "qemu64") }}'
slot_hotplug_size = {{ parameter_dict.get("ram-hotplug-slot-size", 512) }}
ram_size = {{ parameter_dict.get("ram-size") }}
enable_device_hotplug = '{{ parameter_dict.get("enable-device-hotplug") }}'.lower()
......@@ -48,7 +48,7 @@ def update():
qemu_wrapper.updateDevice({
'device': 'cpu',
'amount': cpu_amount,
'model': cpu_model
'model': "%s-x86_64-cpu" % cpu_model
})
qemu_wrapper.updateDevice({
'device': 'memory',
......
......@@ -88,7 +88,7 @@ if disk_device_path.startswith("/dev/"):
smp_count = {{ parameter_dict.get("smp-count") }}
smp_max_count = {{ parameter_dict.get("smp-max-count") }}
machine_options = '{{ parameter_dict.get("machine-options", "") }}'.strip()
cpu_model = '{{ parameter_dict.get("cpu-model", "host") }}'.strip()
cpu_model = '{{ parameter_dict.get("cpu-model") }}'.strip()
enable_device_hotplug = '{{ parameter_dict.get("enable-device-hotplug") }}'.lower()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment