bug 11239: add check for hypervisor type when deploy vm, no way to deploy a vm with hypervisor type None

This commit is contained in:
Edison Su 2011-09-13 16:22:08 -07:00
parent 3b423dbc01
commit f18dd42908
1 changed files with 4 additions and 0 deletions

View File

@ -373,6 +373,10 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
throw new InvalidParameterValueException("Unable to find disk offering " + diskOfferingId);
}
}
if (getHypervisor() == HypervisorType.None) {
throw new InvalidParameterValueException("Unable to deploy vm with Hypervisor None");
}
UserVm vm = null;
if (getHypervisor() == HypervisorType.BareMetal) {