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
Kwabena Antwi-Boasiako
slapos
Commits
fe00bffd
Commit
fe00bffd
authored
Feb 14, 2018
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kvm: ram_max_size should be set in mega bytes
parent
c4b00bc9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
9 deletions
+13
-9
software/kvm/common.cfg
software/kvm/common.cfg
+4
-4
software/kvm/instance-kvm-cluster.cfg.jinja2.in
software/kvm/instance-kvm-cluster.cfg.jinja2.in
+1
-1
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+1
-1
software/kvm/template/kvm-controller-run.in
software/kvm/template/kvm-controller-run.in
+6
-2
software/kvm/template/template-kvm-run.in
software/kvm/template/template-kvm-run.in
+1
-1
No files found.
software/kvm/common.cfg
View file @
fe00bffd
...
...
@@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
md5sum =
e3cc9ffe857da1078e321cab65173fb1
md5sum =
68b66fb3e9020642e57f4a4ee266f2b3
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 =
26d931a0279d49eadb3881f440b623bc
md5sum =
ba3337b3678ed9d3578cc88749c5cd13
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 =
122bf5e8c7a12bceef1bdd6d6b54f4d7
md5sum =
bd238397af6236b6b24b693012feeece
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 =
7e6c79232cc88c15ed21c112ff801b76
md5sum =
c86cd67bbdd26b7b14b7449a1bbd959b
download-only = true
on-update = true
...
...
software/kvm/instance-kvm-cluster.cfg.jinja2.in
View file @
fe00bffd
...
...
@@ -51,7 +51,7 @@ config-authorized-key = {{ dumps(slapparameter_dict.get('authorized-keys') | joi
config-nbd-port = {{ dumps(kvm_parameter_dict.get('nbd-port', 1024)) }}
config-nbd2-port = {{ dumps(kvm_parameter_dict.get('nbd-port2', 1024)) }}
config-ram-size = {{ dumps(kvm_parameter_dict.get('ram-size', 1024)) }}
config-ram-max-size = {{ dumps(kvm_parameter_dict.get('ram-max-size', '5
0G
')) }}
config-ram-max-size = {{ dumps(kvm_parameter_dict.get('ram-max-size', '5
1200
')) }}
config-enable-device-hotplug = {{ dumps(kvm_parameter_dict.get('enable-device-hotplug', False)) }}
config-ram-hotplug-slot-size = {{ dumps(kvm_parameter_dict.get('ram-hotplug-slot-size', 512)) }}
config-disk-size = {{ dumps(kvm_parameter_dict.get('disk-size', 10)) }}
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
fe00bffd
...
...
@@ -561,7 +561,7 @@ nbd2-host =
enable-device-hotplug = False
ram-size = 1024
ram-max-size = 5
0G
ram-max-size = 5
1200
ram-hotplug-slot-size = 512
disk-size = 10
disk-type = virtio
...
...
software/kvm/template/kvm-controller-run.in
View file @
fe00bffd
...
...
@@ -28,14 +28,18 @@ def update():
try:
init_dict = getInitialQemuResourceDict(pid_file)
if os.path.exists(status_path):
os.unlink(status_path)
if init_dict is None:
# qemu process is not OK
return
init_ram_size = int(init_dict['ram'].split('M')[0])
if cpu_amount < 1:
raise ValueError("CPU should be at least equal to 1.")
hotplug_ram = ram_size - init_ram_size
if hotplug_ram < 0:
raise ValueError("RAM size cannot be less than the initial value %s MB" % init_ram_size)
if os.path.exists(status_path):
os.unlink(status_path)
qemu_wrapper = QemuQMPWrapper(socket_path)
qemu_wrapper.setVNCPassword(vnc_password)
...
...
software/kvm/template/template-kvm-run.in
View file @
fe00bffd
...
...
@@ -261,7 +261,7 @@ if use_tap == 'true':
if enable_device_hotplug != 'true':
smp = '%s,maxcpus=%s' % (smp_count, smp_max_count)
ram = '%sM,slots=128,maxmem=%s' % (ram_size, ram_max_size)
ram = '%sM,slots=128,maxmem=%s
M
' % (ram_size, ram_max_size)
else:
smp = '1,maxcpus=%s' % smp_max_count
ram = '%sM,slots=128,maxmem=%s' % (init_ram_size, ram_max_size)
...
...
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