From c3969dabb49a5d1aab4264500a934f3582031f48 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sat, 14 Mar 2009 00:37:20 +0000 Subject: [PATCH] -Implement kvm instantiation of multiple processors for a guest git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2893 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index ba33d4c07..b1abd3fda 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -245,7 +245,11 @@ sub build_xmldesc { } else { $xtree{memory}->{content}=524288; } - $xtree{vcpu}->{content}=1; + if (defined $vmhash->{$node}->[0]->{cpus}) { + $xtree{vcpu}->{content}=$vmhash->{$node}->[0]->{cpus}; + } else { + $xtree{vcpu}->{content}=1; + } $xtree{features}->{pae}={}; $xtree{features}->{acpi}={}; $xtree{features}->{apic}={}; @@ -646,7 +650,7 @@ sub grab_table_data{ #grab table data relevent to VM guest nodes $callback->({data=>["Cannot open vm table"]}); return; } - $vmhash = $vmtab->getNodesAttribs($noderange,['node','host','migrationdest','storage','memory','cpu','nics','bootorder','virtflags']); + $vmhash = $vmtab->getNodesAttribs($noderange,['node','host','migrationdest','storage','memory','cpus','nics','bootorder','virtflags']); $mactab = xCAT::Table->new("mac",-create=>1); $nrtab= xCAT::Table->new("noderes",-create=>1); $machash = $mactab->getNodesAttribs($noderange,['mac']);