From e24032c28472d868caf1fe25eb93d9681c03564c Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 4 Jun 2013 18:45:33 +0000 Subject: [PATCH] Have kvm update vm.memory if chvm is called git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16536 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 8f94ea27d..3dab1026f 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -1786,6 +1786,10 @@ sub chvm { if ($@ =~ /cannot set memory higher/) { xCAT::SvrUtils::sendmsg([1,"Unable to increase memory beyond current capacity (requires VM to be powered down to change)"],$callback,$node); } + } else { + if ($confdata->{vm}->{$node}->[0]->{memory} and $confdata->{vm}->{$node}->[0]->{memory} != $memory) { + $updatetable->{vm}->{$node}->{memory}=$memory; + } } $vmxml=$dom->get_xml_description(); if ($vmxml) { @@ -1803,6 +1807,9 @@ sub chvm { foreach (@currmem) { $_->setData(getUnits($memory,"M",1024)); } + if ($confdata->{vm}->{$node}->[0]->{memory} and $confdata->{vm}->{$node}->[0]->{memory} != $memory) { + $updatetable->{vm}->{$node}->{memory}=$memory; + } } $vmxml=$parsed->toString;