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
This commit is contained in:
Murali Reddy 2013-08-28 00:31:15 +05:30
parent c3a275fc75
commit 5f42e2937d

View File

@ -207,6 +207,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;
}