From 02756bea76293fda15954e65b228bdd1c80d4f27 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 30 Nov 2009 18:37:01 +0000 Subject: [PATCH] -Call makedhcp when mac addresses are generated by virtualization code git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4694 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index c6f54db96..2e75ba641 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -1092,6 +1092,12 @@ sub process_request { xCAT::VMCommon::grab_table_data($noderange,$confdata,$callback); if ($command eq 'mkvm' or $command eq 'rpower' and (grep { "$_" eq "on" or $_ eq "boot" or $_ eq "reset" } @exargs)) { xCAT::VMCommon::requestMacAddresses($confdata,$noderange); + my @dhcpnodes; + foreach (keys %{$tablecfg{dhcpneeded}}) { + push @dhcpnodes,$_; + delete $tablecfg{dhcpneeded}->{$_}; + } + $executerequest->({command=>['makedhcp'],node=>\@dhcpnodes}); } if ($command eq 'revacuate' or $command eq 'rmigrate') {