You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public UserVm importVM(final DataCenter zone, final Host host, final VirtualMachineTemplate template, final String instanceName, final String displayName,
9573
+
public UserVm importVM(final DataCenter zone, final Host host, final VirtualMachineTemplate template, final String instanceNameInternal, final String displayName,
9566
9574
final Account owner, final String userData, final Account caller, final Boolean isDisplayVm, final String keyboard,
9567
9575
final long accountId, final long userId, final ServiceOffering serviceOffering, final String sshPublicKeys,
9568
9576
final String hostName, final HypervisorType hypervisorType, final Map<String, String> customParameters,
9569
9577
final VirtualMachine.PowerState powerState, final LinkedHashMap<String, List<NicProfile>> networkNicMap) throws InsufficientCapacityException {
9570
-
if (zone == null) {
9571
-
throw new InvalidParameterValueException("Unable to import virtual machine with invalid zone");
9572
-
}
9573
-
if (host == null && hypervisorType == HypervisorType.VMware) {
9574
-
throw new InvalidParameterValueException("Unable to import virtual machine with invalid host");
9575
-
}
9578
+
return Transaction.execute((TransactionCallbackWithException<UserVm, InsufficientCapacityException>) status -> {
9579
+
if (zone == null) {
9580
+
throw new InvalidParameterValueException("Unable to import virtual machine with invalid zone");
9581
+
}
9582
+
if (host == null && hypervisorType == HypervisorType.VMware) {
9583
+
throw new InvalidParameterValueException("Unable to import virtual machine with invalid host");
9584
+
}
9576
9585
9577
-
final long id = _vmDao.getNextInSequence(Long.class, "id");
9586
+
final long id = _vmDao.getNextInSequence(Long.class, "id");
0 commit comments