diff --git a/server/src/com/cloud/api/commands/CreateVolumeCmd.java b/server/src/com/cloud/api/commands/CreateVolumeCmd.java index 75f76d238ec..9e63a551ee4 100644 --- a/server/src/com/cloud/api/commands/CreateVolumeCmd.java +++ b/server/src/com/cloud/api/commands/CreateVolumeCmd.java @@ -155,7 +155,7 @@ public class CreateVolumeCmd extends BaseCmd { //this is the case of creating var size vol with private disk offering List privateTemplateList = getManagementServer().findPrivateDiskOffering(); - diskOfferingId = privateTemplateList.get(0).getId(); //we use this id for creating volume + diskOfferingId = privateTemplateList.get(0).getId(); //we use this id for creating volume, randomly tagging it to a pool with an offering } } else diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 3a5e02187d3..01f4b41724b 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -7100,14 +7100,7 @@ public class ManagementServerImpl implements ManagementServer { if (numGibibytes > _maxVolumeSizeInGb) { throw new InvalidParameterValueException("The maximum allowed size for a disk is " + _maxVolumeSizeInGb + " Gb."); } - - if(numGibibytes==0){ - List existingOffering = _diskOfferingDao.findPrivateDiskOffering(); - - if(existingOffering!=null && existingOffering.size()>0) - throw new InternalErrorException("There already exists a private disk offering"); - } - + return _configMgr.createDiskOffering(userId, domainId, name, description, numGibibytes, tags); }