diff --git a/xCAT-server/lib/xcat/plugins/mknb.pm b/xCAT-server/lib/xcat/plugins/mknb.pm index 9e68b6887..8508a598a 100644 --- a/xCAT-server/lib/xcat/plugins/mknb.pm +++ b/xCAT-server/lib/xcat/plugins/mknb.pm @@ -73,6 +73,17 @@ sub process_request { } } my $nicips = xCAT::NetworkUtils->get_nic_ip(); + foreach (keys $nicips) { + # To support tagged vlan, create entries in the hash for the + # interface name removing the physical interface ending: + # 'enP1p12s0f0.2@enP1p12s0f0' => 'enP1p12s0f0.2' + if ($_ =~ "@") { + my $newkey = $_; + $newkey =~ s/\@.*//g; + $$nicips{$newkey} = ${nicips}->{$_}; + } + } + foreach (keys %nobootnics) { if (defined($nicips->{$_})) { $nobootnicips{$nicips->{$_}} = 1;