create vm will ignore to create network device when vm.nics is null

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10947 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2011-11-01 06:24:06 +00:00
parent 5d3221ec32
commit 652775d195

View File

@ -545,8 +545,6 @@ sub build_nicstruct {
my @nics=();
if ($confdata->{vm}->{$node}->[0]->{nics}) {
@nics = split /,/,$confdata->{vm}->{$node}->[0]->{nics};
} else {
@nics = ('virbr0');
}
my @macs=xCAT::VMCommon::getMacAddresses($confdata,$node,scalar @nics);
my @rethashes;
@ -2046,8 +2044,6 @@ sub fixup_clone_network {
my @nics;
if ($confdata->{vm}->{$node}->[0]->{nics}) { #could still be empty if it came from master that way
@nics = split /,/,$confdata->{vm}->{$node}->[0]->{nics};
} else {
@nics = ('virbr0');
}
my @nicsinmaster = $newnodexml->findnodes("/domain/devices/interface");
if (scalar @nicsinmaster > scalar @nics) { #we don't have enough places to attach nics to..