mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3010: [VMWare] [SharedNetworkWithServices] router VM
deployment fails with error "Message: Invalid configuration for device
'2'."
ensuring that direct network guru assigns a mac address for the nic that
it designs
(cherry picked from commit 47fa6d9561)
Signed-off-by: animesh <animesh@apache.org>
This commit is contained in:
parent
4b4315ff71
commit
4a5f2dd699
|
|
@ -204,6 +204,13 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
allocateDirectIp(nic, network, vm, dc, nic.getRequestedIpv4(), nic.getRequestedIpv6());
|
||||
nic.setStrategy(ReservationStrategy.Create);
|
||||
|
||||
if (nic.getMacAddress() == null) {
|
||||
nic.setMacAddress(_networkModel.getNextAvailableMacAddressInNetwork(network.getId()));
|
||||
if (nic.getMacAddress() == null) {
|
||||
throw new InsufficientAddressCapacityException("Unable to allocate more mac addresses", Network.class, network.getId());
|
||||
}
|
||||
}
|
||||
|
||||
return nic;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue