Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lu Xu
slapos
Commits
7b399f95
Commit
7b399f95
authored
Jan 10, 2019
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kvm: fix some parameters propagation, update parameter schema
parent
f38436a9
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
18 deletions
+19
-18
software/kvm/instance-kvm-cluster-input-schema.json
software/kvm/instance-kvm-cluster-input-schema.json
+2
-2
software/kvm/instance-kvm-cluster.cfg.jinja2.in
software/kvm/instance-kvm-cluster.cfg.jinja2.in
+1
-1
software/kvm/instance-kvm-input-schema.json
software/kvm/instance-kvm-input-schema.json
+4
-2
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+5
-6
software/kvm/software.cfg
software/kvm/software.cfg
+4
-4
software/kvm/template/kvm-controller-run.in
software/kvm/template/kvm-controller-run.in
+2
-2
software/kvm/template/template-kvm-run.in
software/kvm/template/template-kvm-run.in
+1
-1
No files found.
software/kvm/instance-kvm-cluster-input-schema.json
View file @
7b399f95
...
@@ -242,8 +242,8 @@
...
@@ -242,8 +242,8 @@
"minimum"
:
1
"minimum"
:
1
},
},
"disk-format"
:
{
"disk-format"
:
{
"title"
:
"
Type of external disk drive to create by QEMU
."
,
"title"
:
"
Disk format
."
,
"description"
:
"
Type
of QEMU disk drive, to create."
,
"description"
:
"
Format
of QEMU disk drive, to create."
,
"type"
:
"string"
,
"type"
:
"string"
,
"default"
:
"qcow2"
,
"default"
:
"qcow2"
,
"enum"
:
[
"enum"
:
[
...
...
software/kvm/instance-kvm-cluster.cfg.jinja2.in
View file @
7b399f95
...
@@ -74,7 +74,7 @@ config-cpu-max-count = {{ dumps(kvm_parameter_dict.get('cpu-max-count', 24)) }}
...
@@ -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)) }}
config-auto-ballooning = {{ dumps(kvm_parameter_dict.get('auto-ballooning', True)) }}
{{ setconfig('disk-cache', kvm_parameter_dict.get('disk-cache', '')) }}
{{ setconfig('disk-cache', kvm_parameter_dict.get('disk-cache', '')) }}
{{ setconfig('disk-aio', kvm_parameter_dict.get('disk-aio', '')) }}
{{ 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-cache', kvm_parameter_dict.get('disk-cache', '')) }}
{{ setconfig('disk-device-path', kvm_parameter_dict.get('disk-device-path', '')) }}
{{ setconfig('disk-device-path', kvm_parameter_dict.get('disk-device-path', '')) }}
...
...
software/kvm/instance-kvm-input-schema.json
View file @
7b399f95
...
@@ -126,7 +126,8 @@
...
@@ -126,7 +126,8 @@
"cpu-model"
:
{
"cpu-model"
:
{
"title"
:
"CPU model."
,
"title"
:
"CPU model."
,
"description"
:
"Select the emulated CPU model. Ex: SandyBridge,+erms,+smep,+smx,+vmx"
,
"description"
:
"Select the emulated CPU model. Ex: SandyBridge,+erms,+smep,+smx,+vmx"
,
"type"
:
"string"
"type"
:
"string"
,
"default"
:
"host"
},
},
"keyboard-layout-language"
:
{
"keyboard-layout-language"
:
{
"title"
:
"Use keyboard layout language"
,
"title"
:
"Use keyboard layout language"
,
...
@@ -166,7 +167,8 @@
...
@@ -166,7 +167,8 @@
"sv"
,
"sv"
,
"th"
,
"th"
,
"tr"
"tr"
]
],
"default"
:
"fr"
},
},
"nbd-host"
:
{
"nbd-host"
:
{
"title"
:
"NBD hostname"
,
"title"
:
"NBD hostname"
,
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
7b399f95
...
@@ -154,7 +154,7 @@ disk-cache = ${slap-parameter:disk-cache}
...
@@ -154,7 +154,7 @@ disk-cache = ${slap-parameter:disk-cache}
disk-aio = ${slap-parameter:disk-aio}
disk-aio = ${slap-parameter:disk-aio}
auto-ballooning = ${slap-parameter:auto-ballooning}
auto-ballooning = ${slap-parameter:auto-ballooning}
machine-options = ${slap-parameter:machine-options}
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
log-file = ${directory:log}/qemu.log
...
@@ -470,8 +470,8 @@ ipv4-network-info =
...
@@ -470,8 +470,8 @@ ipv4-network-info =
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv6-addr', '') != "" -%}
ipv6-network-info =
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.
Use these configurations below to configure IPv6 on interface {{ iface }} in your VM.
IFACE={{ iface }}
IFACE={{ iface }}
${network-config-ipv6:ipv6-add-address}
${network-config-ipv6:ipv6-add-address}
...
@@ -502,8 +502,8 @@ command =
...
@@ -502,8 +502,8 @@ command =
#!/bin/sh
#!/bin/sh
IFACE={{ iface }}
IFACE={{ iface }}
#try to be compatible with OS with old names
#try to be compatible with OS with old names
grep eth0 /etc/network/interfaces &> /dev/null
&& [ \$IFACE = ens3 ] && IFACE=eth0
ip a | grep eth0:
&& [ \$IFACE = ens3 ] && IFACE=eth0
grep eth1 /etc/network/interfaces &> /dev/null
&& [ \$IFACE = ens4 ] && IFACE=eth1
ip a | grep eth1:
&& [ \$IFACE = ens4 ] && IFACE=eth1
${:ifconfig}
${:ifconfig}
${:route-iface}
${:route-iface}
${:route-network}
${:route-network}
...
@@ -619,7 +619,6 @@ template = {{ ansible_promise_tpl }}
...
@@ -619,7 +619,6 @@ template = {{ ansible_promise_tpl }}
rendered = ${directory:promises}/ansible_{{ name }}
rendered = ${directory:promises}/ansible_{{ name }}
extensions = jinja2.ext.do
extensions = jinja2.ext.do
context =
context =
key host {{ slap_configuration.get('tap-ipv4-addr', '') }}
raw logs ${directory:public}/ansible
raw logs ${directory:public}/ansible
raw name {{ name }}
raw name {{ name }}
...
@@ -661,7 +660,7 @@ disk-cache = writeback
...
@@ -661,7 +660,7 @@ disk-cache = writeback
disk-aio = native
disk-aio = native
auto-ballooning = True
auto-ballooning = True
machine-options =
machine-options =
cpu-model =
cpu-model =
host
nat-rules = 22 80 443
nat-rules = 22 80 443
use-nat = True
use-nat = True
...
...
software/kvm/software.cfg
View file @
7b399f95
...
@@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download
...
@@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
mode = 644
md5sum =
bc7e721577715ae777a963bbe3c3623d
md5sum =
8ad61964dc1f6df9c7503d67f629bb9e
download-only = true
download-only = true
on-update = true
on-update = true
...
@@ -108,7 +108,7 @@ recipe = hexagonit.recipe.download
...
@@ -108,7 +108,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm-cluster.cfg.jinja2.in
url = ${:_profile_base_location_}/instance-kvm-cluster.cfg.jinja2.in
mode = 644
mode = 644
md5sum =
0a3e8fa290b78fa92367c9167077f520
md5sum =
63fa784d8946d0b6e3fbd6381e1ea9f4
download-only = true
download-only = true
on-update = true
on-update = true
...
@@ -186,7 +186,7 @@ ignore-existing = true
...
@@ -186,7 +186,7 @@ ignore-existing = true
url = ${:_profile_base_location_}/template/template-kvm-run.in
url = ${:_profile_base_location_}/template/template-kvm-run.in
mode = 644
mode = 644
filename = template-kvm-run.in
filename = template-kvm-run.in
md5sum =
8d681430f03ae4d35fc64b1625653a22
md5sum =
9e40246b4bc4f968f0631016c939b014
download-only = true
download-only = true
on-update = true
on-update = true
...
@@ -196,7 +196,7 @@ ignore-existing = true
...
@@ -196,7 +196,7 @@ ignore-existing = true
url = ${:_profile_base_location_}/template/kvm-controller-run.in
url = ${:_profile_base_location_}/template/kvm-controller-run.in
mode = 644
mode = 644
filename = kvm-controller-run.in
filename = kvm-controller-run.in
md5sum =
c86cd67bbdd26b7b14b7449a1bbd959b
md5sum =
b96cba47c97f277c857176d69e086a12
download-only = true
download-only = true
on-update = true
on-update = true
...
...
software/kvm/template/kvm-controller-run.in
View file @
7b399f95
...
@@ -15,7 +15,7 @@ pid_file = '{{ parameter_dict.get("pid-file") }}'
...
@@ -15,7 +15,7 @@ pid_file = '{{ parameter_dict.get("pid-file") }}'
vnc_password = '{{ parameter_dict.get("vnc-passwd") }}'
vnc_password = '{{ parameter_dict.get("vnc-passwd") }}'
status_path = '{{ parameter_dict.get("kvm-status-path") }}'
status_path = '{{ parameter_dict.get("kvm-status-path") }}'
cpu_amount = {{ parameter_dict.get("cpu-count") }}
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) }}
slot_hotplug_size = {{ parameter_dict.get("ram-hotplug-slot-size", 512) }}
ram_size = {{ parameter_dict.get("ram-size") }}
ram_size = {{ parameter_dict.get("ram-size") }}
enable_device_hotplug = '{{ parameter_dict.get("enable-device-hotplug") }}'.lower()
enable_device_hotplug = '{{ parameter_dict.get("enable-device-hotplug") }}'.lower()
...
@@ -48,7 +48,7 @@ def update():
...
@@ -48,7 +48,7 @@ def update():
qemu_wrapper.updateDevice({
qemu_wrapper.updateDevice({
'device': 'cpu',
'device': 'cpu',
'amount': cpu_amount,
'amount': cpu_amount,
'model': cpu_model
'model':
"%s-x86_64-cpu" %
cpu_model
})
})
qemu_wrapper.updateDevice({
qemu_wrapper.updateDevice({
'device': 'memory',
'device': 'memory',
...
...
software/kvm/template/template-kvm-run.in
View file @
7b399f95
...
@@ -88,7 +88,7 @@ if disk_device_path.startswith("/dev/"):
...
@@ -88,7 +88,7 @@ if disk_device_path.startswith("/dev/"):
smp_count = {{ parameter_dict.get("smp-count") }}
smp_count = {{ parameter_dict.get("smp-count") }}
smp_max_count = {{ parameter_dict.get("smp-max-count") }}
smp_max_count = {{ parameter_dict.get("smp-max-count") }}
machine_options = '{{ parameter_dict.get("machine-options", "") }}'.strip()
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()
enable_device_hotplug = '{{ parameter_dict.get("enable-device-hotplug") }}'.lower()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment