DaanHoogland commented on code in PR #10503: URL: https://github.com/apache/cloudstack/pull/10503#discussion_r2069908667
########## api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java: ########## @@ -816,6 +836,9 @@ public void execute() { @Override public void create() throws ResourceAllocationException { + if (!isVolumeOrSnapshotProvided() && templateId == null) { + throw new CloudRuntimeException("There isn't a ROOT volume, snapshot of ROOT volume or template provided to deploy a Virtual machine"); + } Review Comment: maybe good to extract a validate method and also check for double parameters; i.e. it is ambiguous if two or all three of the parameters are given. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org