From fa90949bd19b86d43da574de7d7b7fb38fc156db Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 20 Oct 2009 04:30:08 +0000 Subject: [PATCH] -fix bug where default memory usage in kvm caused imbalanced orphan vm adoption git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4417 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 7e3e04126..6f4f33d46 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -823,7 +823,11 @@ sub adopt { unless ($target) { next; } - $addmemory{$target}+=getUnits($vmhash->{$node}->[0]->{memory},"M",1024); + if ($vmhash->{$node}->[0]->{memory}) { + $addmemory{$target}+=getUnits($vmhash->{$node}->[0]->{memory},"M",1024); + } else { + $addmemory{$target}+=getUnits("512","M",1024); + } $hyphash{$target}->{nodes}->{$node}=1; delete $orphash->{$node}; push @{$hypsethash{$target}},$node;