diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 804cb39f3..bd17fd49c 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -2142,7 +2142,9 @@ sub mkvms { push @dhcpnodes,$_; delete $tablecfg{dhcpneeded}->{$_}; } - $executerequest->({command=>['makedhcp'],node=>\@dhcpnodes}); + unless ($::XCATSITEVALS{'dhcpsetup'} and ($::XCATSITEVALS{'dhcpsetup'} =~ /^n/i or $::XCATSITEVALS{'dhcpsetup'} =~ /^d/i or $::XCATSITEVALS{'dhcpsetup'} eq '0')) { + $executerequest->({command=>['makedhcp'],node=>\@dhcpnodes}); + } } sub setboot { diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 75be923db..01f762106 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -2255,7 +2255,9 @@ sub process_request { push @dhcpnodes,$_; delete $confdata->{dhcpneeded}->{$_}; } - $doreq->({command=>['makedhcp'],node=>\@dhcpnodes}); + unless ($::XCATSITEVALS{'dhcpsetup'} and ($::XCATSITEVALS{'dhcpsetup'} =~ /^n/i or $::XCATSITEVALS{'dhcpsetup'} =~ /^d/i or $::XCATSITEVALS{'dhcpsetup'} eq '0')) { + $doreq->({command=>['makedhcp'],node=>\@dhcpnodes}); + } } if ($command eq 'revacuate' or $command eq 'rmigrate') {