mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-09 09:57:23 +03:00
bug: wrong element name in VCPU fix for vcenter
(cherry picked from commit c4432d1a13995942c7e40d5bc8b66553c1db2898)
This commit is contained in:
parent
10f5386122
commit
13903274b0
@ -798,7 +798,7 @@ class VCenterVm
|
||||
# Find out if we need to reconfigure capacity
|
||||
xml = REXML::Document.new xml_text
|
||||
|
||||
expected_cpu = xml.root.elements["//TEMPLATE/VCPU"] ? xml.root.elements["//TEMPLATE/CPU"].text : 1
|
||||
expected_cpu = xml.root.elements["//TEMPLATE/VCPU"] ? xml.root.elements["//TEMPLATE/VCPU"].text : 1
|
||||
expected_memory = xml.root.elements["//TEMPLATE/MEMORY"].text
|
||||
current_cpu = vm.config.hardware.numCPU
|
||||
current_memory = vm.config.hardware.memoryMB
|
||||
@ -1512,7 +1512,7 @@ private
|
||||
|
||||
# Capacity section
|
||||
|
||||
cpu = xml.root.elements["//TEMPLATE/VCPU"] ? xml.root.elements["//TEMPLATE/CPU"].text : 1
|
||||
cpu = xml.root.elements["//TEMPLATE/VCPU"] ? xml.root.elements["//TEMPLATE/VCPU"].text : 1
|
||||
memory = xml.root.elements["//TEMPLATE/MEMORY"].text
|
||||
capacity_spec = {:numCPUs => cpu.to_i,
|
||||
:memoryMB => memory }
|
||||
|
Loading…
x
Reference in New Issue
Block a user