1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-18 06:03:39 +03:00

B #6548: Fix kvm attributes

* CGROUPS_VERSION, FIRMWARE, FIRMWARE_SECURE and CPU_MODEL/FEATURES can
be overriden by Cluster and Host
* Fix attribute name in attach_disk
This commit is contained in:
Pavel Czerny 2024-11-15 00:19:35 +01:00 committed by Ruben S. Montero
parent 13b6f4aaa4
commit fb715c3333
2 changed files with 5 additions and 5 deletions

View File

@ -758,7 +758,7 @@ int LibVirtDriver::deployment_description_kvm(
topology = vm->get_template_attribute("TOPOLOGY");
vm->get_template_attribute("NUMA_NODE", nodes);
get_attribute(nullptr, host, nullptr, "CGROUPS_VERSION", cgversion);
get_attribute(nullptr, host, cluster, "CGROUPS_VERSION", cgversion);
int base = 1024;
int min = 2;
@ -901,7 +901,7 @@ int LibVirtDriver::deployment_description_kvm(
bool boot_secure = false;
string firmware;
get_attribute(vm, nullptr, nullptr, "OS", "FIRMWARE", firmware);
get_attribute(vm, host, cluster, "OS", "FIRMWARE", firmware);
bool is_uefi = !firmware.empty() && !one_util::icasecmp(firmware, "BIOS");
@ -909,7 +909,7 @@ int LibVirtDriver::deployment_description_kvm(
{
string firmware_secure = "no";
if ( get_attribute(vm, nullptr, nullptr, "OS", "FIRMWARE_SECURE",
if ( get_attribute(vm, host, cluster, "OS", "FIRMWARE_SECURE",
boot_secure) && boot_secure)
{
firmware_secure = "yes";
@ -943,7 +943,7 @@ int LibVirtDriver::deployment_description_kvm(
// CPU SECTION
// ------------------------------------------------------------------------
get_attribute(vm, host, cluster, "CPU_MODEL", "MODEL", cpu_model);
get_attribute(vm, nullptr, nullptr, "CPU_MODEL", "FEATURES", cpu_feature);
get_attribute(vm, host, cluster, "CPU_MODEL", "FEATURES", cpu_feature);
if (cpu_model == "host-passthrough")
{

View File

@ -77,7 +77,7 @@ WRITE_IOPS_SEC=${WRITE_IOPS_SEC:-${DEFAULT_ATTACH_WRITE_IOPS_SEC}}
WRITE_IOPS_SEC_MAX_LENGTH=${WRITE_IOPS_SEC_MAX_LENGTH:-${DEFAULT_ATTACH_WRITE_IOPS_SEC_MAX_LENGTH}}
WRITE_IOPS_SEC_MAX=${WRITE_IOPS_SEC_MAX:-${DEFAULT_ATTACH_WRITE_IOPS_SEC_MAX}}
SIZE_IOPS_SEC=${SIZE_IOPS_SEC:-${DEFAULT_ATTACH_SIZE_IOPS_SEC}}
VIRTIO_BLK_QUEUES=${VIRTIO_BLK_QUEUES:-${DEFAULT_VIRTIO_BLK_QUEUES}}
VIRTIO_BLK_QUEUES=${VIRTIO_BLK_QUEUES:-${DEFAULT_ATTACH_VIRTIO_BLK_QUEUES}}
if [ "${VIRTIO_BLK_QUEUES}" = "auto" ]; then
VIRTIO_BLK_QUEUES="$VCPU"