From c3982e0e44d753ff00c3b3d91ffba41e724b9e3a Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sun, 1 May 2011 13:10:25 +0000 Subject: [PATCH] Update dhcp on clonevm if appropriate git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9449 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 9dec34889..7c47f73d6 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -560,6 +560,16 @@ sub do_cmd { generic_hyp_operation(\&migrate,@exargs); } wait_for_tasks(); + if ($command eq 'clonevm') { #TODO: unconditional, remove mkvms hosted copy + my @dhcpnodes; + foreach (keys %{$tablecfg{dhcpneeded}}) { + push @dhcpnodes,$_; + delete $tablecfg{dhcpneeded}->{$_}; + } + unless ($::XCATSITEVALS{'dhcpsetup'} and ($::XCATSITEVALS{'dhcpsetup'} =~ /^n/i or $::XCATSITEVALS{'dhcpsetup'} =~ /^d/i or $::XCATSITEVALS{'dhcpsetup'} eq '0')) { + $executerequest->({command=>['makedhcp'],node=>\@dhcpnodes}); + } + } } #inventory request for esx