deploy docker vm without starting it

This commit is contained in:
tuna 2014-04-03 01:49:31 +07:00
parent 4ab0625c88
commit 7c3ab31fbb
2 changed files with 4 additions and 3 deletions

View File

@ -405,7 +405,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
if (template.getFormat() == ImageFormat.ISO) {
volumeMgr.allocateRawVolume(Type.ROOT, "ROOT-" + vmFinal.getId(), rootDiskOffering.first(), rootDiskOffering.second(), vmFinal, template, owner);
} else if (template.getFormat() == ImageFormat.BAREMETAL) {
} else if (template.getFormat() == ImageFormat.BAREMETAL || template.getHypervisorType() == HypervisorType.Docker) {
// Do nothing
} else {
volumeMgr.allocateTemplatedVolume(Type.ROOT, "ROOT-" + vmFinal.getId(), rootDiskOffering.first(), template, vmFinal, owner);

View File

@ -2578,7 +2578,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
}
}
_networkModel.checkNetworkPermissions(owner, network);
// _networkModel.checkNetworkPermissions(owner, network);
// don't allow to use system networks
NetworkOffering networkOffering = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId());
@ -2734,7 +2734,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
}
}
if (template.getHypervisorType() != null && template.getHypervisorType() != HypervisorType.BareMetal) {
if (template.getHypervisorType() != null && template.getHypervisorType() != HypervisorType.BareMetal
&& template.getHypervisorType() != HypervisorType.Docker) {
// check if we have available pools for vm deployment
long availablePools = _storagePoolDao.countPoolsByStatus(StoragePoolStatus.Up);
if (availablePools < 1) {