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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alain Takoudjou
slapos
Commits
7b399f95
Commit
7b399f95
authored
5 years ago
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kvm: fix some parameters propagation, update parameter schema
parent
f38436a9
No related merge requests found
Changes
7
Hide 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 @@
"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"
:
[
...
...
This diff is collapsed.
Click to expand it.
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)) }}
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', '')) }}
...
...
This diff is collapsed.
Click to expand it.
software/kvm/instance-kvm-input-schema.json
View file @
7b399f95
...
...
@@ -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"
,
...
...
This diff is collapsed.
Click to expand it.
software/kvm/instance-kvm.cfg.jinja2
View file @
7b399f95
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
software/kvm/software.cfg
View file @
7b399f95
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
software/kvm/template/kvm-controller-run.in
View file @
7b399f95
...
...
@@ -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',
...
...
This diff is collapsed.
Click to expand it.
software/kvm/template/template-kvm-run.in
View file @
7b399f95
...
...
@@ -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()
...
...
This diff is collapsed.
Click to expand it.
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