Fix bug CS-15261.

In case IP address is passed to deployVirtualMachine API, the default property on NIC was not getting set and as a result there was a failure down the line and VM creation was failing.
This commit is contained in:
Koushik Das 2012-06-25 15:21:20 +05:30
parent 61a568cd8e
commit f56795d22b
1 changed files with 2 additions and 1 deletions

View File

@ -2351,11 +2351,12 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
if (defaultNetworkNumber == 0) {
defaultNetworkNumber++;
profile.setDefaultNic(true);
// if user requested specific ip for default network, add it
if (defaultNetworkIp != null) {
profile = new NicProfile(defaultNetworkIp);
}
profile.setDefaultNic(true);
}
networks.add(new Pair<NetworkVO, NicProfile>(network, profile));