diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index 5480cd7d5ee..d2a5900ce1c 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -1499,6 +1499,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag throw new InvalidParameterValueException("Virtual Network creation is not allowd if zone is security group enabled"); } + if (zone.isSecurityGroupEnabled() && cmd.getAccountName() == null) { + throw new InvalidParameterValueException("Can't create a zone wide network if zone is security group enabled"); + } + //If one of the following parameters are defined (starIP/endIP/netmask/gateway), all the rest should be defined too ArrayList networkConfigs = new ArrayList(); networkConfigs.add(gateway);