Skip to content

Commit

Permalink
Merge pull request #1737 from alvarosimon/one_oversubscription
Browse files Browse the repository at this point in the history
ncm-opennebula: add cpu overcommit ratio option
  • Loading branch information
jrha authored Nov 28, 2024
2 parents a45fab7 + d429b90 commit e1b130f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ncm-opennebula/src/main/pan/quattor/aii/opennebula/schema.pan
Original file line number Diff line number Diff line change
Expand Up @@ -347,4 +347,8 @@ type opennebula_vmtemplate = {
@{Use Virtual Machine Timer Management:
https://libvirt.org/formatdomain.html#time-keeping}
"hypervclock" ? boolean
@{Define VM CPU overcommit ratio, by default it is disabled and set to 1, 1 CPU per VCPU:
https://docs.opennebula.io/6.10/management_and_operations/capacity_planning/overcommitment.html
}
"cpuratio" : double(0..1) = 1.0
} = dict();
3 changes: 3 additions & 0 deletions ncm-opennebula/src/main/resources/tests/profiles/vm.pan
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,6 @@ prefix "/system/opennebula";
"vmgroup_name", "ha_group",
"role", "backup"
));

"cpuratio" = 1.0;

3 changes: 2 additions & 1 deletion ncm-opennebula/src/main/resources/vmtemplate.tt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ HOSTNAME = "[%- fqdn %]",
TOKEN = "YES"
[%- END %]
]
CPU = "[% vcpus %]"
CPU = "[% vcpus * system.opennebula.cpuratio %]"
VCPU = "[% vcpus %]"
DESCRIPTION = "[% hardware.model %] [% fqdn %]"
[%- FOR pair IN hardware.harddisks.pairs %]
DISK = [
Expand Down
1 change: 1 addition & 0 deletions ncm-opennebula/src/test/resources/vm.pan
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,4 @@ prefix "/system/opennebula";
"hugepages",
);

"cpuratio" = 1.0;

0 comments on commit e1b130f

Please sign in to comment.