From 97a46291936baa54f39bcba5e12997a37d4ddce6 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 30 Jun 2026 13:50:45 +0530 Subject: [PATCH] fix Signed-off-by: Abhishek Kumar --- .../InvalidParameterValueException.java | 8 - .../exception/PermissionDeniedException.java | 6 - .../cloudstack/api/ServerApiException.java | 11 - .../api/command/user/vm/BaseDeployVMCmd.java | 3 +- .../cloudstack/context/CallContext.java | 3 + .../apache/cloudstack/error/Exceptions.java | 74 +- client/conf/error-messages.json.in | 1224 ++++++++--------- .../vm/VirtualMachineManagerImplTest.java | 9 +- .../java/com/cloud/vm/UserVmManagerImpl.java | 3 +- .../vm/UnmanagedVMsManagerImpl.java | 128 +- .../com/cloud/vm/UserVmManagerImplTest.java | 136 +- .../vm/UnmanagedVMsManagerImplTest.java | 3 + .../java/com/cloud/utils/StringUtils.java | 7 + .../exception/CloudRuntimeException.java | 35 +- 14 files changed, 835 insertions(+), 815 deletions(-) diff --git a/api/src/main/java/com/cloud/exception/InvalidParameterValueException.java b/api/src/main/java/com/cloud/exception/InvalidParameterValueException.java index 560a0a83570..ce2bc31a7f1 100644 --- a/api/src/main/java/com/cloud/exception/InvalidParameterValueException.java +++ b/api/src/main/java/com/cloud/exception/InvalidParameterValueException.java @@ -16,10 +16,6 @@ // under the License. package com.cloud.exception; -import java.util.Map; - -import org.apache.cloudstack.context.ResponseMessageResolver; - import com.cloud.utils.exception.CloudRuntimeException; public class InvalidParameterValueException extends CloudRuntimeException { @@ -30,8 +26,4 @@ public class InvalidParameterValueException extends CloudRuntimeException { super(message); } - public InvalidParameterValueException(String key, Map metadata) { - super(ResponseMessageResolver.resolve(key, metadata)); - } - } diff --git a/api/src/main/java/com/cloud/exception/PermissionDeniedException.java b/api/src/main/java/com/cloud/exception/PermissionDeniedException.java index dcb0d1ee78c..b78504315c4 100644 --- a/api/src/main/java/com/cloud/exception/PermissionDeniedException.java +++ b/api/src/main/java/com/cloud/exception/PermissionDeniedException.java @@ -17,10 +17,8 @@ package com.cloud.exception; import java.util.List; -import java.util.Map; import org.apache.cloudstack.acl.ControlledEntity; -import org.apache.cloudstack.context.ResponseMessageResolver; import com.cloud.user.Account; import com.cloud.utils.SerialVersionUID; @@ -34,10 +32,6 @@ public class PermissionDeniedException extends CloudRuntimeException { super(message); } - public PermissionDeniedException(String key, Map metadata) { - super(ResponseMessageResolver.resolve(key, metadata)); - } - public PermissionDeniedException(String message, Throwable cause) { super(message, cause); } diff --git a/api/src/main/java/org/apache/cloudstack/api/ServerApiException.java b/api/src/main/java/org/apache/cloudstack/api/ServerApiException.java index 0efdcd0364f..a8bb2ed71c9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/ServerApiException.java +++ b/api/src/main/java/org/apache/cloudstack/api/ServerApiException.java @@ -17,9 +17,6 @@ package org.apache.cloudstack.api; import java.util.ArrayList; -import java.util.Map; - -import org.apache.cloudstack.context.ResponseMessageResolver; import com.cloud.exception.CloudException; import com.cloud.utils.exception.CSExceptionErrorCode; @@ -37,14 +34,6 @@ public class ServerApiException extends CloudRuntimeException { setCSErrorCode(CSExceptionErrorCode.getCSErrCode(ServerApiException.class.getName())); } - public ServerApiException(ApiErrorCode errorCode, String messageKey, Map errorMetadata) { - _errorCode = errorCode; - this.messageKey = messageKey; - this.metadata = errorMetadata; - _description = ResponseMessageResolver.getMessage(messageKey, errorMetadata); - setCSErrorCode(CSExceptionErrorCode.getCSErrCode(ServerApiException.class.getName())); - } - public ServerApiException(ApiErrorCode errorCode, String description) { _errorCode = errorCode; _description = description; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/BaseDeployVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/BaseDeployVMCmd.java index 67074ec7d6a..1b378a33483 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/BaseDeployVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/BaseDeployVMCmd.java @@ -46,6 +46,7 @@ import org.apache.cloudstack.api.response.SecurityGroupResponse; import org.apache.cloudstack.api.response.UserDataResponse; import org.apache.cloudstack.api.response.ZoneResponse; import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.error.Exceptions; import org.apache.cloudstack.vm.lease.VMLeaseManager; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; @@ -646,7 +647,7 @@ public abstract class BaseDeployVMCmd extends BaseAsyncCreateCustomIdCmd impleme try { networkId = Long.parseLong(networkid); } catch (NumberFormatException e) { - throw new InvalidParameterValueException("vm.deploy.network.not.found.ip.map", + throw Exceptions.invalidParameterValueException("vm.deploy.network.not.found.ip.map", Map.of("networkId", networkid)); } } diff --git a/api/src/main/java/org/apache/cloudstack/context/CallContext.java b/api/src/main/java/org/apache/cloudstack/context/CallContext.java index 4aadef90c1f..0d03d649cd1 100644 --- a/api/src/main/java/org/apache/cloudstack/context/CallContext.java +++ b/api/src/main/java/org/apache/cloudstack/context/CallContext.java @@ -142,6 +142,9 @@ public class CallContext { } public boolean isCallingAccountRootAdmin() { + if (getCallingUserId() == User.UID_SYSTEM) { + return false; + } if (isAccountRootAdmin == null) { AccountService accountService; try { diff --git a/api/src/main/java/org/apache/cloudstack/error/Exceptions.java b/api/src/main/java/org/apache/cloudstack/error/Exceptions.java index 544d6468f47..5c171e003e6 100644 --- a/api/src/main/java/org/apache/cloudstack/error/Exceptions.java +++ b/api/src/main/java/org/apache/cloudstack/error/Exceptions.java @@ -19,6 +19,7 @@ package org.apache.cloudstack.error; import java.util.Collections; import java.util.Map; +import java.util.function.Function; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.ServerApiException; @@ -26,43 +27,84 @@ import org.apache.cloudstack.context.ResponseMessageResolver; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.PermissionDeniedException; +import com.cloud.utils.Ternary; import com.cloud.utils.exception.CloudRuntimeException; -public class Exceptions { +public final class Exceptions { - public static InvalidParameterValueException invalidParameterValueException(String errorKey, Map metadata) { - return new InvalidParameterValueException(errorKey, metadata); + private Exceptions() { } - public static InvalidParameterValueException invalidParameterValueException(String errorKey) { + public static InvalidParameterValueException invalidParameterValueException(final String errorKey) { return invalidParameterValueException(errorKey, Collections.emptyMap()); } - public static PermissionDeniedException permissionDeniedException(String errorKey, Map metadata) { - return new PermissionDeniedException(errorKey, metadata); + public static InvalidParameterValueException invalidParameterValueException(final String errorKey, + final Map metadata) { + return build(errorKey, metadata, InvalidParameterValueException::new); } - public static PermissionDeniedException permissionDeniedException(String errorKey) { + public static PermissionDeniedException permissionDeniedException(final String errorKey) { return permissionDeniedException(errorKey, Collections.emptyMap()); } - public static ServerApiException serverApiException(ApiErrorCode errorCode, String errorKey, Map metadata) { - return new ServerApiException(errorCode, errorKey, metadata); + public static PermissionDeniedException permissionDeniedException(final String errorKey, + final Map metadata) { + return build(errorKey, metadata, PermissionDeniedException::new); } - public static ServerApiException serverApiException(ApiErrorCode errorCode, String errorKey) { + public static ServerApiException serverApiException(final ApiErrorCode errorCode, + final String errorKey) { return serverApiException(errorCode, errorKey, Collections.emptyMap()); } - public static CloudRuntimeException cloudRuntimeException(String errorKey, Map metadata) { - return new CloudRuntimeException(ResponseMessageResolver.resolve(errorKey, metadata)); + public static ServerApiException serverApiException(final ApiErrorCode errorCode, + final String errorKey, + final Map metadata) { + Ternary> data = + ResponseMessageResolver.resolve(errorKey, metadata); + + ServerApiException ex = new ServerApiException(errorCode, data.first()); + enrich(ex, data); + throw ex; } - public static CloudRuntimeException cloudRuntimeException(String errorKey) { - return new CloudRuntimeException(ResponseMessageResolver.resolve(errorKey, Collections.emptyMap())); + public static CloudRuntimeException cloudRuntimeException(final String errorKey) { + return cloudRuntimeException(errorKey, Collections.emptyMap()); } - public static CloudRuntimeException cloudRuntimeException(String errorKey, Map metadata, Throwable th) { - return new CloudRuntimeException(ResponseMessageResolver.resolve(errorKey, metadata), th); + public static CloudRuntimeException cloudRuntimeException(final String errorKey, + final Map metadata) { + return build(errorKey, metadata, CloudRuntimeException::new); + } + + public static CloudRuntimeException cloudRuntimeException(final String errorKey, + final Map metadata, + final Throwable cause) { + Ternary> data = + ResponseMessageResolver.resolve(errorKey, metadata); + + CloudRuntimeException ex = new CloudRuntimeException(data.first(), cause); + enrich(ex, data); + return ex; + } + + private static T build( + final String errorKey, + final Map metadata, + final Function exceptionSupplier) { + + Ternary> data = + ResponseMessageResolver.resolve(errorKey, metadata); + + T ex = exceptionSupplier.apply(data.first()); + enrich(ex, data); + return ex; + } + + private static void enrich(final CloudRuntimeException ex, + final Ternary> data) { + ex.setMessageKey(data.second()); + ex.setMetadata(data.third()); } } diff --git a/client/conf/error-messages.json.in b/client/conf/error-messages.json.in index 4de8651c1cb..9104fde31fb 100644 --- a/client/conf/error-messages.json.in +++ b/client/conf/error-messages.json.in @@ -1,651 +1,651 @@ { - "vm.deploy.diskoffering.compute.only": "Unable to deploy Instance as the specified disk offering {{diskOffering}} is mapped to a service offering. Specify a disk offering that is not mapped to any service offering.", - "vm.deploy.diskoffering.local.storage.zone.unsupported": "Unable to deploy Instance because the zone is not configured to use local storage, but the specified disk offering {{diskOffering}} requires it.", - "vm.deploy.diskoffering.not.found": "Unable to deploy Instance as the specified disk offering is not found.", - "vm.deploy.diskoffering.with.diskoffering.details": "Unable to deploy Instance as both a disk offering ID and data disk offering details were provided. Specify only one.", - "vm.deploy.hypervisor.volume.snapshot.not.supported": "Unable to deploy Instance because deployment from an existing volume or snapshot is supported only on the KVM hypervisor.", - "vm.deploy.network.not.found.ip.map": "The network selected {{networkId}} in IP to network map could not be found. It may have been removed or is no longer accessible.", - "vm.deploy.resourcelimit.exceeded.account": "Unable to deploy Instance because allocating {{resourceRequested}} more {{resourceTypeDisplay}} would exceed the {{resourceOwnerType}} limits. Current: {{resourceAmount}}, Reserved: {{resourceReserved}}, Limit: {{resourceLimit}}. Release unused resources, then retry.", - "vm.deploy.resourcelimit.exceeded.account.admin": "Unable to deploy Instance because allocating {{resourceRequested}} more {{resourceTypeDisplay}} would exceed the {{resourceOwnerType}} limits for {{resourceOwner}}. Current: {{resourceAmount}}, Reserved: {{resourceReserved}}, Limit: {{resourceLimit}}. Release unused resources or increase the limit, then retry.", - "vm.deploy.resourcelimit.exceeded.domain": "Unable to deploy Instance because allocating {{resourceRequested}} more {{resourceTypeDisplay}} would exceed the domain limits. Current: {{resourceAmount}}, Reserved: {{resourceReserved}}, Limit: {{resourceLimit}}. Release unused resources, then retry.", - "vm.deploy.resourcelimit.exceeded.domain.admin": "Unable to deploy Instance because allocating {{resourceRequested}} more {{resourceTypeDisplay}} would exceed the limits for domain {{resourceOwnerDomain}}. Current: {{resourceAmount}}, Reserved: {{resourceReserved}}, Limit: {{resourceLimit}}. Release unused resources or increase the limit, then retry.", - "vm.deploy.serviceoffering.fixed.parameters.not.allowed": "Unable to deploy the instance because the selected service offering {{serviceOffering}} does not allow specifying {{cpuNumberKey}}, {{cpuSpeedKey}}, or {{memory}}.", - "vm.deploy.serviceoffering.fixed.parameters.not.allowed.admin": "Unable to deploy the instance because the selected service offering {{serviceOffering}} is not a dynamic offering and it does not allow specifying {{cpuNumberKey}}, {{cpuSpeedKey}}, or {{memory}}.", - "vm.deploy.serviceoffering.inactive": "Unable to deploy Instance as the given service offering {{serviceOffering}} is inactive. Specify an active service offering.", - "vm.deploy.serviceoffering.local.storage.zone.unsupported": "Unable to deploy Instance because the zone is not configured to use local storage, but the disk offering mapped to service offering {{serviceOffering}} requires it.", - "vm.deploy.serviceoffering.not.specified": "Unable to deploy Instance as the required parameter 'serviceofferingid' is missing.", - "vm.deploy.serviceoffering.not.found": "Unable to deploy Instance as the specified service offering is not found.", - "vm.deploy.serviceoffering.override.not.allowed": "Unable to deploy Instance as the selected service offering {{serviceOffering}} does not allow changing the disk offering.", - "vm.deploy.serviceoffering.override.not.allowed.admin": "Unable to deploy Instance as the selected service offering {{serviceOffering}} uses disk offering strictness and does not allow changing the disk offering.", - "vm.deploy.snapshot.not.found": "Unable to deploy Instance as the specified Snapshot is not found.", - "vm.deploy.template.associated.not.usable": "Unable to deploy Instance as the associated Template cannot be used.", - "vm.deploy.template.not.found": "Unable to deploy Instance as the specified Template is not found.", - "vm.deploy.template.not.found.by.id": "Unable to look up Template with id {{id}}.", - "vm.deploy.volume.not.found": "Unable to deploy Instance as the specified Volume is not found.", - "vm.deploy.zone.not.found": "Unable to deploy Instance as the specified zone is not found.", - "vm.resetpassword.failed": "Failed to reset password for the Instance {{instance}}.", - "vm.resetpassword.vm.not.found": "Unable to reset password as the specified Instance is not found.", - "vm.resetpassword.template.not.password.enabled": "Unable to reset password for the Instance {{instance}}, the Template {{template}} is not password enabled.", - "vm.resetpassword.vm.not.right.state": "Unable to reset password for the Instance {{instance}} as it is not in the right state. Current state: {{instanceState}}.", - "vm.resetpassword.vm.not.stopped": "Unable to reset password for the Instance {{instance}} as it is not in Stopped state. Current state: {{instanceState}}.", - "vm.resetpassword.network.service.not.found": "Unable to reset password for the Instance {{instance}} as its default Network {{network}} does not supports the service {{networkService}}.", - "vm.resetuserdata.vm.not.found": "Unable to reset userdata as the specified Instance is not found.", - "vm.resetuserdata.vm.sharedfs.operation.not.supported": "Unable to reset userdata as the operation is not supported for Shared FileSystem Instance {{instance}}.", - "vm.resetuserdata.vm.operation.not.supported": "Unable to reset userdata as the operation is not supported for Instance {{instance}}.", - "vm.resetuserdata.vm.not.stopped": "Unable to reset userdata as the Instance {{instance}} as it is not in Stopped state. Current state {{instanceState}}.", - "vm.resetsshkey.failed": "Failed to reset SSH Key for the Instance {{instance}}.", - "vm.resetsshkey.vm.not.found": "Unable to reset SSH Key as the specified Instance is not found.", - "vm.resetsshkey.vm.sharedfs.operation.not.supported": "Unable to reset SSH Key as the operation is not supported for Shared FileSystem Instance {{instance}}.", - "vm.resetsshkey.vm.operation.not.supported": "Unable to reset SSH Key as the operation is not supported for Instance {{instance}}.", - "vm.resetsshkey.vm.not.right.state": "Unable to reset SSH Key for the Instance {{instance}} as it is not in the right state. Current state: {{instanceState}}.", - "vm.resetsshkey.vm.not.stopped": "Unable to reset SSH Key as the Instance {{instance}} as it is not in Stopped state. Current state {{instanceState}}.", - "vm.resetsshkey.key.not.specified": "'keypair' or 'keypairs' must be specified.", - "vm.resetsshkey.key.not.all.found": "Unable to reset SSH Key as the Instance {{instance}} as not all the specified keypairs found.", - "vm.resetsshkey.network.service.not.found": "Unable to reset SSH Key for the Instance {{instance}} as its default Network {{network}} does not supports the service {{networkService}}.", - "vm.forcereboot.failed": "Unable to force reboot the Instance {{instance}}.", - "vm.forcereboot.host.not.found": "Unable to force reboot the Instance {{instance}} as Host for it is not found.", - "vm.forcereboot.host.not.right.state": "Unable to force reboot the Instance {{instance}} as Host is not in the right state.", - "vm.forcereboot.host.not.right.state.admin": "Unable to force reboot the Instance {{instance}} as Host {{host}} is not in the right state. Current state: {{hostState}}.", - "vm.forcereboot.router.concurrent.start": "Unable to force reboot the Instance {{instance}} as concurrent operations on starting router: {{routerError}}.", - "vm.forcereboot.router.start.failed": "Unable to force reboot the Instance {{instance}} as starting router failed due to: {{routerError}}.", - "vm.stop.agent.no.contact": "Unable to contact the agent to stop the Instance {{instance}}.", - "vm.upgrade.vm.not.right.state": "Unable to upgrade Instance {{instance}} in state {{instanceState}}; make sure the Instance is stopped.", - "vm.upgrade.serviceoffering.not.active": "Unable to upgrade Instance {{instance}} with an inactive service offering {{serviceOffering}}.", - "vm.validate.serviceoffering.invalid.cpu.cores": "Invalid cpu cores value for service offering {{serviceOffering}}, please choose another service offering with cpu cores between 1 and {{maxCPUCores}}.", - "vm.validate.serviceoffering.invalid.memory": "Invalid memory value for service offering {{serviceOffering}}, please choose another service offering with memory between 32 and {{maxMemory}} MB.", - "vm.validate.serviceoffering.custom.params.missing": "Need to specify custom parameter values cpu, cpu speed and memory when using custom service offering {{serviceOffering}}.", - "vm.validate.serviceoffering.invalid.params.cpu.cores": "Invalid CPU cores value for service offering {{serviceOffering}}, specify a value between {{minCPUCores}} and {{maxCPUCores}}.", - "vm.validate.serviceoffering.cpu.cores.not.dynamic": "CPU cores cannot be customized for service offering {{serviceOffering}} as they have been already predefined to {{cpuCores}}.", - "vm.validate.serviceoffering.invalid.params.cpu.speed": "Invalid CPU speed value for service offering {{serviceOffering}}, specify a value between 1 and {{maxCPUSpeed}}.", - "vm.validate.serviceoffering.cpu.speed.not.dynamic": "CPU speed cannot be customized for service offering {{serviceOffering}} as they have been already predefined to {{cpuSpeed}} MHz.", - "vm.validate.serviceoffering.invalid.params.memory": "Invalid memory value for service offering {{serviceOffering}}, specify a value between {{minMemory}} and {{maxMemory}} MB.", - "vm.validate.serviceoffering.memory.not.dynamic": "Memory cannot be customized for service offering {{serviceOffering}} as it has been already predefined to {{memory}} MB.", - "vm.addnic.vm.not.found": "Unable to add NIC as the specified Instance is not found.", - "vm.addnic.vm.having.snapshots": "Unable to add NIC to the Instance {{instance}} as it has Instance Snapshots.", + "vm.addnic.already.exists": "A NIC already exists for Instance {{instance}} in Network: {{network}}.", + "vm.addnic.cleanup.failed": "Error while cleaning up NIC: {{error}}.", + "vm.addnic.concurrent.operation": "Concurrent operations on adding NIC to Instance {{instance}}: {{error}}.", + "vm.addnic.hostname.duplicate": "Network {{network}} already has an Instance with host name: {{hostname}}.", + "vm.addnic.insufficient.capacity": "Insufficient capacity when adding NIC to Instance {{instance}}: {{error}}.", + "vm.addnic.ip.invalid": "Invalid format for IP address parameter {{ipAddress}}.", + "vm.addnic.mac.generation.failed": "A MAC address cannot be generated for the NIC in the Network {{network}}.", + "vm.addnic.network.nic.mac.exists": "Unable to add NIC to the Instance {{instance}} as a NIC with same MAC address {{macAddress}} already exists in the Network {{network}}.", "vm.addnic.network.not.found": "Unable to add NIC to the Instance {{instance}} as the specified Network not found.", "vm.addnic.network.sharedfs.account.scope": "Unable to add NIC to the Instance {{instance}} as shared network {{network}} which is not Account scoped and not belonging to the same account can not be added to a Shared FileSystem Instance.", - "vm.addnic.network.nic.mac.exists": "Unable to add NIC to the Instance {{instance}} as a NIC with same MAC address {{macAddress}} already exists in the Network {{network}}.", - "vm.addnic.ip.invalid": "Invalid format for IP address parameter {{ipAddress}}.", + "vm.addnic.pending.jobs.exceeded": "There are too many pending jobs to add network {{network}} to Instance {{instance}}.", + "vm.addnic.resource.unavailable": "Unable to add NIC to the Instance {{instance}}: {{error}}.", + "vm.addnic.vm.having.snapshots": "Unable to add NIC to the Instance {{instance}} as it has Instance Snapshots.", + "vm.addnic.vm.not.found": "Unable to add NIC as the specified Instance is not found.", "vm.addnic.zone.basic.not.allowed": "Zone {{zone}}, has a NetworkType of Basic. Can't add a new NIC to a Instance on a Basic Network.", "vm.addnic.zone.mismatch": "Instance {{instance}} is in Zone {{instanceZone}} but the Network {{network}} is in Zone {{networkZone}}.", - "vm.addnic.hostname.duplicate": "Network {{network}} already has an Instance with host name: {{hostname}}.", - "vm.addnic.resource.unavailable": "Unable to add NIC to the Instance {{instance}}: {{error}}.", - "vm.addnic.insufficient.capacity": "Insufficient capacity when adding NIC to Instance {{instance}}: {{error}}.", - "vm.addnic.concurrent.operation": "Concurrent operations on adding NIC to Instance {{instance}}: {{error}}.", - "vm.addnic.cleanup.failed": "Error while cleaning up NIC: {{error}}.", - "vm.addnic.mac.generation.failed": "A MAC address cannot be generated for the NIC in the Network {{network}}.", - "vm.addnic.already.exists": "A NIC already exists for Instance {{instance}} in Network: {{network}}.", - "vm.removenic.vm.not.found": "Unable to remove NIC as the specified Instance is not found.", - "vm.removenic.vm.having.snapshots": "Unable to remove NIC from the Instance {{instance}} as it has Instance Snapshots.", - "vm.removenic.nic.not.found": "Unable to remove NIC from the Instance {{instance}} as the specified NIC is not found.", - "vm.removenic.network.not.found": "Unable to remove NIC {{nic}} from the Instance {{instance}} as a network for the NIC is not found.", - "vm.removenic.zone.basic.not.allowed": "Zone {{zone}}, has a NetworkType of Basic. Can't remove a NIC from a Instance on a Basic Network.", - "vm.removenic.nic.not.attached": "Unable to remove NIC {{nic}} from the Instance {{instance}} as it is not attached.", - "vm.removenic.default.nic": "Unable to remove NIC {{nic}} from the Instance {{instance}} in Network {{network}} it is the default NIC for the Instance.", - "vm.removenic.nic.with.rules": "Unable to remove NIC {{nic}} from the Instance {{instance}} in Network {{network}}, as it has associated Port forwarding or Load balancer or Static NAT rules.", - "vm.removenic.resource.unavailable": "Unable to remove NIC for the Network {{network}} from the Instance {{instance}}: {{error}}.", - "vm.removenic.concurrent.operation": "Concurrent operations on removing the Network {{network}} from the Instance {{instance}}: {{error}}.", - "vm.removenic.failed": "Unable to remove the NIC {{nic}} from the Instance {{instance}}.", - "vm.updatenic.nic.not.found": "Unable to update NIC as the specified NIC is not found.", - "vm.updatenic.nic.not.found.admin": "Unable to update NIC as the specified NIC ID: {{nicId} is not found.", - "vm.updatenic.vm.not.found": "Unable to update NIC as the specified Instance is not found.", - "vm.updatenic.vm.having.snapshots": "Unable to update NIC for the Instance {{instance}} as it has Instance Snapshots.", - "vm.updatenic.nic.not.found": "Unable to update NIC for the Instance {{instance}} as the specified NIC is not found.", - "vm.updatenic.vm.hypervisor.not.kvm": "Unable to update NIC {{nic}} for the Instance {{instance}} as NIC update is only supported with KVM hypervisor.", - "vm.updatenic.nic.network.not.found": "Unable to update NIC {{nic}} for the Instance {{instance}} as the Network for the NIC is not found.", - "vm.updatenic.zone.basic.not.allowed": "Zone {{zone}}, has a NetworkType of Basic. Can't change default NIC on a Basic Network.", - "vm.updatenic.nic.not.attached": "Unable to update NIC {{nic}} for the Instance {{instance}} as the NIC is not attached to the Instance.", - "vm.updatenic.nic.already.default": "NIC {{nic}} is already the default for the Instance {{instance}}.", - "vm.updatenic.vm.not.running.or.stopped": "Unable to update NIC {{nic}} for the Instance {{instance}} as the Instance not Running or Stopped.", - "vm.updatenic.nic.profile.not.found": "Unable to update NIC {{nic}} for the Instance {{instance}} as failed to find a NIC profile for the existing default Network.", - "vm.updatenic.default.update.failed": "Setting a default NIC failed, and we had no default nic, but we were unable to set it back to the original.", - "vm.updatenic.default.no.default": "Unable to update default NIC to {{nic}} for the Instance {{instance}} and now it has no default.", - "vm.updatenic.default.unknown.error": "Something strange happened, new default network {{newDefaultNetwork}} is not null, and is not equal to the network {{networkId}} of the chosen nic.", - "vm.updatenic.job.execution.failed": "Unexpected job execution result.", - "vm.updatenic.job.exception": "Exception while updating Instance {{instance}} NIC.", - "vm.updatenic.job.exception.admin": "Exception while updating Instance {{instance}} NIC. Check logs for more information.", - "vm.updatenicip.nic.not.found": "There is no nic for the {{nicId}}.", - "vm.updatenicip.nic.not.user.vm": "The nic is not belongs to user vm.", - "vm.updatenicip.vm.not.found": "There is no vm with the nic.", - "vm.updatenicip.network.not.found": "There is no network with the nic.", - "vm.updatenicip.network.not.right.state": "Network is not in the right state to update vm nic ip. Correct states are: {{allowedStates}}.", - "vm.updatenicip.offering.not.found": "There is no network offering with the network.", - "vm.updatenicip.vm.running": "VM is not Stopped, unable to update the vm nic having the specified id.", - "vm.updatenicip.datacenter.not.found": "There is no dc with the NIC.", - "vm.updatenicip.allocation.failed.capacity": "Allocating IP to guest NIC {{nic}} failed, for insufficient address capacity.", - "vm.updatenicip.allocation.failed.choose.another": "Allocating IP to guest NIC {{nic}} failed, please choose another IP.", - "vm.updatenicip.pod.id.null": "Instance Pod ID is null in Basic zone; can't decide the range for IP allocation.", - "vm.updatenicip.allocation.failed.basic": "Allocating IP to guest NIC {{nicId}} failed, please choose another IP.", - "vm.updatenicip.not.supported.l2.network": "UpdateVmNicIpCmd is not supported in L2 network.", - "vm.upgrade.vm.uuid.not.found": "Unable to find VM's UUID.", - "vm.upgrade.external.hypervisor.not.supported": "Operation not supported for instance: {{instance}} as it is external hypervisor instance.", - "vm.upgrade.hypervisor.not.supported": "Scaling the VM dynamically is not supported for VMs running on Hypervisor {{hypervisorType}}.", - "vm.upgrade.dynamic.scaling.flag.mismatch": "Unable to Scale VM: since dynamic scaling enabled flag is not same for new service offering and old service offering.", - "vm.upgrade.disk.offering.strictness.mismatch": "Unable to Scale VM, since disk offering strictness flag is not same for new service offering and old service offering.", - "vm.upgrade.disk.offering.id.not.same": "Unable to Scale VM, since disk offering id associated with the old service offering is not same for new service offering.", - "vm.upgrade.vm.sunning.scale.down.unsupported": "Scaling down is not supported while the VM is running. The new service offering attributes {\"memory\": {{newMemory}}, \"CPU speed\": {{newSpeed}}, \"vCPUs\": {{newCPU}}} must not be lower than the current values {\"memory\": {{currentMemory}}, \"CPU speed\": {{currentSpeed}}, \"vCPUs\": {{currentCPU}}}." - "vm.scale.vgpu.not.supported": "Dynamic scaling of vGPU type is not supported. VM has vGPU Type: {{vgpuType}}.", - "vm.scale.dynamic.scaling.disabled": "Dynamically scaling Instances is disabled for this zone, please contact your admin.", - "vm.scale.dynamic.scaling.not.supported": "Unable to scale {{instance}} as it does not have tools to support dynamic scaling.", - "vm.scale.insufficient.resources": "Unable to scale {{instance}} due to insufficient resources.", - "vm.scale.up.required": "While the VM is running, only scalling up it is supported. New service offering {{newOffering}} should have at least one value (ram, speed or cpu) greater than the current values {{currentOffering}}.", - "vm.scale.kvm.fixed.offering.not.supported": "Unable to live scale VM on KVM when current service offering is a Fixed Offering. KVM needs the tag maxMemory to live scale and it is only configured when VM is deployed with a custom service offering and Dynamic Scalable is enabled.", - "vm.scale.root.volume.change.failed": "Failed to change disk offering of the root volume.", - "vm.scale.hypervisor.simulator.root.resize.not.supported": "Hypervisor {{hypervisorType}} does not support volume resize.", - "vm.recover.vm.not.found": "Unable to find an Instance with id {{vmId}}.", - "vm.recover.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", - "vm.recover.permission.denied": "Recovering a vm can only be done by an Admin. Or when the allow.user.expunge.recover.vm key is set.", - "vm.recover.vm.removed": "Unable to find vm by id {{vmUuid}}.", - "vm.recover.vm.not.destroyed": "Vm with id {{vmUuid}} is not in the right state.", - "vm.recover.account.deleted": "Unable to recover Instance as the Account is deleted.", - "vm.recover.state.transition.failed": "Unable to recover the vm {{instance}} because it is not in the correct state. Current state: {{instanceState}}.", - "vm.resize.volume.root.not.found": "Root volume for Instance not found while preparing resize.", - "vm.resize.volume.current.diskoffering.not.found": "Could not find disk offering matching the current root offering ID.", - "vm.resize.volume.new.diskoffering.not.found": "Could not find disk offering for resizing the root volume.", - "vm.resize.volume.new.offering.smaller": "Failed to resize root volume. New Service Offering {{newOffering}} has a smaller disk size ({{newSize}} GB) than the current disk ({{currentSize}} GB).", - "vm.update.owner.not.found": "The owner of Instance {{instance}} does not exist.", - "vm.update.non.dynamic.cpu.memory.not.updatable": "CPU number, memory, and CPU speed cannot be updated for a non-dynamic service offering.", - "vm.update.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", - "vm.update.ova.details.cleanup.not.allowed": "OVA detail settings are read from OVA and cannot be cleaned up via API call.", - "vm.update.lease.params.in.details": "Lease parameters should not be included in the details map as a key.", - "vm.update.extraconfig.in.details": "'extraconfig' should not be included in the details map as a key.", - "vm.update.ova.details.change.not.allowed": "OVA detail settings are read from OVA and cannot be changed via API call.", - "vm.update.detail.restricted": "You are not allowed to add or edit the restricted setting: {{detailName}}.", - "vm.update.detail.readonly": "You are not allowed to add or edit the read-only setting: {{detailName}}.", - "vm.update.detail.nondisplayable": "You are not allowed to add or edit the non-displayable setting: {{detailName}}.", - "vm.update.extraconfig.disabled": "Cannot set extraconfig because enable.additional.vm.configuration is disabled.", - "vm.update.vm.not.found": "Unable to find virtual machine with specified ID.", - "vm.update.guestos.not.found": "Please specify a valid guest OS ID.", - "vm.update.instance.name.not.unique": "Instance name {{instanceName}} is not unique.", - "vm.update.vm.not.right.state": "Instance {{instance}} is not in the right state for this operation.", - "vm.update.ha.offering.disabled": "Cannot enable HA for the Instance as its Service Offering has HA disabled.", - "vm.update.dynamic.scaling.template.not.supported": "Dynamic Scaling cannot be enabled for the Instance since its Template does not support dynamic scaling.", - "vm.update.dynamic.scaling.offering.not.supported": "Dynamic Scaling cannot be enabled for the Instance since its Service Offering does not support dynamic scaling.", - "vm.update.dynamic.scaling.global.setting.disabled": "Dynamic Scaling cannot be enabled for the Instance as the corresponding global setting is disabled.", - "vm.update.securitygroup.vmware.not.supported": "Security group feature is not supported for VMware hypervisor.", - "vm.update.securitygroup.vm.not.stopped": "Instance {{instance}} must be stopped before updating security groups.", - "vm.update.userdata.failed": "Failed to reset userdata for the Instance.", - "vm.update.dns.router.send.failed": "Unable to send commands to virtual router to update DNS for the Instance.", - "vm.update.dns.hostname.update.failed": "Failed to update hostname for the Instance.", - "vm.update.dns.hostname.failed": "Failed to update hostname of Instance {{instance}} to {{hostname}}.", - "vm.update.userdata.network.element.not.found": "Cannot find network element for UserData provider needed for userdata update.", - "vm.reboot.vm.not.found": "Unable to find Instance with specified ID.", - "vm.reboot.vm.not.running": "The Instance {{instance}} is not running and cannot be rebooted.", - "vm.reboot.serviceoffering.not.found": "Unable to find Service Offering for the Instance.", - "vm.reboot.setup.menu.hypervisor.not.supported": "Booting into a hardware setup menu is not supported on hypervisor {{hypervisorType}}.", - "vm.expunge.permission.denied": "Account does not have permission for expunging the Instance.", - "vm.expunge.vm.not.found": "Unable to find Instance with specified ID.", - "vm.expunge.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", - "vm.expunge.admin.only": "Expunging an Instance can only be done by an Admin, or when allow.user.expunge.recover.vm is enabled.", - "vm.destroy.vm.not.found": "Unable to find Instance with specified ID.", - "vm.destroy.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", - "vm.destroy.delete.protection.enabled": "Instance {{instance}} has delete protection enabled and cannot be deleted.", - "vm.destroy.unbacked.snapshots": "There are unbacked up snapshots on the ROOT volume. Instance destroy is not permitted; please try again later.", - "vm.destroy.expunge.failed": "Failed to expunge Instance {{instance}}.", - "vm.destroy.volume.not.found": "Unable to find volume with specified ID.", - "vm.destroy.volumes.not.attached": "The supplied volumes are not DATADISK volumes attached to the Instance.", - "vm.destroy.volume.type.invalid": "Please specify a volume of type DATADISK or ROOT.", - "vm.destroy.volume.delete.protection": "Volume {{volume}} has delete protection enabled and cannot be deleted.", - "vm.destroy.failed": "Failed to destroy Instance with specified ID.", - "vm.group.create.name.exists": "Unable to create Instance group: a group named {{groupName}} already exists for Account {{account}}.", - "vm.group.delete.not.found": "Unable to find Instance group with specified ID.", - "vm.group.add.lock.failed": "Failed to acquire lock on Instance group {{group}}.", - "vm.deploy.basic.network.not.found": "Unable to find a default network to deploy the Instance.", - "vm.deploy.securitygroup.vmware.not.supported": "Security group feature is not supported for VMware hypervisor.", - "vm.deploy.sg.network.not.found": "No network with security group enabled is found in zone {{zone}}.", - "vm.deploy.sg.multiple.networks.not.supported": "Only one network per VM is supported when security group is enabled.", - "vm.deploy.network.not.found": "Unable to find network with specified ID.", - "vm.deploy.network.provider.not.enabled.in.zone": "Network in which Instance is getting deployed could not be stretched to the zone as no valid physical network provider was found.", - "vm.deploy.sg.network.not.sg.enabled": "Network {{network}} is not security group enabled and is not an L2 network.", - "vm.deploy.sg.advanced.network.type.invalid": "Only Shared or L2 Guest networks can be specified when deploying a VM in an Advanced Security Group enabled zone.", - "vm.deploy.advanced.vpc.template.hypervisor.not.supported": "Cannot create Instance from Template with hypervisor {{hypervisorType}} in VPC Network {{network}}.", - "vm.deploy.advanced.vpc.hypervisor.not.supported": "Cannot create Instance of hypervisor type {{hypervisorType}} in VPC Network.", - "vm.deploy.network.system.only": "Network {{network}} is system only and cannot be used for VM deployment.", - "vm.deploy.network.offering.required.not.found": "Unable to find a network offering with Required availability to automatically create the network as part of VM creation.", - "vm.deploy.network.none.found.for.account": "No virtual networks found for Account {{account}}.", - "vm.deploy.network.multiple.default.found": "More than one default Isolated network found for Account {{account}}; please specify networkIds.", - "vm.deploy.network.offering.required.not.enabled": "Required network offering {{offering}} is not in Enabled state.", - "vm.deploy.physical.network.not.found": "Unable to find physical network with ID {{physicalNetworkId}} and tag {{tag}}.", - "vm.deploy.dhcp.options.network.no.nic": "Instance does not have a NIC in network {{network}} specified in the extra DHCP options.", - "vm.deploy.hostname.invalid": "Invalid hostname. Must be 1-63 chars, letters/digits/hyphens, cannot start or end with a hyphen or start with a digit.", - "vm.deploy.owner.disabled": "The owner of the Instance to deploy is disabled: {{owner}}.", - "vm.deploy.hypervisor.missing.or.invalid": "Hypervisor parameter is required to deploy the VM, or the value provided is invalid.", - "vm.deploy.hypervisor.mismatch": "The specified hypervisor type differs from the hypervisor type of the Template.", - "vm.deploy.zone.disabled": "Cannot deploy Instance: zone {{zone}} is currently disabled.", - "vm.deploy.zone.domain.not.found": "Unable to find the domain for zone {{zone}}.", - "vm.deploy.iso.disk.offering.required": "Installing from ISO requires a disk offering to be specified for the root disk.", - "vm.deploy.root.encryption.hypervisor.not.supported": "Root volume encryption is not supported for hypervisor type {{hypervisorType}}.", - "vm.deploy.security.group.not.found": "Unable to find security group with specified ID.", - "vm.deploy.datadisk.template.invalid": "Invalid datadisk Template ID specified.", - "vm.deploy.datadisk.template.not.child": "Datadisk Template {{dataDiskTemplate}} does not belong to Template {{template}}.", - "vm.deploy.datadisk.template.offering.invalid": "Invalid disk offering {{diskOffering}} specified for datadisk Template {{dataDiskTemplate}}.", - "vm.deploy.datadisk.template.custom.offering.not.supported": "Custom disk offerings are not supported for datadisk Templates.", - "vm.deploy.datadisk.template.offering.too.small": "Disk offering {{diskOffering}} size is smaller than datadisk Template {{dataDiskTemplate}} size.", - "vm.deploy.affinity.group.not.found": "Unable to find affinity group with specified ID.", - "vm.deploy.affinity.group.type.not.supported": "Affinity group type {{groupType}} is not supported for group {{group}}.", - "vm.deploy.affinity.group.domain.mismatch": "Affinity Group {{group}} does not belong to the VM's domain.", - "vm.deploy.affinity.group.account.mismatch": "Affinity Group {{group}} does not belong to the VM's account.", - "vm.deploy.system.template.not.allowed": "System template {{template}} cannot be used to deploy a user VM.", - "vm.deploy.volume.zone.mismatch": "The volume's zone {{volumeZone}} does not match the provided zone {{zone}}.", - "vm.deploy.snapshot.zone.mismatch": "The snapshot does not exist in zone {{zone}}.", - "vm.deploy.template.not.available": "Template {{template}} is not available for use.", - "vm.deploy.iso.not.bootable": "Installing from ISO requires a bootable ISO. The provided ISO {{iso}} is not bootable.", - "vm.deploy.keypairs.not.found": "Not all specified SSH keypairs exist.", - "vm.deploy.network.zone.mismatch": "Network {{network}} does not belong to zone {{zone}}.", - "vm.deploy.network.not.stretched": "Network {{network}} cannot be stretched to zone {{zone}} for VM deployment.", - "vm.deploy.userdata.network.service.not.found": "Cannot deploy Instance with UserData: the default network {{network}} does not support the UserData service.", - "vm.deploy.sshkey.network.service.not.found": "Cannot deploy Instance with SSH keypair: the default network {{network}} does not support the UserData service.", - "vm.deploy.template.password.network.service.not.found": "Cannot deploy Instance from password-enabled template {{template}}: the default network {{network}} does not support the UserData service.", - "vm.deploy.securitygroup.service.not.enabled": "Cannot deploy Instance with security groups: SecurityGroup service is not enabled for the VM's network.", - "vm.deploy.default.network.missing": "At least one default network must be specified for the Instance.", - "vm.deploy.default.network.multiple": "Only one default network per Instance is supported.", - "vm.deploy.hostname.exists": "An Instance with hostname {{hostname}} already exists.", - "vm.deploy.displayname.exists": "An Instance with the supplied display name already exists.", - "vm.deploy.group.assign.failed": "Unable to assign Instance to group {{group}}.", - "vm.deploy.disk.offering.custom.size.required": "This disk offering requires a custom size to be specified.", - "vm.deploy.root.disk.size.not.positive": "Root disk size must be a positive number.", - "vm.deploy.root.disk.size.override.not.supported": "Hypervisor {{hypervisorType}} does not support root disk size override.", - "vm.deploy.hostname.network.domain.exists": "An Instance with hostname {{hostname}} already exists in the network domain.", - "vm.deploy.root.disk.size.smaller.than.template": "Root disk size override ({{rootDiskSize}} GB) is smaller than the template size.", - "vm.deploy.root.disk.controller.invalid": "Unsupported root disk controller {{diskController}} for resizing.", - "vm.deploy.userdata.both.inputs": "Both userdata and userdata ID inputs are not allowed; please provide only one.", - "vm.deploy.userdata.override.denied": "UserData input is not allowed since template {{template}} is configured to deny userdata override.", - "vm.deploy.userdata.template.linked.not.found": "UserData linked to the template {{template}} is not found.", - "vm.deploy.userdata.policy.not.supported": "UserData policy {{policy}} is not supported.", - "vm.deploy.template.not.vnf": "Cannot deploy VNF appliance from a non-VNF template.", - "vm.deploy.template.deploy.as.is.root.disk.size.not.allowed": "Cannot deploy VM: a service offering with root disk size cannot be used with a deploy-as-is template.", - "vm.deploy.template.deploy.as.is.override.disk.size.not.supported": "Overriding root disk size is not supported for VMs deployed from deploy-as-is templates.", - "vm.deploy.template.deploy.as.is.boot.not.supported": "Boot type and boot mode are not supported on VMware for deploy-as-is templates.", - "vm.deploy.snapshot.template.not.determinable": "Could not determine template from snapshot. The source volume no longer exists. Please specify a templateId.", - "vm.deploy.backup.userdata.not.supported": "User data is not supported for instances created from a backup.", - "vm.deploy.basic.zone.network.ids.not.allowed": "Network IDs cannot be specified when deploying in a Basic zone.", - "vm.deploy.securitygroup.zone.not.enabled": "Cannot create Instance with security groups: security group feature is not enabled for this zone.", - "vm.deploy.lease.duration.invalid": "Invalid lease duration. Must be a natural number >= 1 or -1; maximum value is 36500.", - "vm.deploy.lease.params.both.required": "Both leaseduration and leaseexpiryaction must be specified together.", - "vm.deploy.lease.no.active.lease": "Lease cannot be applied to Instance {{instance}}: it does not have an active lease associated from deployment.", - "vm.deploy.lease.not.pending": "Lease cannot be applied to Instance {{instance}}: the lease is not in PENDING state.", - "vm.deploy.lease.expired.redefinition": "Lease cannot be redefined on an expired leased instance.", - "vm.deploy.volume.storage.pool.zone.required": "VM deployment from a volume is supported only for Zone-wide storage pools.", - "vm.deploy.volume.already.attached": "Volume {{volume}} is already attached to another VM.", - "vm.deploy.volume.template.mismatch": "The volume's template does not match the provided template.", - "vm.deploy.volume.snapshot.no.template": "The provided volume or snapshot does not have a template for VM deployment.", - "vm.deploy.security.group.id.and.name.exclusive": "The securitygroupids and securitygroupnames parameters are mutually exclusive.", - "vm.deploy.security.group.name.not.found": "Unable to find security group with name {{groupName}}.", - "vm.deploy.detail.extraconfig.prefix.not.allowed": "Detail name should not start with 'extraconfig'.", - "vm.deploy.iops.both.or.neither": "Either both Min IOPS and Max IOPS must be specified, or neither.", - "vm.deploy.iops.min.not.integer": "Min IOPS must be a whole number.", - "vm.deploy.iops.max.not.integer": "Max IOPS must be a whole number.", - "vm.deploy.iops.min.greater.than.max": "Min IOPS must be less than or equal to Max IOPS.", - "vm.deploy.ovf.sg.network.not.found": "No network with security enabled found in zone {{zone}} for OVF network mapping.", - "vm.deploy.ovf.default.network.not.found": "Default network not found for zone {{zone}} and account {{account}} for OVF network mapping.", - "vm.stop.force.permission.denied": "Account does not have permission to force stop the Instance.", - "vm.stop.account.removed": "The caller account has been removed and cannot be used.", - "vm.stop.vm.not.found": "Unable to find Instance with specified ID.", - "vm.start.host.capacity.insufficient": "Cannot deploy VM to specified host {{host}}: insufficient CPU or RAM capacity.", - "vm.start.password.not.provided": "A valid password for the Instance was not provided.", - "vm.start.setup.menu.hypervisor.not.applicable": "Boot into setup mode is not applicable for hypervisor {{hypervisorType}}.", - "vm.start.planner.not.found": "Cannot find deployment planner '{{plannerName}}'.", - "vm.start.account.removed": "The caller account {{account}} has been removed.", - "vm.start.vm.not.found": "Unable to find Instance with specified ID.", - "vm.start.vm.already.running": "The Instance {{instance}} is already running.", - "vm.start.owner.not.found": "The owner of Instance {{instance}} does not exist.", - "vm.start.owner.disabled": "The owner of Instance {{instance}} is disabled.", - "vm.start.pod.root.admin.only": "Only root administrators can specify a pod ID for VM deployment.", - "vm.start.pod.not.found": "Unable to find pod with specified ID for VM deployment.", - "vm.start.cluster.root.admin.only": "Only root administrators can specify a cluster ID for VM deployment.", - "vm.start.cluster.not.found": "Unable to find cluster with specified ID for VM deployment.", - "vm.start.host.root.admin.only": "Only root administrators can specify a host ID for VM deployment.", - "vm.start.host.not.found": "Unable to find host with specified ID for VM deployment.", - "vm.start.host.not.right.state": "Cannot deploy Instance on host {{host}} as it is not in the correct state.", - "vm.migrate.storage.permission.denied": "No permission to migrate VM storage. Only root administrators can perform this operation.", - "vm.migrate.storage.vm.not.found": "Unable to find Instance with specified ID for storage migration.", - "vm.migrate.storage.nonuser.hypervisor.not.supported": "Unable to migrate storage of non-user VM for hypervisor {{hypervisorType}}.", - "vm.migrate.storage.data.disks.attached": "Data disks are attached to the Instance. Detach all data disks before migrating storage.", - "vm.migrate.storage.snapshots.exist": "Instance disk cannot be migrated. Remove all Instance Snapshots before proceeding.", - "vm.migrate.storage.nonuser.different.pods": "Storage migration of non-user VMs between storage pools in different pods is not supported.", - "vm.migrate.storage.suitability.failed": "Storage suitability check failed for volume {{volume}}: {{error}}.", - "vm.migrate.storage.different.clusters": "VM disk migration failed: destination storage pools belong to different clusters.", - "vm.migrate.storage.access.groups.mismatch": "Destination pool {{pool}} does not have matching storage access groups as host {{host}}.", - "vm.migrate.storage.hypervisor.mismatch": "Hypervisor mismatch for storage migration: destination has {{destHypervisor}}, VM requires {{vmHypervisor}}.", - "vm.migrate.permission.denied": "No permission to migrate VM. Only root administrators can perform this operation.", - "vm.migrate.vm.not.found": "Unable to find Instance with specified ID for migration.", - "vm.migrate.gpu.not.supported": "Live migration of GPU-enabled Instance is not supported.", - "vm.migrate.hypervisor.not.supported": "Unsupported hypervisor type for VM migration. Supported: XenServer, VMware, KVM, OVM, Hyper-V, OVM3.", - "vm.migrate.local.storage.not.supported": "VM uses local storage and cannot be live migrated.", - "vm.migrate.source.host.not.found": "Cannot migrate VM: source host not found.", - "vm.migrate.destination.not.found": "Unable to find a suitable destination to migrate Instance {{instance}}.", - "vm.migrate.affinity.conflict": "Unable to create migration deployment: affinity rules conflict.", - "vm.migrate.server.not.found": "Unable to find a server to migrate the Instance to.", - "vm.migrate.storage.access.groups.src.has.dest.none": "Source host has storage access groups but destination host has none.", - "vm.migrate.storage.access.groups.mismatch.hosts": "Storage access groups on the source and destination hosts do not match.", - "vm.migrate.host.tags.mismatch": "Cannot migrate Instance: destination host {{host}} does not match the host tags of the service offering.", - "vm.migrate.vm.already.on.host": "Cannot migrate Instance: the Instance is already on the destination host. Please specify a different host.", - "vm.migrate.destination.host.not.right.state": "Cannot migrate Instance: destination host {{host}} is not in the correct state.", - "vm.migrate.destination.different.pod": "Cannot migrate Instance: destination host is not in the same pod as the current host.", - "vm.migrate.dpdk.host.not.supported": "Cannot migrate DPDK-enabled Instance to a host that is not DPDK-enabled.", - "vm.migrate.unbacked.snapshots": "There are unbacked up snapshots on volumes attached to this Instance. Migration is not permitted; please try again later.", - "vm.migrate.host.maintenance.mode": "Operation {{operation}} on Instance {{instance}} is not allowed as the host is preparing for maintenance mode.", - "vm.migrate.storage.source.host.not.found": "Cannot migrate VM with storage: source host not found.", - "vm.migrate.storage.vm.already.on.host": "Cannot migrate VM with storage: Instance is already on the destination host. Please specify a different host.", - "vm.migrate.storage.hypervisor.version.mismatch": "Source and destination hosts must have the same hypervisor type and version for migration with storage.", - "vm.migrate.storage.source.hypervisor.not.supported": "Migration with storage is not supported for source host {{host}} on hypervisor {{hypervisorType}} version {{version}}.", - "vm.migrate.storage.destination.hypervisor.not.supported": "Migration with storage is not supported for destination host {{host}} on hypervisor {{hypervisorType}} version {{version}}.", - "vm.migrate.storage.destination.host.not.right.state": "Cannot migrate VM with storage: destination host {{host}} is not in the correct state.", - "vm.migrate.storage.volume.not.ready": "Volume {{volume}} of the Instance is not in Ready state. Cannot proceed with storage migration.", - "vm.migrate.storage.volume.not.found": "Volume with specified ID not found for storage migration.", - "vm.migrate.storage.pool.not.found": "Storage pool with specified ID not found for migration.", - "vm.migrate.storage.volume.pool.incompatible": "Cannot migrate volume {{volume}} to destination storage pool {{pool}}: incompatible hypervisor type.", - "vm.migrate.storage.volume.vm.mismatch": "Volume {{volume}} does not belong to Instance {{instance}} being migrated.", - "vm.migrate.storage.volume.pool.access.groups.mismatch": "Destination pool {{pool}} for volume {{volume}} does not have matching storage access groups as host {{host}}.", - "vm.migrate.storage.volume.pool.unsuitable": "Unable to migrate {{volume}} to destination storage pool {{pool}}: {{error}}.", - "vm.migrate.storage.volume.policy.noncompliant": "Storage pool {{pool}} is not compliant with the storage policy for volume {{volume}}.", - "vm.migrate.storage.volume.policy.verify.failed": "Failed to verify storage policy compliance for storage pool {{pool}}.", - "vm.migrate.storage.hypervisor.not.supported": "Unsupported hypervisor {{hypervisorType}} for VM migration with storage.", - "vm.migrate.storage.instance.snapshots.exist": "Instance cannot be migrated with storage because it has Instance Snapshots. Remove all Instance Snapshots first.", - "vm.migrate.storage.no.volume.migration": "Migration of Instance {{instance}} from host {{srcHost}} to {{destHost}} does not involve migrating any volumes.", - "vm.migrate.host.source.prepare.failed": "Failed to prepare source host for migration of Instance {{instance}}.", - "vm.migrate.host.source.prepare.failed.admin": "Failed to prepare source host {{srcHost}} for migration of Instance {{instance}}: {{error}}.", - "vm.assign.permission.denied": "Only root or domain administrators are allowed to assign VMs. Caller {{caller}} is of type {{callerType}}.", + "vm.allocate.concurrent.operation": "Concurrent operation occurred while trying to allocate resources for the Instance.", + "vm.assign.advanced.sg.no.network": "No network specified for moving the Instance. Please specify a network or add a network to the Instance.", + "vm.assign.applicable.network.not.found": "Could not find an applicable network to create virtual machine for account {{account}}.", + "vm.assign.basic.zone.network.ids.not.allowed": "Cannot move Instance with Network IDs; this is a basic zone Instance.", + "vm.assign.default.network.not.found": "Unable to find a default network to start the Instance.", "vm.assign.domain.id.null": "Please provide a valid domain ID. Cannot assign VM to a project if domain ID is null.", + "vm.assign.loadbalancer.rules.exist": "Remove all Load Balancing rules for Instance {{instance}} before assigning it to another user.", + "vm.assign.multiple.default.networks": "More than one default isolated network found for account {{account}}. Please specify networkIDs.", + "vm.assign.network.implement.failed": "Failed to implement network {{network}} elements and resources as part of network provision.", + "vm.assign.network.not.found": "Unable to find network with specified ID.", + "vm.assign.network.offering.required.not.enabled": "Required network offering {{offering}} is not in Enabled state.", + "vm.assign.network.offering.required.not.found": "Unable to find a Required network offering to automatically create the network during VM assignment.", + "vm.assign.network.system.only": "Network {{network}} is system only and cannot be used for VM deployment.", + "vm.assign.networks.update.failed": "Unable to update networks when assigning Instance {{instance}}.", + "vm.assign.new.account.disabled": "The new account owner {{account}} is disabled.", + "vm.assign.new.account.invalid": "Invalid new account {{account}} for VM in domain {{domain}}.", + "vm.assign.old.account.invalid": "Invalid old account for VM in domain {{domain}}.", + "vm.assign.onetoonat.rule.exists": "Remove the One-to-One NAT rule for Instance {{instance}} and IP {{ip}} before assigning it.", + "vm.assign.permission.denied": "Only root or domain administrators are allowed to assign VMs. Caller {{caller}} is of type {{callerType}}.", + "vm.assign.physical.network.not.found": "Unable to find physical network with ID {{physicalNetworkId}} and tag {{tag}}.", + "vm.assign.portforwarding.rules.exist": "Remove all Port Forwarding rules for Instance {{instance}} before assigning it to another user.", + "vm.assign.same.account": "The new account {{account}} is the same as the old account.", + "vm.assign.securitygroup.vmware.not.supported": "Security group feature is not supported for VMware hypervisor.", + "vm.assign.securitygroup.zone.not.enabled": "Cannot move Instance with security groups: security group feature is not enabled in this zone.", + "vm.assign.sharedfs.not.supported": "Assignment is not supported for Shared FileSystem Instances.", + "vm.assign.staticnat.rules.exist": "Remove all Static NAT rules for Instance {{instance}} before assigning it to another user.", + "vm.assign.template.access.denied": "New owner does not have access to the template of Instance {{instance}}.", + "vm.assign.template.not.found": "Template for Instance {{instance}} cannot be found.", "vm.assign.vm.not.found": "Unable to find Instance with specified ID for assignment.", "vm.assign.vm.not.right.state": "Cannot move Instance {{instance}} in {{instanceState}} state.", - "vm.assign.sharedfs.not.supported": "Assignment is not supported for Shared FileSystem Instances.", - "vm.assign.portforwarding.rules.exist": "Remove all Port Forwarding rules for Instance {{instance}} before assigning it to another user.", - "vm.assign.staticnat.rules.exist": "Remove all Static NAT rules for Instance {{instance}} before assigning it to another user.", - "vm.assign.loadbalancer.rules.exist": "Remove all Load Balancing rules for Instance {{instance}} before assigning it to another user.", - "vm.assign.onetoonat.rule.exists": "Remove the One-to-One NAT rule for Instance {{instance}} and IP {{ip}} before assigning it.", "vm.assign.volume.snapshots.exist": "Snapshots exist for volume {{volume}}. Detach the volume or remove all snapshots before assigning the Instance.", - "vm.assign.template.not.found": "Template for Instance {{instance}} cannot be found.", - "vm.assign.template.access.denied": "New owner does not have access to the template of Instance {{instance}}.", - "vm.assign.securitygroup.zone.not.enabled": "Cannot move Instance with security groups: security group feature is not enabled in this zone.", - "vm.assign.network.offering.required.not.found": "Unable to find a Required network offering to automatically create the network during VM assignment.", - "vm.assign.network.offering.required.not.enabled": "Required network offering {{offering}} is not in Enabled state.", - "vm.assign.networks.update.failed": "Unable to update networks when assigning Instance {{instance}}.", - "vm.assign.old.account.invalid": "Invalid old account for VM in domain {{domain}}.", - "vm.assign.new.account.invalid": "Invalid new account {{account}} for VM in domain {{domain}}.", - "vm.assign.new.account.disabled": "The new account owner {{account}} is disabled.", - "vm.assign.same.account": "The new account {{account}} is the same as the old account.", - "vm.assign.basic.zone.network.ids.not.allowed": "Cannot move Instance with Network IDs; this is a basic zone Instance.", - "vm.assign.advanced.sg.no.network": "No network specified for moving the Instance. Please specify a network or add a network to the Instance via the NICs tab.", - "vm.assign.default.network.not.found": "Unable to find a default network to start the Instance.", - "vm.assign.securitygroup.vmware.not.supported": "Security group feature is not supported for VMware hypervisor.", - "vm.assign.applicable.network.not.found": "Could not find an applicable network to create virtual machine for account {{account}}.", - "vm.assign.multiple.default.networks": "More than one default isolated network found for account {{account}}. Please specify networkIDs.", - "vm.assign.network.system.only": "Network {{network}} is system only and cannot be used for VM deployment.", - "vm.assign.physical.network.not.found": "Unable to find physical network with ID {{physicalNetworkId}} and tag {{tag}}.", - "vm.assign.network.implement.failed": "Failed to implement network {{network}} elements and resources as part of network provision.", - "vm.restore.disk.offering.not.found": "Cannot find disk offering with the specified ID.", - "vm.restore.disk.offering.strict.mismatch": "The service offering has a strict disk offering requirement, and the specified disk offering does not match.", - "vm.restore.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", - "vm.restore.instance.not.supported": "Operation not supported for Instance {{instance}}.", - "vm.restore.template.not.found": "Cannot find template with the specified ID.", - "vm.restore.template.linked.not.found": "Cannot find the template linked with the Instance.", - "vm.restore.root.disk.size.smaller.than.template": "Root disk size {{rootDiskSize}} is smaller than the template size {{templateSize}}.", - "vm.restore.disk.offering.size.smaller.than.template": "Disk size {{diskSize}} for the selected offering is less than the template size {{templateSize}}.", - "vm.restore.external.hypervisor.type.not.allowed": "Restore operation is not allowed for External hypervisor type.", - "vm.restore.unbacked.snapshots": "There are unbacked up snapshots on the ROOT volume. Re-install VM is not permitted; please try again later.", - "vm.restore.iso.cannot.use.template": "This Instance was created from an ISO and cannot be re-installed with a template.", - "vm.restore.template.id.invalid": "Invalid template ID provided to restore the Instance.", - "vm.restore.iso.not.attached": "Cannot restore the Instance: no ISO is attached to the VM.", - "vm.restore.owner.not.found": "The owner of Instance {{instance}} does not exist.", - "vm.restore.owner.disabled": "The owner of Instance {{instance}} is disabled.", - "vm.restore.vm.not.right.state": "Instance {{instance}} is in {{instanceState}} state. Restore can only be performed when the Instance is Running or Stopped.", - "vm.restore.root.volume.not.found": "Cannot find root volume for Instance {{instance}}.", - "vm.restore.multiple.root.volumes": "There are {{count}} root volumes for Instance {{instance}}; expected at most one.", - "vm.restore.snapshots.exist": "Unable to restore Instance: please remove all Instance Snapshots first.", - "vm.restore.stop.failed": "Failed to stop the Instance before restore.", - "vm.restore.password.reset.failed": "VM restore is complete but failed to reset the password.", - "vm.restore.start.failed": "Unable to start Instance after restore.", - "vm.restore.failed": "Failed to restore Instance {{instance}}.", - "vm.restore.template.not.available.in.zone": "Cannot restore Instance: template {{template}} is not available in the zone.", - "vm.restore.template.bypassed.not.available": "Cannot restore Instance: bypassed template {{template}} is not available in the zone.", - "vm.restore.managed.storage.hypervisor.not.supported": "This hypervisor type is not supported on managed storage for this command.", - "vm.restore.managed.storage.reset.failed": "Unable to reset Instance {{instance}} during managed storage operation.", - "vm.restore.managed.storage.send.failed": "Failed to send command to host for managed storage operation.", - "vm.extraconfig.vmware.key.not.allowed": "Extra config key '{{key}}' is not in the allowed list for VMware hypervisor.", - "vm.extraconfig.vmware.invalid.format": "The extra config string contains an invalid key/value pair pattern.", - "vm.extraconfig.xenserver.key.not.allowed": "Extra config key '{{key}}' is not in the allowed list for XenServer hypervisor.", - "vm.extraconfig.xenserver.invalid.format": "The extra config string contains an invalid key/value pair pattern.", - "vm.extraconfig.config.incorrect": "An incorrect extra configuration '{{config}}' was passed.", - "vm.extraconfig.account.not.enabled": "Additional VM configuration is not enabled for this account.", - "vm.extraconfig.kvm.key.not.allowed": "Extra config key '{{key}}' is not in the allowed list for KVM hypervisor.", - "vm.extraconfig.kvm.xml.parse.failed": "Failed to parse additional XML configuration.", - "vm.extraconfig.hypervisor.not.supported": "Hypervisor {{hypervisorType}} is not supported for additional VM configuration.", - "vm.extraconfig.url.decode.failed": "Failed to decode URL-encoded extra config string.", - "vm.password.encrypt.failed": "Failed to encrypt the password for the Instance.", - "vm.userdata.vm.not.found": "Unable to find Instance with specified ID.", - "vm.import.zone.invalid": "Unable to import virtual machine: invalid zone specified.", - "vm.import.host.invalid": "Unable to import virtual machine: invalid host specified.", - "vm.unmanage.vm.not.found": "Unable to find Instance with specified ID for unmanage operation.", - "vm.unmanage.vm.not.right.state": "Instance {{instance}} is not running or stopped and cannot be unmanaged.", - "vm.unmanage.failed": "Failed to unmanage Instance {{instance}}.", - "vm.unmanage.unbacked.snapshots": "There are unbacked up snapshots on the ROOT volume. VM unmanage is not permitted; please try again later.", - "vm.unmanage.volume.not.attached": "Volume {{volume}} of Instance {{instance}} is not attached to the Instance.", - "vm.unmanage.volume.type.invalid": "Volume {{volume}} has invalid type {{volumeType}}: expected ROOT or DATADISK.", - "vm.backup.root.disk.size.smaller.than.backup": "Instance root disk size {{instanceSize}} GiB cannot be less than the backed-up volume size {{backupSize}} GiB.", - "vm.backup.not.found": "Backup with specified ID does not exist.", "vm.backup.create.instance.not.supported": "Create instance from backup is not supported for this backup provider.", - "vm.backup.zone.not.found": "Unable to find zone with specified ID.", "vm.backup.cross.zone.not.supported": "Create Instance from Backup across zones is not supported by this backup provider or repository.", + "vm.backup.disk.offering.compute.only": "Disk offering {{diskOffering}} is directly mapped to a service offering. Please provide an individual disk offering.", + "vm.backup.disk.offering.iso.only": "The diskofferingid parameter is only supported for creating instances from backup when using ISO. For templates, use datadisksdetails.", + "vm.backup.disk.offering.not.found": "Unable to find disk offering with specified ID.", + "vm.backup.not.found": "Backup with specified ID does not exist.", + "vm.backup.root.disk.size.smaller.than.backup": "Instance root disk size {{instanceSize}} GiB cannot be less than the backed-up volume size {{backupSize}} GiB.", "vm.backup.service.offering.not.found": "Unable to find service offering with specified ID.", "vm.backup.service.offering.uuid.missing": "Backup does not contain a Service Offering UUID. Please specify a valid Service Offering when creating the Instance.", "vm.backup.service.offering.uuid.not.found": "Unable to find Service Offering from the UUID stored in the Backup. Please specify a valid Service Offering.", "vm.backup.template.not.found": "Unable to find template with specified ID.", "vm.backup.template.uuid.missing": "Backup does not contain a Template UUID. Please specify a valid Template or ISO when creating the Instance.", "vm.backup.template.uuid.not.found": "Unable to find Template from the UUID stored in the Backup. Please specify a valid Template or ISO.", - "vm.backup.disk.offering.iso.only": "The diskofferingid parameter is only supported for creating instances from backup when using ISO. For templates, use datadisksdetails.", - "vm.backup.disk.offering.not.found": "Unable to find disk offering with specified ID.", - "vm.backup.disk.offering.compute.only": "Disk offering {{diskOffering}} is directly mapped to a service offering. Please provide an individual disk offering.", + "vm.backup.zone.not.found": "Unable to find zone with specified ID.", + "vm.deploy.advanced.vpc.hypervisor.not.supported": "Cannot create Instance of hypervisor type {{hypervisorType}} in VPC Network.", + "vm.deploy.advanced.vpc.template.hypervisor.not.supported": "Cannot create Instance from Template with hypervisor {{hypervisorType}} in VPC Network {{network}}.", + "vm.deploy.affinity.group.account.mismatch": "Affinity Group {{group}} does not belong to the VM's account.", + "vm.deploy.affinity.group.domain.mismatch": "Affinity Group {{group}} does not belong to the VM's domain.", + "vm.deploy.affinity.group.not.found": "Unable to find affinity group with specified ID.", + "vm.deploy.affinity.group.type.not.supported": "Affinity group type {{groupType}} is not supported for group {{group}}.", + "vm.deploy.backup.userdata.not.supported": "User data is not supported for instances created from a backup.", + "vm.deploy.basic.network.not.found": "Unable to find a default network to deploy the Instance.", + "vm.deploy.basic.zone.network.ids.not.allowed": "Network IDs cannot be specified when deploying in a Basic zone.", + "vm.deploy.datadisk.template.custom.offering.not.supported": "Custom disk offerings are not supported for datadisk Templates.", + "vm.deploy.datadisk.template.invalid": "Invalid datadisk Template ID specified.", + "vm.deploy.datadisk.template.not.child": "Datadisk Template {{dataDiskTemplate}} does not belong to Template {{template}}.", + "vm.deploy.datadisk.template.offering.invalid": "Invalid disk offering {{diskOffering}} specified for datadisk Template {{dataDiskTemplate}}.", + "vm.deploy.datadisk.template.offering.too.small": "Disk offering {{diskOffering}} size is smaller than datadisk Template {{dataDiskTemplate}} size.", + "vm.deploy.default.network.missing": "At least one default network must be specified for the Instance.", + "vm.deploy.default.network.multiple": "Only one default network per Instance is supported.", + "vm.deploy.detail.extraconfig.prefix.not.allowed": "Detail name should not start with 'extraconfig'.", + "vm.deploy.dhcp.options.network.no.nic": "Instance does not have a NIC in network {{network}} specified in the extra DHCP options.", + "vm.deploy.disk.offering.custom.size.required": "This disk offering requires a custom size to be specified.", + "vm.deploy.diskoffering.compute.only": "Unable to deploy Instance as the specified disk offering {{diskOffering}} is mapped to a service offering. Specify a disk offering that is not mapped to any service offering.", + "vm.deploy.diskoffering.local.storage.zone.unsupported": "Unable to deploy Instance because the zone is not configured to use local storage, but the specified disk offering {{diskOffering}} requires it.", + "vm.deploy.diskoffering.not.found": "Unable to deploy Instance as the specified disk offering is not found.", + "vm.deploy.diskoffering.with.diskoffering.details": "Unable to deploy Instance as both a disk offering ID and data disk offering details were provided. Specify only one.", + "vm.deploy.displayname.exists": "An Instance with the supplied display name already exists.", + "vm.deploy.group.assign.failed": "Unable to assign Instance to group {{group}}.", + "vm.deploy.hostname.exists": "An Instance with hostname {{hostname}} already exists.", + "vm.deploy.hostname.invalid": "Invalid hostname. Must be 1-63 chars, letters/digits/hyphens, cannot start or end with a hyphen or start with a digit.", + "vm.deploy.hostname.network.domain.exists": "An Instance with hostname {{hostname}} already exists in the network domain.", + "vm.deploy.hypervisor.mismatch": "The specified hypervisor type differs from the hypervisor type of the Template.", + "vm.deploy.hypervisor.missing.or.invalid": "Hypervisor parameter is required to deploy the VM, or the value provided is invalid.", + "vm.deploy.hypervisor.volume.snapshot.not.supported": "Unable to deploy Instance because deployment from an existing volume or snapshot is supported only on the KVM hypervisor.", + "vm.deploy.iops.both.or.neither": "Either both Min IOPS and Max IOPS must be specified, or neither.", + "vm.deploy.iops.max.not.integer": "Max IOPS must be a whole number.", + "vm.deploy.iops.min.greater.than.max": "Min IOPS must be less than or equal to Max IOPS.", + "vm.deploy.iops.min.not.integer": "Min IOPS must be a whole number.", + "vm.deploy.iso.disk.offering.required": "Installing from ISO requires a disk offering to be specified for the root disk.", + "vm.deploy.iso.not.bootable": "Installing from ISO requires a bootable ISO. The provided ISO {{iso}} is not bootable.", + "vm.deploy.keypairs.not.found": "Not all specified SSH keypairs exist.", + "vm.deploy.lease.duration.invalid": "Invalid lease duration. Must be a natural number >= 1 or -1; maximum value is 36500.", + "vm.deploy.lease.expired.redefinition": "Lease cannot be redefined on an expired leased instance.", + "vm.deploy.lease.no.active.lease": "Lease cannot be applied to Instance {{instance}}: it does not have an active lease associated from deployment.", + "vm.deploy.lease.not.pending": "Lease cannot be applied to Instance {{instance}}: the lease is not in PENDING state.", + "vm.deploy.lease.params.both.required": "Both leaseduration and leaseexpiryaction must be specified together.", + "vm.deploy.network.multiple.default.found": "More than one default Isolated network found for Account {{account}}; please specify networkIds.", + "vm.deploy.network.none.found.for.account": "No virtual networks found for Account {{account}}.", + "vm.deploy.network.not.found": "Unable to find network with specified ID.", + "vm.deploy.network.not.found.ip.map": "The network selected {{networkId}} in IP to network map could not be found. It may have been removed or is no longer accessible.", + "vm.deploy.network.not.stretched": "Network {{network}} cannot be stretched to zone {{zone}} for VM deployment.", + "vm.deploy.network.offering.required.not.enabled": "Required network offering {{offering}} is not in Enabled state.", + "vm.deploy.network.offering.required.not.found": "Unable to find a network offering with Required availability to automatically create the network as part of VM creation.", + "vm.deploy.network.provider.not.enabled.in.zone": "Network in which Instance is getting deployed could not be stretched to the zone as no valid physical network provider was found.", + "vm.deploy.network.system.only": "Network {{network}} is system only and cannot be used for VM deployment.", + "vm.deploy.network.zone.mismatch": "Network {{network}} does not belong to zone {{zone}}.", + "vm.deploy.ovf.default.network.not.found": "Default network not found for zone {{zone}} and account {{account}} for OVF network mapping.", + "vm.deploy.ovf.sg.network.not.found": "No network with security enabled found in zone {{zone}} for OVF network mapping.", + "vm.deploy.owner.disabled": "The owner of the Instance to deploy is disabled: {{owner}}.", + "vm.deploy.physical.network.not.found": "Unable to find physical network with ID {{physicalNetworkId}} and tag {{tag}}.", + "vm.deploy.resourcelimit.exceeded.account": "Unable to deploy Instance because allocating {{resourceRequested}} more {{resourceTypeDisplay}} would exceed the {{resourceOwnerType}} limits. Current: {{resourceAmount}}, Reserved: {{resourceReserved}}, Limit: {{resourceLimit}}. Release unused resources, then retry.", + "vm.deploy.resourcelimit.exceeded.account.admin": "Unable to deploy Instance because allocating {{resourceRequested}} more {{resourceTypeDisplay}} would exceed the {{resourceOwnerType}} limits for {{resourceOwner}}. Current: {{resourceAmount}}, Reserved: {{resourceReserved}}, Limit: {{resourceLimit}}. Release unused resources or increase the limit, then retry.", + "vm.deploy.resourcelimit.exceeded.domain": "Unable to deploy Instance because allocating {{resourceRequested}} more {{resourceTypeDisplay}} would exceed the domain limits. Current: {{resourceAmount}}, Reserved: {{resourceReserved}}, Limit: {{resourceLimit}}. Release unused resources, then retry.", + "vm.deploy.resourcelimit.exceeded.domain.admin": "Unable to deploy Instance because allocating {{resourceRequested}} more {{resourceTypeDisplay}} would exceed the limits for domain {{resourceOwnerDomain}}. Current: {{resourceAmount}}, Reserved: {{resourceReserved}}, Limit: {{resourceLimit}}. Release unused resources or increase the limit, then retry.", + "vm.deploy.root.disk.controller.invalid": "Unsupported root disk controller {{diskController}} for resizing.", + "vm.deploy.root.disk.size.not.positive": "Root disk size must be a positive number.", + "vm.deploy.root.disk.size.override.not.supported": "Hypervisor {{hypervisorType}} does not support root disk size override.", + "vm.deploy.root.disk.size.smaller.than.template": "Root disk size override ({{rootDiskSize}} GB) is smaller than the template size.", + "vm.deploy.root.encryption.hypervisor.not.supported": "Root volume encryption is not supported for hypervisor type {{hypervisorType}}.", + "vm.deploy.security.group.id.and.name.exclusive": "The securitygroupids and securitygroupnames parameters are mutually exclusive.", + "vm.deploy.security.group.name.not.found": "Unable to find security group with name {{groupName}}.", + "vm.deploy.security.group.not.found": "Unable to find security group with specified ID.", + "vm.deploy.securitygroup.service.not.enabled": "Cannot deploy Instance with security groups: SecurityGroup service is not enabled for the VM's network.", + "vm.deploy.securitygroup.vmware.not.supported": "Security group feature is not supported for VMware hypervisor.", + "vm.deploy.securitygroup.zone.not.enabled": "Cannot create Instance with security groups: security group feature is not enabled for this zone.", + "vm.deploy.serviceoffering.fixed.parameters.not.allowed": "Unable to deploy the instance because the selected service offering {{serviceOffering}} does not allow specifying {{cpuNumberKey}}, {{cpuSpeedKey}}, or {{memory}}.", + "vm.deploy.serviceoffering.fixed.parameters.not.allowed.admin": "Unable to deploy the instance because the selected service offering {{serviceOffering}} is not a dynamic offering and it does not allow specifying {{cpuNumberKey}}, {{cpuSpeedKey}}, or {{memory}}.", + "vm.deploy.serviceoffering.inactive": "Unable to deploy Instance as the given service offering {{serviceOffering}} is inactive. Specify an active service offering.", + "vm.deploy.serviceoffering.local.storage.zone.unsupported": "Unable to deploy Instance because the zone is not configured to use local storage, but the disk offering mapped to service offering {{serviceOffering}} requires it.", + "vm.deploy.serviceoffering.not.found": "Unable to deploy Instance as the specified service offering is not found.", + "vm.deploy.serviceoffering.not.specified": "Unable to deploy Instance as the required parameter 'serviceofferingid' is missing.", + "vm.deploy.serviceoffering.override.not.allowed": "Unable to deploy Instance as the selected service offering {{serviceOffering}} does not allow changing the disk offering.", + "vm.deploy.serviceoffering.override.not.allowed.admin": "Unable to deploy Instance as the selected service offering {{serviceOffering}} uses disk offering strictness and does not allow changing the disk offering.", + "vm.deploy.sg.advanced.network.type.invalid": "Only Shared or L2 Guest networks can be specified when deploying a VM in an Advanced Security Group enabled zone.", + "vm.deploy.sg.multiple.networks.not.supported": "Only one network per VM is supported when security group is enabled.", + "vm.deploy.sg.network.not.found": "No network with security group enabled is found in zone {{zone}}.", + "vm.deploy.sg.network.not.sg.enabled": "Network {{network}} is not security group enabled and is not an L2 network.", + "vm.deploy.snapshot.not.found": "Unable to deploy Instance as the specified Snapshot is not found.", + "vm.deploy.snapshot.template.not.determinable": "Could not determine template from snapshot. The source volume no longer exists. Please specify a templateId.", + "vm.deploy.snapshot.zone.mismatch": "The snapshot does not exist in zone {{zone}}.", + "vm.deploy.sshkey.network.service.not.found": "Cannot deploy Instance with SSH keypair: the default network {{network}} does not support the UserData service.", + "vm.deploy.system.template.not.allowed": "System template {{template}} cannot be used to deploy a user VM.", + "vm.deploy.template.associated.not.usable": "Unable to deploy Instance as the associated Template cannot be used.", + "vm.deploy.template.deploy.as.is.boot.not.supported": "Boot type and boot mode are not supported on VMware for deploy-as-is templates.", + "vm.deploy.template.deploy.as.is.override.disk.size.not.supported": "Overriding root disk size is not supported for VMs deployed from deploy-as-is templates.", + "vm.deploy.template.deploy.as.is.root.disk.size.not.allowed": "Cannot deploy VM: a service offering with root disk size cannot be used with a deploy-as-is template.", + "vm.deploy.template.not.available": "Template {{template}} is not available for use.", + "vm.deploy.template.not.found": "Unable to deploy Instance as the specified Template is not found.", + "vm.deploy.template.not.found.by.id": "Unable to look up Template with id {{id}}.", + "vm.deploy.template.not.vnf": "Cannot deploy VNF appliance from a non-VNF template.", + "vm.deploy.template.password.network.service.not.found": "Cannot deploy Instance from password-enabled template {{template}}: the default network {{network}} does not support the UserData service.", + "vm.deploy.userdata.both.inputs": "Both userdata and userdata ID inputs are not allowed; please provide only one.", + "vm.deploy.userdata.network.service.not.found": "Cannot deploy Instance with UserData: the default network {{network}} does not support the UserData service.", + "vm.deploy.userdata.override.denied": "UserData input is not allowed since template {{template}} is configured to deny userdata override.", + "vm.deploy.userdata.policy.not.supported": "UserData policy {{policy}} is not supported.", + "vm.deploy.userdata.template.linked.not.found": "UserData linked to the template {{template}} is not found.", + "vm.deploy.volume.already.attached": "Volume {{volume}} is already attached to another VM.", + "vm.deploy.volume.not.found": "Unable to deploy Instance as the specified Volume is not found.", + "vm.deploy.volume.snapshot.no.template": "The provided volume or snapshot does not have a template for VM deployment.", + "vm.deploy.volume.storage.pool.zone.required": "VM deployment from a volume is supported only for Zone-wide storage pools.", + "vm.deploy.volume.template.mismatch": "The volume's template does not match the provided template.", + "vm.deploy.volume.zone.mismatch": "The volume's zone {{volumeZone}} does not match the provided zone {{zone}}.", + "vm.deploy.zone.disabled": "Cannot deploy Instance: zone {{zone}} is currently disabled.", + "vm.deploy.zone.domain.not.found": "Unable to find the domain for zone {{zone}}.", + "vm.deploy.zone.not.found": "Unable to deploy Instance as the specified zone is not found.", + "vm.destroy.delete.protection.enabled": "Instance {{instance}} has delete protection enabled and cannot be deleted.", + "vm.destroy.expunge.failed": "Failed to expunge Instance {{instance}}.", + "vm.destroy.expunge.state.transition.failed": "Unable to expunge Instance {{instance}}: it is not in the correct state.", + "vm.destroy.failed": "Failed to destroy Instance with specified ID.", + "vm.destroy.no.transition": "Unable to destroy Instance {{instance}}: {{error}}.", + "vm.destroy.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", + "vm.destroy.snapshots.delete.failed": "Unable to delete all snapshots for Instance {{instance}}.", + "vm.destroy.state.transition.failed": "Unable to destroy Instance {{instance}}: it is not in the correct state.", + "vm.destroy.unbacked.snapshots": "There are unbacked up snapshots on the ROOT volume. Instance destroy is not permitted; please try again later.", + "vm.destroy.vm.not.found": "Unable to find Instance with specified ID.", + "vm.destroy.volume.delete.protection": "Volume {{volume}} has delete protection enabled and cannot be deleted.", + "vm.destroy.volume.not.found": "Unable to find volume with specified ID.", + "vm.destroy.volume.type.invalid": "Please specify a volume of type DATADISK or ROOT.", + "vm.destroy.volumes.not.attached": "The supplied volumes are not DATADISK volumes attached to the Instance.", + "vm.expunge.admin.only": "Expunging an Instance can only be done by an Admin, or when allow.user.expunge.recover.vm is enabled.", + "vm.expunge.command.details.failed": "Unable to expunge Instance {{instance}}: {{error}}.", + "vm.expunge.command.failed": "Unable to expunge Instance {{instance}}: {{error}}.", + "vm.expunge.concurrent.operation": "Concurrent operation while expunging the Instance.", "vm.expunge.destroy.first": "Please destroy the Instance before expunging it.", "vm.expunge.failed": "Failed to expunge Instance with specified ID.", - "vm.gethypervisortype.vm.not.found": "Unable to find Instance with specified ID.", - "vm.migrate.storage.vm.not.stopped": "Instance is not Stopped. Unable to perform storage migration.", - "vm.migrate.vm.not.running": "Instance is not Running. Unable to migrate the Instance.", - "vm.migrate.storage.vm.not.running": "Instance is not Running. Unable to migrate the Instance with storage.", - "vm.assign.network.not.found": "Unable to find network with specified ID.", - "vm.restore.vm.not.found": "Unable to find Instance with specified ID.", - "vm.restore.template.iso.not.found": "Unable to find template or ISO for the specified volume and Instance.", - "vm.allocate.concurrent.operation": "Concurrent operation occurred while trying to allocate resources for the Instance.", "vm.expunge.operation.timeout": "Operation timed out while expunging the Instance.", - "vm.expunge.concurrent.operation": "Concurrent operation while expunging the Instance.", + "vm.expunge.permission.denied": "Account does not have permission for expunging the Instance.", + "vm.expunge.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", "vm.expunge.state.transition.failed": "Unable to expunge Instance {{instance}}: it is not in the correct state.", - "vm.expunge.command.failed": "Unable to expunge Instance {{instance}}: {{error}}.", - "vm.expunge.command.details.failed": "Unable to expunge Instance {{instance}}: {{error}}.", - "vm.start.concurrent.operation.exposed": "Unable to start Instance {{instance}}: {{error}}.", - "vm.start.concurrent.operation": "Unable to start Instance {{instance}} due to a concurrent operation.", - "vm.start.insufficient.capacity.exposed": "Unable to start Instance {{instance}}: {{error}}.", - "vm.start.insufficient.capacity": "Unable to start Instance {{instance}} due to insufficient capacity.", - "vm.start.network.unavailable": "Network is unavailable. Please contact your administrator.", - "vm.start.network.unavailable.admin": "Network is unavailable. Failure: {{error}}.", - "vm.start.resource.unavailable": "Unable to start Instance {{instance}}: {{error}}.", - "vm.start.wrong.state": "Cannot start Instance {{instance}} in state {{state}}.", - "vm.start.template.not.found": "Template for the Instance cannot be found. Instance configuration needs to be updated.", - "vm.start.template.zone.not.found": "Template for the Instance cannot be found in this zone. Instance configuration needs to be updated.", - "vm.start.external.prepare.failed": "Failed to prepare Instance for external provisioning.", - "vm.start.affinity.conflict": "Unable to deploy Instance: affinity rules associated with the Instance conflict.", - "vm.start.deployment.failed.exposed": "Unable to start Instance: {{error}}.", - "vm.start.host.guid.not.found": "Unable to start Instance: host GUID does not exist in the database.", - "vm.start.systemvm.certificate.failed": "Failed to setup and secure agent for the system Instance {{instance}}.", - "vm.start.failed": "Unable to start Instance {{instance}}.", - "vm.network.zone.not.found": "Unable to find zone for the Instance's network.", - "vm.network.account.not.found": "Unable to find account for the Instance's network.", - "vm.network.domain.not.found": "Unable to find domain for the Instance's network.", - "vm.network.vpc.not.found": "Unable to find VPC for the Instance's network.", - "vm.stop.concurrent.operation": "Unable to stop Instance due to a concurrent operation.", - "vm.stop.forced.concurrent.operation": "Unable to stop Instance {{instance}} due to a concurrent operation.", - "vm.unmanage.kvm.no.host": "No available host to persist domain XML for Instance {{instance}}.", - "vm.unmanage.kvm.persist.failed": "Failed to persist domain XML for Instance {{instance}}.", - "vm.unmanage.kvm.command.failed": "Failed to send command to persist domain XML for Instance {{instance}}.", - "vm.stop.host.not.found": "Unable to stop Instance {{instance}}: host is not available.", - "vm.stop.host.preparing.maintenance": "Stop operation on Instance {{instance}} is not allowed as the host is preparing for maintenance mode.", - "vm.stop.state.transition.failed": "Unable to stop Instance {{instance}}: the Instance is not in the correct state.", - "vm.stop.cleanup.state.change.failed": "Unable to stop Instance {{instance}}.", - "vm.stop.cleanup.failed": "Failed to cleanup Instance {{instance}}.", - "vm.stop.not.stopping.state": "Unable to proceed with stopping Instance {{instance}} as it is not in 'Stopping' state.", - "vm.stop.answer.failed": "Unable to stop Instance {{instance}}: {{error}}.", - "vm.stop.no.answer": "Unable to stop Instance {{instance}}: no answer received from the hypervisor.", - "vm.stop.final.state.transition.failed": "Unable to stop Instance {{instance}}.", - "vm.stop.transaction.failed": "Unable to stop Instance {{instance}}.", - "vm.stop.no.transition": "Unable to stop Instance {{instance}}: {{error}}.", - "vm.destroy.state.transition.failed": "Unable to destroy Instance {{instance}}: it is not in the correct state.", - "vm.destroy.expunge.state.transition.failed": "Unable to expunge Instance {{instance}}: it is not in the correct state.", - "vm.destroy.no.transition": "Unable to destroy Instance {{instance}}: {{error}}.", - "vm.destroy.snapshots.delete.failed": "Unable to delete all snapshots for Instance {{instance}}.", - "vm.storage.migration.failed": "Failed to migrate storage for Instance {{instance}}: {{error}}.", - "vm.storage.migration.state.transition.failed": "Failed to change state of Instance {{instance}} after storage migration.", - "vm.migrate.pool.answer.failed": "Instance {{instance}} migration failed: {{error}}.", - "vm.migrate.pool.no.results": "No relevant migration results found.", - "vm.storage.migration.no.volume.mapping": "Unable to migrate Instance {{instance}}: missing volume to pool mapping.", - "vm.storage.migration.destination.failed": "Unable to migrate Instance: failed to create deployment destination with given volume to pool map.", - "vm.storage.migration.state.requested.failed": "Unable to migrate Instance {{instance}}.", - "vm.migrate.destination.pool.tags.mismatch": "Destination storage pool does not support the volume's disk offering due to tag mismatch.", - "vm.migrate.unregister.source.failed": "Failed to unregister Instance {{instance}} from source host {{host}} after migrating storage across datacenters.", - "vm.migrate.cross.cluster.volume.not.zone.wide": "Source and destination hosts are not in the same cluster and not all volumes are on zone-wide primary store; unable to migrate.", - "vm.migrate.state.transition.cancelled": "Migration cancelled: {{error}}.", - "vm.migrate.command.details": "Migration command failed: {{error}}.", - "vm.migrate.verification.failed": "Unable to complete migration for Instance {{instance}}: Instance not found on destination host.", - "vm.migrate.with.volume.pool.no.access": "Cannot migrate the volume to the storage pool: the target host does not have access to the specified storage pool.", - "vm.migrate.managed.storage.pool.mismatch": "A volume on managed storage can only be migrated to itself.", - "vm.migrate.managed.storage.no.access": "The target host does not have access to the volume's managed storage pool.", - "vm.migrate.no.storage.pools.available": "There are no storage pools available at the target to migrate the volume.", - "vm.migrate.with.volume.empty.map": "Migration of the Instance does not involve migrating any volumes.", - "vm.migrate.with.volume.verification.failed": "Unable to complete migration with volumes for Instance {{instance}}: Instance not found on destination host.", - "vm.migrate.checkpoint.recreation.failed": "Failed to recreate checkpoints after migration.", - "vm.migrate.away.vm.not.found": "Unable to find Instance to migrate away.", - "vm.migrate.away.no.host": "Unable to migrate Instance {{instance}} as it does not have a host id.", - "vm.migrate.away.affinity.conflict": "Unable to create deployment for migrating Instance {{instance}}: affinity rules conflict.", - "vm.migrate.away.failed": "Unable to migrate Instance {{instance}}.", - "vm.reboot.concurrent.operation": "Unable to reboot Instance due to a concurrent operation.", - "vm.reboot.active.snapshots": "Unable to reboot Instance {{instance}} as it has active Instance Snapshot tasks.", - "vm.reboot.host.not.found": "Unable to retrieve host for Instance {{instance}}.", - "vm.reboot.answer.failed": "Unable to reboot Instance {{instance}} on host {{host}}: {{error}}.", - "vm.reboot.operation.timeout": "Failed to reboot Instance {{instance}} on host {{host}}: operation timed out.", - "vm.upgrade.serviceoffering.null": "Unable to upgrade Instance: new service offering cannot be null.", - "vm.upgrade.serviceoffering.inactive": "Unable to upgrade Instance: service offering {{serviceOffering}} is inactive.", - "vm.upgrade.vm.wrong.state": "Unable to upgrade Instance {{instance}} in state {{instanceState}}; make sure the Instance is stopped or running.", - "vm.upgrade.same.serviceoffering": "Not upgrading Instance {{instance}} since it already has the requested service offering {{serviceOffering}}.", - "vm.upgrade.system.use.mismatch": "Unable to upgrade Instance: the system use property differs between the current and new service offering.", - "vm.upgrade.insufficient.resources": "Unable to upgrade Instance: not enough resources available for the new service offering.", - "vm.upgrade.disk.offering.tags.mismatch": "Unable to upgrade Instance: the current service offering tags must be a subset of the new service offering tags.", - "vm.upgrade.storage.local.to.shared": "Unable to upgrade Instance {{instance}}: target service offering uses local storage but the volume is in a shared storage pool.", - "vm.upgrade.storage.shared.to.local": "Unable to upgrade Instance {{instance}}: target service offering uses shared storage but the volume is in a local storage pool.", - "vm.scale.vm.not.found": "Unable to find Instance to scale.", - "vm.scale.no.host": "Unable to scale Instance {{instance}}: it does not have a host id.", - "vm.scale.affinity.conflict": "Unable to create deployment for scaling Instance {{instance}}: affinity rules conflict.", - "vm.scale.source.host.not.found": "Unable to find source host for Instance scaling migration.", - "vm.scale.cross.cluster.not.supported": "Source and destination hosts are not in the same cluster; unable to migrate for scaling.", - "vm.scale.vm.not.found.retry": "Unable to find Instance for scale migration.", - "vm.scale.vm.not.running": "Instance {{instance}} is not in Running state; unable to migrate for scaling.", - "vm.scale.migrate.failed": "Unable to migrate Instance {{instance}} for scaling: {{error}}.", - "vm.scale.migrate.verification.failed": "Unable to complete migration for scaling Instance {{instance}}: Instance not found on destination.", - "vm.scale.reconfigure.answer.failed": "Unable to scale Instance: {{error}}.", - "vm.migrate.concurrent.jobs.exceeded": "Number of concurrent migration jobs per datastore exceeded the threshold. Please try again after some time.", - "vm.addnic.pending.jobs.exceeded": "There are too many pending jobs to add network {{network}} to Instance {{instance}}.", - "vm.stop.work.vm.not.found": "Unable to find Instance to stop.", - "vm.updatenic.default.nic.not.found": "Unable to find the default NIC for the Instance.", - "vm.start.orchestrate.failed": "Unable to orchestrate the start of Instance {{instance}}.", - "vm.unmanage.user.vm.not.found": "Unable to unmanage Instance as the user VM record is not found.", - "vm.unmanage.vm.invalid.state": "Unable to unmanage Instance {{instance}} as it is not in a valid state. Current state: {{state}}.", - "vm.unmanage.sharedfs.not.supported": "Unable to unmanage Instance {{instance}} as the operation is not supported for Shared FileSystem Instances.", - "vm.import.domain.account.required": "Unable to import Instance as both domain ID and account name are required when importing as admin.", - "vm.import.hypervisor.not.supported": "Unable to import Instance as the Hypervisor {{hypervisor}} is not supported for VM import.", - "vm.import.instance.name.empty": "Unable to import Instance as the instance name is empty.", - "vm.import.unmanaged.vm.not.found": "Unable to import Instance as the unmanaged VM {{name}} is not found.", - "vm.import.unmanaged.vm.details.not.found": "Unable to import Instance as the details for unmanaged VM {{name}} could not be retrieved.", - "vm.import.service.offering.id.null": "Unable to import Instance as the service offering ID is not specified.", - "vm.import.service.offering.id.not.found": "Unable to import Instance as the specified service offering is not found.", - "vm.import.service.offering.not.found": "Unable to import Instance as a matching service offering could not be found.", - "vm.import.service.offering.incompatible": "Unable to import Instance as the service offering {{serviceOffering}} is not compatible.", - "vm.import.template.not.found": "Unable to import Instance as the template could not be found.", + "vm.expunge.vm.not.found": "Unable to find Instance with specified ID.", + "vm.extraconfig.account.not.enabled": "Additional VM configuration is not enabled for this account.", + "vm.extraconfig.config.incorrect": "An incorrect extra configuration '{{config}}' was passed.", + "vm.extraconfig.hypervisor.not.supported": "Hypervisor {{hypervisorType}} is not supported for additional VM configuration.", + "vm.extraconfig.kvm.key.not.allowed": "Extra config key '{{key}}' is not in the allowed list for KVM hypervisor.", + "vm.extraconfig.kvm.xml.parse.failed": "Failed to parse additional XML configuration.", + "vm.extraconfig.url.decode.failed": "Failed to decode URL-encoded extra config string.", + "vm.extraconfig.vmware.invalid.format": "The extra config string contains an invalid key/value pair pattern.", + "vm.extraconfig.vmware.key.not.allowed": "Extra config key '{{key}}' is not in the allowed list for VMware hypervisor.", + "vm.extraconfig.xenserver.invalid.format": "The extra config string contains an invalid key/value pair pattern.", + "vm.extraconfig.xenserver.key.not.allowed": "Extra config key '{{key}}' is not in the allowed list for XenServer hypervisor.", + "vm.forcereboot.failed": "Unable to force reboot the Instance {{instance}}.", + "vm.forcereboot.host.not.found": "Unable to force reboot the Instance {{instance}} as Host for it is not found.", + "vm.forcereboot.host.not.right.state": "Unable to force reboot the Instance {{instance}} as Host is not in the right state.", + "vm.forcereboot.host.not.right.state.admin": "Unable to force reboot the Instance {{instance}} as Host {{host}} is not in the right state. Current state: {{hostState}}.", + "vm.forcereboot.router.concurrent.start": "Unable to force reboot the Instance {{instance}} as concurrent operations on starting router: {{routerError}}.", + "vm.forcereboot.router.start.failed": "Unable to force reboot the Instance {{instance}} as starting router failed due to: {{routerError}}.", + "vm.gethypervisortype.vm.not.found": "Unable to find Instance with specified ID.", + "vm.group.add.lock.failed": "Failed to acquire lock on Instance group {{group}}.", + "vm.group.create.name.exists": "Unable to create Instance group: a group named {{groupName}} already exists for Account {{account}}.", + "vm.group.delete.not.found": "Unable to find Instance group with specified ID.", "vm.import.cluster.id.null": "Unable to import Instance as the cluster ID could not be determined.", - "vm.import.cluster.not.found": "Unable to import Instance as the cluster could not be found.", "vm.import.cluster.not.enabled": "Unable to import Instance as the cluster {{cluster}} is not enabled.", + "vm.import.cluster.not.found": "Unable to import Instance as the cluster could not be found.", "vm.import.cpu.mismatch": "Unable to import Instance as the CPU count {{cpu}} does not match the service offering {{serviceOffering}}.", "vm.import.cpu.speed.mismatch": "Unable to import Instance as the CPU speed {{cpuSpeed}} does not match the service offering {{serviceOffering}}.", - "vm.import.memory.mismatch": "Unable to import Instance as the memory {{memory}} does not match the service offering {{serviceOffering}}.", - "vm.import.invalid.cpu": "Unable to import Instance as the CPU value {{cpu}} is invalid.", - "vm.import.invalid.memory": "Unable to import Instance as the memory value {{memory}} is invalid.", - "vm.import.guest.os.not.found": "Unable to import Instance as the guest OS {{os}} could not be found.", - "vm.import.guest.os.hypervisor.not.found": "Unable to import Instance as no hypervisor mapping was found for guest OS {{os}}.", - "vm.import.hostname.invalid": "Unable to import Instance as the hostname {{hostname}} is invalid.", - "vm.import.hostname.invalid.chars": "Unable to import Instance as the hostname {{hostname}} contains invalid characters.", - "vm.import.hostname.duplicate": "Unable to import Instance as the hostname {{hostname}} already exists in Zone {{zone}}.", - "vm.import.hostname.exists": "Unable to import Instance as the hostname {{hostname}} already exists.", - "vm.import.disk.offering.not.found": "Unable to import Instance as the disk offering {{diskOffering}} could not be found.", - "vm.import.disk.offering.mapping.mismatch": "Unable to import Instance as the disk offering mapping does not match the available disks.", - "vm.import.disk.offering.size.invalid": "Unable to import Instance as the disk offering {{diskOffering}} size {{size}} is invalid.", - "vm.import.disk.offering.too.small": "Unable to import Instance as the disk offering {{diskOffering}} is too small for the disk size {{size}}.", - "vm.import.disk.offering.pool.incompatible": "Unable to import Instance as the disk offering {{diskOffering}} is not compatible with the storage pool.", + "vm.import.data.disk.size.invalid": "Unable to import Instance as the size of data disk {{id}} is invalid.", + "vm.import.default.template.create.failed": "Unable to import Instance as creating the default template failed.", + "vm.import.deployment.destination.error": "Unable to import Instance {{name}} as finding the deployment destination failed.", + "vm.import.deployment.destination.not.found": "Unable to import Instance {{name}} as no suitable deployment destination was found.", + "vm.import.disk.controller.mismatch": "Unable to import Instance as the disk controller for disk {{disk}} does not match the expected controller {{controller}}.", "vm.import.disk.details.not.found": "Unable to import Instance as the disk details could not be found for disk {{disk}}.", "vm.import.disk.missing.offering": "Unable to import Instance as no offering was provided for disk {{disk}}.", - "vm.import.disk.controller.mismatch": "Unable to import Instance as the disk controller for disk {{disk}} does not match the expected controller {{controller}}.", - "vm.import.disk.storage.pool.not.found": "Unable to import Instance as the storage pool for disk {{disk}} could not be found.", + "vm.import.disk.offering.mapping.mismatch": "Unable to import Instance as the disk offering mapping does not match the available disks.", + "vm.import.disk.offering.not.found": "Unable to import Instance as the disk offering {{diskOffering}} could not be found.", + "vm.import.disk.offering.pool.incompatible": "Unable to import Instance as the disk offering {{diskOffering}} is not compatible with the storage pool.", + "vm.import.disk.offering.size.invalid": "Unable to import Instance as the disk offering {{diskOffering}} size {{size}} is invalid.", + "vm.import.disk.offering.too.small": "Unable to import Instance as the disk offering {{diskOffering}} is too small for the disk size {{size}}.", "vm.import.disk.size.invalid": "Unable to import Instance as the size of disk {{id}} is invalid.", - "vm.import.data.disk.size.invalid": "Unable to import Instance as the size of data disk {{id}} is invalid.", - "vm.import.root.disk.not.found": "Unable to import Instance {{vm}} as the root disk could not be found or has no controller.", - "vm.import.root.disk.size.invalid": "Unable to import Instance as the root disk size for disk {{id}} is invalid.", - "vm.import.nic.details.not.found": "Unable to import Instance as NIC details could not be found for NIC {{nic}}.", - "vm.import.nic.network.not.found": "Unable to import Instance as the network for NIC {{nic}} could not be found.", - "vm.import.nic.network.suitable.not.found": "Unable to import Instance as no suitable network could be found for NIC {{nic}}.", - "vm.import.nic.network.zone.mismatch": "Unable to import Instance as the network {{network}} for NIC {{nic}} is in a different zone.", - "vm.import.nic.ip.not.available": "Unable to import Instance as the IP address for NIC {{nic}} is not available.", - "vm.import.nic.ip.required": "Unable to import Instance as an IP address is required for NIC {{nic}} in network {{network}}.", - "vm.import.nic.multiple.ips": "Unable to import Instance as multiple IP addresses were provided for NIC {{nic}}.", - "vm.import.nic.adapter.mismatch": "Unable to import Instance as the adapter type for NIC {{nic}} does not match.", - "vm.import.nic.pvlan.mismatch": "Unable to import Instance as the PVLAN type for NIC {{nic}} does not match.", - "vm.import.nic.vlan.mismatch": "Unable to import Instance as the VLAN for NIC {{nic}} does not match.", - "vm.import.nic.import.failed": "Unable to import Instance as importing NIC {{nic}} failed: {{error}}.", + "vm.import.disk.storage.pool.not.found": "Unable to import Instance as the storage pool for disk {{disk}} could not be found.", + "vm.import.domain.account.required": "Unable to import Instance as both domain ID and account name are required when importing as admin.", + "vm.import.error": "Unable to import Instance: {{error}}.", + "vm.import.extra.param.not.allowed": "Unable to import Instance as the extra parameter '{{param}}' is not in the allowed list.", + "vm.import.extra.params.disabled": "Unable to import Instance as extra parameters are disabled by configuration.", + "vm.import.extra.params.list.empty": "Unable to import Instance as the allowed extra parameters list is empty.", + "vm.import.guest.os.hypervisor.not.found": "Unable to import Instance as no hypervisor mapping was found for guest OS {{os}}.", + "vm.import.guest.os.not.found": "Unable to import Instance as the guest OS {{os}} could not be found.", + "vm.import.host.invalid": "Unable to import virtual machine: invalid host specified.", "vm.import.host.offering.template.incompatible": "Unable to import Instance as the host, service offering, or template are not compatible.", - "vm.import.vm.not.found": "Unable to import Instance as the VM could not be found.", - "vm.import.vm.create.failed": "Unable to import Instance {{name}} as VM creation failed.", - "vm.import.vm.failed": "Unable to import Instance {{name}}.", - "vm.import.vm.allocation.error": "Unable to import Instance as resource allocation failed for account {{owner}}: {{error}}.", - "vm.import.volume.allocation.error": "Unable to import Instance as volume allocation failed: {{error}}.", - "vm.import.volume.migration.failed": "Unable to import Instance as volume migration failed: {{error}}.", - "vm.import.volume.migration.no.pool": "Unable to import Instance as no storage pool is available for volume migration.", - "vm.import.volume.migration.no.pool.found": "Unable to import Instance as no suitable storage pool was found for volume migration.", - "vm.import.usage.publish.failed": "Unable to publish usage for imported Instance: {{error}}.", - "vm.import.usage.publish.failed.vm": "Unable to publish usage for imported Instance {{instance}}: {{error}}.", + "vm.import.hostname.duplicate": "Unable to import Instance as the hostname {{hostname}} already exists in Zone {{zone}}.", + "vm.import.hostname.exists": "Unable to import Instance as the hostname {{hostname}} already exists.", + "vm.import.hostname.invalid": "Unable to import Instance as the hostname {{hostname}} is invalid.", + "vm.import.hostname.invalid.chars": "Unable to import Instance as the hostname {{hostname}} contains invalid characters.", + "vm.import.hypervisor.not.supported": "Unable to import Instance as the Hypervisor {{hypervisor}} is not supported for VM import.", + "vm.import.instance.name.empty": "Unable to import Instance as the instance name is empty.", + "vm.import.insufficient.capacity": "Unable to import Instance {{name}} due to insufficient capacity.", + "vm.import.invalid.cpu": "Unable to import Instance as the CPU value {{cpu}} is invalid.", + "vm.import.invalid.memory": "Unable to import Instance as the memory value {{memory}} is invalid.", + "vm.import.kvm.default.template.incompatible": "Unable to import Instance as the default template is not compatible with KVM.", + "vm.import.kvm.disk.in.use": "Unable to import Instance as the disk {{disk}} is already in use.", + "vm.import.kvm.disk.path.required": "Unable to import Instance as a disk path is required for KVM disk import.", + "vm.import.kvm.domain.account.required": "Unable to import Instance as both domain ID and account name are required for KVM import.", + "vm.import.kvm.host.not.found": "Unable to import Instance as the specified KVM host {{host}} could not be found.", + "vm.import.kvm.host.required": "Unable to import Instance as a KVM host is required.", + "vm.import.kvm.hostname.invalid.chars": "Unable to import KVM Instance as the hostname {{hostname}} contains invalid characters.", + "vm.import.kvm.hypervisor.not.supported": "Unable to import Instance as the KVM hypervisor is not supported for this operation.", + "vm.import.kvm.list.hypervisor.not.supported": "Unable to list unmanaged VMs as the KVM hypervisor is not supported for this listing.", + "vm.import.kvm.local.pool.not.found": "Unable to import Instance as no local storage pool could be found on the host.", + "vm.import.kvm.multiple.default.networks": "Unable to import Instance as multiple default networks were found.", + "vm.import.kvm.network.by.id.not.found": "Unable to import Instance as the network with ID {{id}} could not be found.", + "vm.import.kvm.network.required": "Unable to import Instance as a network is required for KVM import.", + "vm.import.kvm.network.system.only": "Unable to import Instance as the network {{id}} is a system-only network.", + "vm.import.kvm.network.zone.mismatch": "Unable to import Instance as the network {{id}} is in a different zone {{zone}}.", + "vm.import.kvm.no.virtual.network": "Unable to import Instance as no virtual network is available.", + "vm.import.kvm.offering.pool.incompatible": "Unable to import Instance as the offering is not compatible with the storage pool.", + "vm.import.kvm.physical.network.not.found": "Unable to import Instance as the physical network could not be found.", + "vm.import.kvm.remote.vm.not.found": "Unable to import Instance as the remote VM could not be found.", + "vm.import.kvm.required.network.offering.disabled": "Unable to import Instance as the required network offering is disabled.", + "vm.import.kvm.required.network.offering.not.found": "Unable to import Instance as the required network offering could not be found.", + "vm.import.kvm.storage.pool.not.found": "Unable to import Instance as the specified storage pool could not be found.", + "vm.import.kvm.storage.pool.required": "Unable to import Instance as a storage pool is required.", + "vm.import.kvm.username.required": "Unable to import Instance as a username is required for KVM import.", + "vm.import.memory.mismatch": "Unable to import Instance as the memory {{memory}} does not match the service offering {{serviceOffering}}.", "vm.import.migration.check.failed": "Unable to import Instance as the migration check failed: {{error}}.", "vm.import.migration.check.failed.vm": "Unable to import Instance {{instance}} as the migration check failed.", "vm.import.migration.destination.error": "Unable to import Instance {{instance}} as finding the migration destination failed.", "vm.import.migration.destination.not.found": "Unable to import Instance {{instance}} as no suitable migration destination was found.", "vm.import.migration.failed": "Unable to import Instance {{instance}} as the migration failed.", - "vm.import.deployment.destination.error": "Unable to import Instance {{name}} as finding the deployment destination failed.", - "vm.import.deployment.destination.not.found": "Unable to import Instance {{name}} as no suitable deployment destination was found.", - "vm.import.volumes.failed": "Unable to import volumes for Instance {{name}}: {{error}}.", + "vm.import.nic.adapter.mismatch": "Unable to import Instance as the adapter type for NIC {{nic}} does not match.", + "vm.import.nic.details.not.found": "Unable to import Instance as NIC details could not be found for NIC {{nic}}.", + "vm.import.nic.import.failed": "Unable to import Instance as importing NIC {{nic}} failed: {{error}}.", + "vm.import.nic.ip.not.available": "Unable to import Instance as the IP address for NIC {{nic}} is not available.", + "vm.import.nic.ip.required": "Unable to import Instance as an IP address is required for NIC {{nic}} in network {{network}}.", + "vm.import.nic.multiple.ips": "Unable to import Instance as multiple IP addresses were provided for NIC {{nic}}.", + "vm.import.nic.network.not.found": "Unable to import Instance as the network for NIC {{nic}} could not be found.", + "vm.import.nic.network.suitable.not.found": "Unable to import Instance as no suitable network could be found for NIC {{nic}}.", + "vm.import.nic.network.zone.mismatch": "Unable to import Instance as the network {{network}} for NIC {{nic}} is in a different zone.", + "vm.import.nic.pvlan.mismatch": "Unable to import Instance as the PVLAN type for NIC {{nic}} does not match.", + "vm.import.nic.vlan.mismatch": "Unable to import Instance as the VLAN for NIC {{nic}} does not match.", "vm.import.nics.failed": "Unable to import NICs for Instance {{name}}: {{error}}.", - "vm.import.insufficient.capacity": "Unable to import Instance {{name}} due to insufficient capacity.", "vm.import.no.disks.found": "Unable to import Instance {{name}} as no attached disks were found.", - "vm.import.error": "Unable to import Instance: {{error}}.", - "vm.import.default.template.create.failed": "Unable to import Instance as creating the default template failed.", - "vm.import.kvm.hypervisor.not.supported": "Unable to import Instance as the KVM hypervisor is not supported for this operation.", - "vm.import.kvm.list.hypervisor.not.supported": "Unable to list unmanaged VMs as the KVM hypervisor is not supported for this listing.", - "vm.import.kvm.host.required": "Unable to import Instance as a KVM host is required.", - "vm.import.kvm.host.not.found": "Unable to import Instance as the specified KVM host {{host}} could not be found.", - "vm.import.kvm.username.required": "Unable to import Instance as a username is required for KVM import.", - "vm.import.kvm.domain.account.required": "Unable to import Instance as both domain ID and account name are required for KVM import.", - "vm.import.kvm.hostname.invalid.chars": "Unable to import KVM Instance as the hostname {{hostname}} contains invalid characters.", - "vm.import.kvm.disk.path.required": "Unable to import Instance as a disk path is required for KVM disk import.", - "vm.import.kvm.disk.in.use": "Unable to import Instance as the disk {{disk}} is already in use.", - "vm.import.kvm.storage.pool.required": "Unable to import Instance as a storage pool is required.", - "vm.import.kvm.storage.pool.not.found": "Unable to import Instance as the specified storage pool could not be found.", - "vm.import.kvm.local.pool.not.found": "Unable to import Instance as no local storage pool could be found on the host.", - "vm.import.kvm.network.required": "Unable to import Instance as a network is required for KVM import.", - "vm.import.kvm.network.by.id.not.found": "Unable to import Instance as the network with ID {{id}} could not be found.", - "vm.import.kvm.network.system.only": "Unable to import Instance as the network {{id}} is a system-only network.", - "vm.import.kvm.network.zone.mismatch": "Unable to import Instance as the network {{id}} is in a different zone {{zone}}.", - "vm.import.kvm.no.virtual.network": "Unable to import Instance as no virtual network is available.", - "vm.import.kvm.multiple.default.networks": "Unable to import Instance as multiple default networks were found.", - "vm.import.kvm.physical.network.not.found": "Unable to import Instance as the physical network could not be found.", - "vm.import.kvm.required.network.offering.not.found": "Unable to import Instance as the required network offering could not be found.", - "vm.import.kvm.required.network.offering.disabled": "Unable to import Instance as the required network offering is disabled.", - "vm.import.kvm.offering.pool.incompatible": "Unable to import Instance as the offering is not compatible with the storage pool.", - "vm.import.kvm.default.template.incompatible": "Unable to import Instance as the default template is not compatible with KVM.", - "vm.import.kvm.remote.vm.not.found": "Unable to import Instance as the remote VM could not be found.", + "vm.import.root.disk.not.found": "Unable to import Instance {{vm}} as the root disk could not be found or has no controller.", + "vm.import.root.disk.size.invalid": "Unable to import Instance as the root disk size for disk {{id}} is invalid.", + "vm.import.service.offering.id.not.found": "Unable to import Instance as the specified service offering is not found.", + "vm.import.service.offering.id.null": "Unable to import Instance as the service offering ID is not specified.", + "vm.import.service.offering.incompatible": "Unable to import Instance as the service offering {{serviceOffering}} is not compatible.", + "vm.import.service.offering.not.found": "Unable to import Instance as a matching service offering could not be found.", + "vm.import.template.not.found": "Unable to import Instance as the template could not be found.", + "vm.import.unmanaged.vm.details.not.found": "Unable to import Instance as the details for unmanaged VM {{name}} could not be retrieved.", + "vm.import.unmanaged.vm.not.found": "Unable to import Instance as the unmanaged VM {{name}} is not found.", + "vm.import.usage.publish.failed": "Unable to publish usage for imported Instance: {{error}}.", + "vm.import.usage.publish.failed.vm": "Unable to publish usage for imported Instance {{instance}}: {{error}}.", "vm.import.vcenter.param.exclusive": "Unable to import Instance as 'vcenter' and 'existingvcenterid' parameters are mutually exclusive.", "vm.import.vcenter.params.incomplete": "Unable to import Instance as vcenter, datacenter, username, and password are all required when specifying a new vCenter.", - "vm.import.extra.params.disabled": "Unable to import Instance as extra parameters are disabled by configuration.", - "vm.import.extra.params.list.empty": "Unable to import Instance as the allowed extra parameters list is empty.", - "vm.import.extra.param.not.allowed": "Unable to import Instance as the extra parameter '{{param}}' is not in the allowed list." + "vm.import.vm.allocation.error": "Unable to import Instance as resource allocation failed for account {{owner}}: {{error}}.", + "vm.import.vm.create.failed": "Unable to import Instance {{name}} as VM creation failed.", + "vm.import.vm.failed": "Unable to import Instance {{name}}.", + "vm.import.vm.not.found": "Unable to import Instance as the VM could not be found.", + "vm.import.volume.allocation.error": "Unable to import Instance as volume allocation failed: {{error}}.", + "vm.import.volume.migration.failed": "Unable to import Instance as volume migration failed: {{error}}.", + "vm.import.volume.migration.no.pool": "Unable to import Instance as no storage pool is available for volume migration.", + "vm.import.volume.migration.no.pool.found": "Unable to import Instance as no suitable storage pool was found for volume migration.", + "vm.import.volumes.failed": "Unable to import volumes for Instance {{name}}: {{error}}.", + "vm.import.zone.invalid": "Unable to import virtual machine: invalid zone specified.", + "vm.migrate.affinity.conflict": "Unable to create migration deployment: affinity rules conflict.", + "vm.migrate.away.affinity.conflict": "Unable to create deployment for migrating Instance {{instance}}: affinity rules conflict.", + "vm.migrate.away.failed": "Unable to migrate Instance {{instance}}.", + "vm.migrate.away.no.host": "Unable to migrate Instance {{instance}} as it does not have a host id.", + "vm.migrate.away.vm.not.found": "Unable to find Instance to migrate away.", + "vm.migrate.checkpoint.recreation.failed": "Failed to recreate checkpoints after migration.", + "vm.migrate.command.details": "Migration command failed: {{error}}.", + "vm.migrate.concurrent.jobs.exceeded": "Number of concurrent migration jobs per datastore exceeded the threshold. Please try again after some time.", + "vm.migrate.cross.cluster.volume.not.zone.wide": "Source and destination hosts are not in the same cluster and not all volumes are on zone-wide primary store; unable to migrate.", + "vm.migrate.destination.different.pod": "Cannot migrate Instance: destination host is not in the same pod as the current host.", + "vm.migrate.destination.host.not.right.state": "Cannot migrate Instance: destination host {{host}} is not in the correct state.", + "vm.migrate.destination.not.found": "Unable to find a suitable destination to migrate Instance {{instance}}.", + "vm.migrate.destination.pool.tags.mismatch": "Destination storage pool does not support the volume's disk offering due to tag mismatch.", + "vm.migrate.dpdk.host.not.supported": "Cannot migrate DPDK-enabled Instance to a host that is not DPDK-enabled.", + "vm.migrate.gpu.not.supported": "Live migration of GPU-enabled Instance is not supported.", + "vm.migrate.host.maintenance.mode": "Operation {{operation}} on Instance {{instance}} is not allowed as the host is preparing for maintenance mode.", + "vm.migrate.host.source.prepare.failed": "Failed to prepare source host for migration of Instance {{instance}}.", + "vm.migrate.host.source.prepare.failed.admin": "Failed to prepare source host {{srcHost}} for migration of Instance {{instance}}: {{error}}.", + "vm.migrate.host.tags.mismatch": "Cannot migrate Instance: destination host {{host}} does not match the host tags of the service offering.", + "vm.migrate.hypervisor.not.supported": "Unsupported hypervisor type for VM migration. Supported: XenServer, VMware, KVM, OVM, Hyper-V, OVM3.", + "vm.migrate.local.storage.not.supported": "VM uses local storage and cannot be live migrated.", + "vm.migrate.managed.storage.no.access": "The target host does not have access to the volume's managed storage pool.", + "vm.migrate.managed.storage.pool.mismatch": "A volume on managed storage can only be migrated to itself.", + "vm.migrate.no.storage.pools.available": "There are no storage pools available at the target to migrate the volume.", + "vm.migrate.permission.denied": "No permission to migrate VM. Only root administrators can perform this operation.", + "vm.migrate.pool.answer.failed": "Instance {{instance}} migration failed: {{error}}.", + "vm.migrate.pool.no.results": "No relevant migration results found.", + "vm.migrate.server.not.found": "Unable to find a server to migrate the Instance to.", + "vm.migrate.source.host.not.found": "Cannot migrate VM: source host not found.", + "vm.migrate.state.transition.cancelled": "Migration cancelled: {{error}}.", + "vm.migrate.storage.access.groups.mismatch": "Destination pool {{pool}} does not have matching storage access groups as host {{host}}.", + "vm.migrate.storage.access.groups.mismatch.hosts": "Storage access groups on the source and destination hosts do not match.", + "vm.migrate.storage.access.groups.src.has.dest.none": "Source host has storage access groups but destination host has none.", + "vm.migrate.storage.data.disks.attached": "Data disks are attached to the Instance. Detach all data disks before migrating storage.", + "vm.migrate.storage.destination.host.not.right.state": "Cannot migrate VM with storage: destination host {{host}} is not in the correct state.", + "vm.migrate.storage.destination.hypervisor.not.supported": "Migration with storage is not supported for destination host {{host}} on hypervisor {{hypervisorType}} version {{version}}.", + "vm.migrate.storage.different.clusters": "VM disk migration failed: destination storage pools belong to different clusters.", + "vm.migrate.storage.hypervisor.mismatch": "Hypervisor mismatch for storage migration: destination has {{destHypervisor}}, VM requires {{vmHypervisor}}.", + "vm.migrate.storage.hypervisor.not.supported": "Unsupported hypervisor {{hypervisorType}} for VM migration with storage.", + "vm.migrate.storage.hypervisor.version.mismatch": "Source and destination hosts must have the same hypervisor type and version for migration with storage.", + "vm.migrate.storage.instance.snapshots.exist": "Instance cannot be migrated with storage because it has Instance Snapshots. Remove all Instance Snapshots first.", + "vm.migrate.storage.no.volume.migration": "Migration of Instance {{instance}} from host {{srcHost}} to {{destHost}} does not involve migrating any volumes.", + "vm.migrate.storage.nonuser.different.pods": "Storage migration of non-user VMs between storage pools in different pods is not supported.", + "vm.migrate.storage.nonuser.hypervisor.not.supported": "Unable to migrate storage of non-user VM for hypervisor {{hypervisorType}}.", + "vm.migrate.storage.permission.denied": "No permission to migrate VM storage. Only root administrators can perform this operation.", + "vm.migrate.storage.pool.not.found": "Storage pool with specified ID not found for migration.", + "vm.migrate.storage.snapshots.exist": "Instance disk cannot be migrated. Remove all Instance Snapshots before proceeding.", + "vm.migrate.storage.source.host.not.found": "Cannot migrate VM with storage: source host not found.", + "vm.migrate.storage.source.hypervisor.not.supported": "Migration with storage is not supported for source host {{host}} on hypervisor {{hypervisorType}} version {{version}}.", + "vm.migrate.storage.suitability.failed": "Storage suitability check failed for volume {{volume}}: {{error}}.", + "vm.migrate.storage.vm.already.on.host": "Cannot migrate VM with storage: Instance is already on the destination host. Please specify a different host.", + "vm.migrate.storage.vm.not.found": "Unable to find Instance with specified ID for storage migration.", + "vm.migrate.storage.vm.not.running": "Instance is not Running. Unable to migrate the Instance with storage.", + "vm.migrate.storage.vm.not.stopped": "Instance is not Stopped. Unable to perform storage migration.", + "vm.migrate.storage.volume.not.found": "Volume with specified ID not found for storage migration.", + "vm.migrate.storage.volume.not.ready": "Volume {{volume}} of the Instance is not in Ready state. Cannot proceed with storage migration.", + "vm.migrate.storage.volume.policy.noncompliant": "Storage pool {{pool}} is not compliant with the storage policy for volume {{volume}}.", + "vm.migrate.storage.volume.policy.verify.failed": "Failed to verify storage policy compliance for storage pool {{pool}}.", + "vm.migrate.storage.volume.pool.access.groups.mismatch": "Destination pool {{pool}} for volume {{volume}} does not have matching storage access groups as host {{host}}.", + "vm.migrate.storage.volume.pool.incompatible": "Cannot migrate volume {{volume}} to destination storage pool {{pool}}: incompatible hypervisor type.", + "vm.migrate.storage.volume.pool.unsuitable": "Unable to migrate {{volume}} to destination storage pool {{pool}}: {{error}}.", + "vm.migrate.storage.volume.vm.mismatch": "Volume {{volume}} does not belong to Instance {{instance}} being migrated.", + "vm.migrate.unbacked.snapshots": "There are unbacked up snapshots on volumes attached to this Instance. Migration is not permitted; please try again later.", + "vm.migrate.unregister.source.failed": "Failed to unregister Instance {{instance}} from source host {{host}} after migrating storage across datacenters.", + "vm.migrate.verification.failed": "Unable to complete migration for Instance {{instance}}: Instance not found on destination host.", + "vm.migrate.vm.already.on.host": "Cannot migrate Instance: the Instance is already on the destination host. Please specify a different host.", + "vm.migrate.vm.not.found": "Unable to find Instance with specified ID for migration.", + "vm.migrate.vm.not.running": "Instance is not Running. Unable to migrate the Instance.", + "vm.migrate.with.volume.empty.map": "Migration of the Instance does not involve migrating any volumes.", + "vm.migrate.with.volume.pool.no.access": "Cannot migrate the volume to the storage pool: the target host does not have access to the specified storage pool.", + "vm.migrate.with.volume.verification.failed": "Unable to complete migration with volumes for Instance {{instance}}: Instance not found on destination host.", + "vm.network.account.not.found": "Unable to find account for the Instance's network.", + "vm.network.domain.not.found": "Unable to find domain for the Instance's network.", + "vm.network.vpc.not.found": "Unable to find VPC for the Instance's network.", + "vm.network.zone.not.found": "Unable to find zone for the Instance's network.", + "vm.password.encrypt.failed": "Failed to encrypt the password for the Instance.", + "vm.reboot.active.snapshots": "Unable to reboot Instance {{instance}} as it has active Instance Snapshot tasks.", + "vm.reboot.answer.failed": "Unable to reboot Instance {{instance}} on host {{host}}: {{error}}.", + "vm.reboot.concurrent.operation": "Unable to reboot Instance due to a concurrent operation.", + "vm.reboot.host.not.found": "Unable to retrieve host for Instance {{instance}}.", + "vm.reboot.operation.timeout": "Failed to reboot Instance {{instance}} on host {{host}}: operation timed out.", + "vm.reboot.serviceoffering.not.found": "Unable to find Service Offering for the Instance.", + "vm.reboot.setup.menu.hypervisor.not.supported": "Booting into a hardware setup menu is not supported on hypervisor {{hypervisorType}}.", + "vm.reboot.vm.not.found": "Unable to find Instance with specified ID.", + "vm.reboot.vm.not.running": "The Instance {{instance}} is not running and cannot be rebooted.", + "vm.recover.account.deleted": "Unable to recover Instance as the Account is deleted.", + "vm.recover.permission.denied": "Recovering a vm can only be done by an Admin. Or when the allow.user.expunge.recover.vm key is set.", + "vm.recover.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", + "vm.recover.state.transition.failed": "Unable to recover the vm {{instance}} because it is not in the correct state. Current state: {{instanceState}}.", + "vm.recover.vm.not.destroyed": "Vm with id {{vmUuid}} is not in the right state.", + "vm.recover.vm.not.found": "Unable to find an Instance with id {{vmId}}.", + "vm.recover.vm.removed": "Unable to find vm by id {{vmUuid}}.", + "vm.removenic.concurrent.operation": "Concurrent operations on removing the Network {{network}} from the Instance {{instance}}: {{error}}.", + "vm.removenic.default.nic": "Unable to remove NIC {{nic}} from the Instance {{instance}} in Network {{network}} it is the default NIC for the Instance.", + "vm.removenic.failed": "Unable to remove the NIC {{nic}} from the Instance {{instance}}.", + "vm.removenic.network.not.found": "Unable to remove NIC {{nic}} from the Instance {{instance}} as a network for the NIC is not found.", + "vm.removenic.nic.not.attached": "Unable to remove NIC {{nic}} from the Instance {{instance}} as it is not attached.", + "vm.removenic.nic.not.found": "Unable to remove NIC from the Instance {{instance}} as the specified NIC is not found.", + "vm.removenic.nic.with.rules": "Unable to remove NIC {{nic}} from the Instance {{instance}} in Network {{network}}, as it has associated Port forwarding or Load balancer or Static NAT rules.", + "vm.removenic.resource.unavailable": "Unable to remove NIC for the Network {{network}} from the Instance {{instance}}: {{error}}.", + "vm.removenic.vm.having.snapshots": "Unable to remove NIC from the Instance {{instance}} as it has Instance Snapshots.", + "vm.removenic.vm.not.found": "Unable to remove NIC as the specified Instance is not found.", + "vm.removenic.zone.basic.not.allowed": "Zone {{zone}}, has a NetworkType of Basic. Can't remove a NIC from a Instance on a Basic Network.", + "vm.resetpassword.failed": "Failed to reset password for the Instance {{instance}}.", + "vm.resetpassword.network.service.not.found": "Unable to reset password for the Instance {{instance}} as its default Network {{network}} does not supports the service {{networkService}}.", + "vm.resetpassword.template.not.password.enabled": "Unable to reset password for the Instance {{instance}}, the Template {{template}} is not password enabled.", + "vm.resetpassword.vm.not.found": "Unable to reset password as the specified Instance is not found.", + "vm.resetpassword.vm.not.right.state": "Unable to reset password for the Instance {{instance}} as it is not in the right state. Current state: {{instanceState}}.", + "vm.resetpassword.vm.not.stopped": "Unable to reset password for the Instance {{instance}} as it is not in Stopped state. Current state: {{instanceState}}.", + "vm.resetsshkey.failed": "Failed to reset SSH Key for the Instance {{instance}}.", + "vm.resetsshkey.key.not.all.found": "Unable to reset SSH Key as the Instance {{instance}} as not all the specified keypairs found.", + "vm.resetsshkey.key.not.specified": "'keypair' or 'keypairs' must be specified.", + "vm.resetsshkey.network.service.not.found": "Unable to reset SSH Key for the Instance {{instance}} as its default Network {{network}} does not supports the service {{networkService}}.", + "vm.resetsshkey.vm.not.found": "Unable to reset SSH Key as the specified Instance is not found.", + "vm.resetsshkey.vm.not.right.state": "Unable to reset SSH Key for the Instance {{instance}} as it is not in the right state. Current state: {{instanceState}}.", + "vm.resetsshkey.vm.not.stopped": "Unable to reset SSH Key as the Instance {{instance}} as it is not in Stopped state. Current state {{instanceState}}.", + "vm.resetsshkey.vm.operation.not.supported": "Unable to reset SSH Key as the operation is not supported for Instance {{instance}}.", + "vm.resetsshkey.vm.sharedfs.operation.not.supported": "Unable to reset SSH Key as the operation is not supported for Shared FileSystem Instance {{instance}}.", + "vm.resetuserdata.vm.not.found": "Unable to reset userdata as the specified Instance is not found.", + "vm.resetuserdata.vm.not.stopped": "Unable to reset userdata as the Instance {{instance}} as it is not in Stopped state. Current state {{instanceState}}.", + "vm.resetuserdata.vm.operation.not.supported": "Unable to reset userdata as the operation is not supported for Instance {{instance}}.", + "vm.resetuserdata.vm.sharedfs.operation.not.supported": "Unable to reset userdata as the operation is not supported for Shared FileSystem Instance {{instance}}.", + "vm.resize.volume.current.diskoffering.not.found": "Could not find disk offering matching the current root offering ID.", + "vm.resize.volume.new.diskoffering.not.found": "Could not find disk offering for resizing the root volume.", + "vm.resize.volume.new.offering.smaller": "Failed to resize root volume. New Service Offering {{newOffering}} has a smaller disk size ({{newSize}} GB) than the current disk ({{currentSize}} GB).", + "vm.resize.volume.root.not.found": "Root volume for Instance not found while preparing resize.", + "vm.restore.disk.offering.not.found": "Cannot find disk offering with the specified ID.", + "vm.restore.disk.offering.size.smaller.than.template": "Disk size {{diskSize}} for the selected offering is less than the template size {{templateSize}}.", + "vm.restore.disk.offering.strict.mismatch": "The service offering has a strict disk offering requirement, and the specified disk offering does not match.", + "vm.restore.external.hypervisor.type.not.allowed": "Restore operation is not allowed for External hypervisor type.", + "vm.restore.failed": "Failed to restore Instance {{instance}}.", + "vm.restore.instance.not.supported": "Operation not supported for Instance {{instance}}.", + "vm.restore.iso.cannot.use.template": "This Instance was created from an ISO and cannot be re-installed with a template.", + "vm.restore.iso.not.attached": "Cannot restore the Instance: no ISO is attached to the VM.", + "vm.restore.managed.storage.hypervisor.not.supported": "This hypervisor type is not supported on managed storage for this command.", + "vm.restore.managed.storage.reset.failed": "Unable to reset Instance {{instance}} during managed storage operation.", + "vm.restore.managed.storage.send.failed": "Failed to send command to host for managed storage operation.", + "vm.restore.multiple.root.volumes": "There are {{count}} root volumes for Instance {{instance}}; expected at most one.", + "vm.restore.owner.disabled": "The owner of Instance {{instance}} is disabled.", + "vm.restore.owner.not.found": "The owner of Instance {{instance}} does not exist.", + "vm.restore.password.reset.failed": "VM restore is complete but failed to reset the password.", + "vm.restore.root.disk.size.smaller.than.template": "Root disk size {{rootDiskSize}} is smaller than the template size {{templateSize}}.", + "vm.restore.root.volume.not.found": "Cannot find root volume for Instance {{instance}}.", + "vm.restore.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", + "vm.restore.snapshots.exist": "Unable to restore Instance: please remove all Instance Snapshots first.", + "vm.restore.start.failed": "Unable to start Instance after restore.", + "vm.restore.stop.failed": "Failed to stop the Instance before restore.", + "vm.restore.template.bypassed.not.available": "Cannot restore Instance: bypassed template {{template}} is not available in the zone.", + "vm.restore.template.id.invalid": "Invalid template ID provided to restore the Instance.", + "vm.restore.template.iso.not.found": "Unable to find template or ISO for the specified volume and Instance.", + "vm.restore.template.linked.not.found": "Cannot find the template linked with the Instance.", + "vm.restore.template.not.available.in.zone": "Cannot restore Instance: template {{template}} is not available in the zone.", + "vm.restore.template.not.found": "Cannot find template with the specified ID.", + "vm.restore.unbacked.snapshots": "There are unbacked up snapshots on the ROOT volume. Re-install VM is not permitted; please try again later.", + "vm.restore.vm.not.found": "Unable to find Instance with specified ID.", + "vm.restore.vm.not.right.state": "Instance {{instance}} is in {{instanceState}} state. Restore can only be performed when the Instance is Running or Stopped.", + "vm.scale.affinity.conflict": "Unable to create deployment for scaling Instance {{instance}}: affinity rules conflict.", + "vm.scale.cross.cluster.not.supported": "Source and destination hosts are not in the same cluster; unable to migrate for scaling.", + "vm.scale.dynamic.scaling.disabled": "Dynamically scaling Instances is disabled for this zone, please contact your admin.", + "vm.scale.dynamic.scaling.not.supported": "Unable to scale {{instance}} as it does not have tools to support dynamic scaling.", + "vm.scale.hypervisor.simulator.root.resize.not.supported": "Hypervisor {{hypervisorType}} does not support volume resize.", + "vm.scale.insufficient.resources": "Unable to scale {{instance}} due to insufficient resources.", + "vm.scale.kvm.fixed.offering.not.supported": "Unable to live scale VM on KVM when current service offering is a Fixed Offering. KVM needs the tag maxMemory to live scale and it is only configured when VM is deployed with a custom service offering and Dynamic Scalable is enabled.", + "vm.scale.migrate.failed": "Unable to migrate Instance {{instance}} for scaling: {{error}}.", + "vm.scale.migrate.verification.failed": "Unable to complete migration for scaling Instance {{instance}}: Instance not found on destination.", + "vm.scale.no.host": "Unable to scale Instance {{instance}}: it does not have a host id.", + "vm.scale.reconfigure.answer.failed": "Unable to scale Instance: {{error}}.", + "vm.scale.root.volume.change.failed": "Failed to change disk offering of the root volume.", + "vm.scale.source.host.not.found": "Unable to find source host for Instance scaling migration.", + "vm.scale.up.required": "While the VM is running, only scalling up it is supported. New service offering {{newOffering}} should have at least one value (ram, speed or cpu) greater than the current values {{currentOffering}}.", + "vm.scale.vgpu.not.supported": "Dynamic scaling of vGPU type is not supported. VM has vGPU Type: {{vgpuType}}.", + "vm.scale.vm.not.found": "Unable to find Instance to scale.", + "vm.scale.vm.not.found.retry": "Unable to find Instance for scale migration.", + "vm.scale.vm.not.running": "Instance {{instance}} is not in Running state; unable to migrate for scaling.", + "vm.start.account.removed": "The caller account {{account}} has been removed.", + "vm.start.affinity.conflict": "Unable to deploy Instance: affinity rules associated with the Instance conflict.", + "vm.start.cluster.not.found": "Unable to find cluster with specified ID for VM deployment.", + "vm.start.cluster.root.admin.only": "Only root administrators can specify a cluster ID for VM deployment.", + "vm.start.concurrent.operation": "Unable to start Instance {{instance}} due to a concurrent operation.", + "vm.start.concurrent.operation.exposed": "Unable to start Instance {{instance}}: {{error}}.", + "vm.start.deployment.failed.exposed": "Unable to start Instance: {{error}}.", + "vm.start.external.prepare.failed": "Failed to prepare Instance for external provisioning.", + "vm.start.failed": "Unable to start Instance {{instance}}.", + "vm.start.host.capacity.insufficient": "Cannot deploy VM to specified host {{host}}: insufficient CPU or RAM capacity.", + "vm.start.host.guid.not.found": "Unable to start Instance: host GUID does not exist in the database.", + "vm.start.host.not.found": "Unable to find host with specified ID for VM deployment.", + "vm.start.host.not.right.state": "Cannot deploy Instance on host {{host}} as it is not in the correct state.", + "vm.start.host.root.admin.only": "Only root administrators can specify a host ID for VM deployment.", + "vm.start.insufficient.capacity": "Unable to start Instance {{instance}} due to insufficient capacity.", + "vm.start.insufficient.capacity.exposed": "Unable to start Instance {{instance}}: {{error}}.", + "vm.start.network.unavailable": "Network is unavailable. Please contact your administrator.", + "vm.start.network.unavailable.admin": "Network is unavailable. Failure: {{error}}.", + "vm.start.orchestrate.failed": "Unable to orchestrate the start of Instance {{instance}}.", + "vm.start.owner.disabled": "The owner of Instance {{instance}} is disabled.", + "vm.start.owner.not.found": "The owner of Instance {{instance}} does not exist.", + "vm.start.password.not.provided": "A valid password for the Instance was not provided.", + "vm.start.planner.not.found": "Cannot find deployment planner '{{plannerName}}'.", + "vm.start.pod.not.found": "Unable to find pod with specified ID for VM deployment.", + "vm.start.pod.root.admin.only": "Only root administrators can specify a pod ID for VM deployment.", + "vm.start.resource.unavailable": "Unable to start Instance {{instance}}: {{error}}.", + "vm.start.setup.menu.hypervisor.not.applicable": "Boot into setup mode is not applicable for hypervisor {{hypervisorType}}.", + "vm.start.systemvm.certificate.failed": "Failed to setup and secure agent for the system Instance {{instance}}.", + "vm.start.template.not.found": "Template for the Instance cannot be found. Instance configuration needs to be updated.", + "vm.start.template.zone.not.found": "Template for the Instance cannot be found in this zone. Instance configuration needs to be updated.", + "vm.start.vm.already.running": "The Instance {{instance}} is already running.", + "vm.start.vm.not.found": "Unable to find Instance with specified ID.", + "vm.start.wrong.state": "Cannot start Instance {{instance}} in state {{state}}.", + "vm.stop.account.removed": "The caller account has been removed and cannot be used.", + "vm.stop.agent.no.contact": "Unable to contact the agent to stop the Instance {{instance}}.", + "vm.stop.answer.failed": "Unable to stop Instance {{instance}}: {{error}}.", + "vm.stop.cleanup.failed": "Failed to cleanup Instance {{instance}}.", + "vm.stop.cleanup.state.change.failed": "Unable to stop Instance {{instance}}.", + "vm.stop.concurrent.operation": "Unable to stop Instance due to a concurrent operation.", + "vm.stop.final.state.transition.failed": "Unable to stop Instance {{instance}}.", + "vm.stop.force.permission.denied": "Account does not have permission to force stop the Instance.", + "vm.stop.forced.concurrent.operation": "Unable to stop Instance {{instance}} due to a concurrent operation.", + "vm.stop.host.not.found": "Unable to stop Instance {{instance}}: host is not available.", + "vm.stop.host.preparing.maintenance": "Stop operation on Instance {{instance}} is not allowed as the host is preparing for maintenance mode.", + "vm.stop.no.answer": "Unable to stop Instance {{instance}}: no answer received from the hypervisor.", + "vm.stop.no.transition": "Unable to stop Instance {{instance}}: {{error}}.", + "vm.stop.not.stopping.state": "Unable to proceed with stopping Instance {{instance}} as it is not in 'Stopping' state.", + "vm.stop.state.transition.failed": "Unable to stop Instance {{instance}}: the Instance is not in the correct state.", + "vm.stop.transaction.failed": "Unable to stop Instance {{instance}}.", + "vm.stop.vm.not.found": "Unable to find Instance with specified ID.", + "vm.stop.work.vm.not.found": "Unable to find Instance to stop.", + "vm.storage.migration.destination.failed": "Unable to migrate Instance: failed to create deployment destination with given volume to pool map.", + "vm.storage.migration.failed": "Failed to migrate storage for Instance {{instance}}: {{error}}.", + "vm.storage.migration.no.volume.mapping": "Unable to migrate Instance {{instance}}: missing volume to pool mapping.", + "vm.storage.migration.state.requested.failed": "Unable to migrate Instance {{instance}}.", + "vm.storage.migration.state.transition.failed": "Failed to change state of Instance {{instance}} after storage migration.", + "vm.unmanage.failed": "Failed to unmanage Instance {{instance}}.", + "vm.unmanage.kvm.command.failed": "Failed to send command to persist domain XML for Instance {{instance}}.", + "vm.unmanage.kvm.no.host": "No available host to persist domain XML for Instance {{instance}}.", + "vm.unmanage.kvm.persist.failed": "Failed to persist domain XML for Instance {{instance}}.", + "vm.unmanage.sharedfs.not.supported": "Unable to unmanage Instance {{instance}} as the operation is not supported for Shared FileSystem Instances.", + "vm.unmanage.unbacked.snapshots": "There are unbacked up snapshots on the ROOT volume. VM unmanage is not permitted; please try again later.", + "vm.unmanage.user.vm.not.found": "Unable to unmanage Instance as the user VM record is not found.", + "vm.unmanage.vm.invalid.state": "Unable to unmanage Instance {{instance}} as it is not in a valid state. Current state: {{state}}.", + "vm.unmanage.vm.not.found": "Unable to find Instance with specified ID for unmanage operation.", + "vm.unmanage.vm.not.right.state": "Instance {{instance}} is not running or stopped and cannot be unmanaged.", + "vm.unmanage.volume.not.attached": "Volume {{volume}} of Instance {{instance}} is not attached to the Instance.", + "vm.unmanage.volume.type.invalid": "Volume {{volume}} has invalid type {{volumeType}}: expected ROOT or DATADISK.", + "vm.update.detail.nondisplayable": "You are not allowed to add or edit the non-displayable setting: {{detailName}}.", + "vm.update.detail.readonly": "You are not allowed to add or edit the read-only setting: {{detailName}}.", + "vm.update.detail.restricted": "You are not allowed to add or edit the restricted setting: {{detailName}}.", + "vm.update.dns.hostname.failed": "Failed to update hostname of Instance {{instance}} to {{hostname}}.", + "vm.update.dns.hostname.update.failed": "Failed to update hostname for the Instance.", + "vm.update.dns.router.send.failed": "Unable to send commands to virtual router to update DNS for the Instance.", + "vm.update.dynamic.scaling.global.setting.disabled": "Dynamic Scaling cannot be enabled for the Instance as the corresponding global setting is disabled.", + "vm.update.dynamic.scaling.offering.not.supported": "Dynamic Scaling cannot be enabled for the Instance since its Service Offering does not support dynamic scaling.", + "vm.update.dynamic.scaling.template.not.supported": "Dynamic Scaling cannot be enabled for the Instance since its Template does not support dynamic scaling.", + "vm.update.extraconfig.disabled": "Cannot set extraconfig because enable.additional.vm.configuration is disabled.", + "vm.update.extraconfig.in.details": "'extraconfig' should not be included in the details map as a key.", + "vm.update.guestos.not.found": "Please specify a valid guest OS ID.", + "vm.update.ha.offering.disabled": "Cannot enable HA for the Instance as its Service Offering has HA disabled.", + "vm.update.instance.name.not.unique": "Instance name {{instanceName}} is not unique.", + "vm.update.lease.params.in.details": "Lease parameters should not be included in the details map as a key.", + "vm.update.non.dynamic.cpu.memory.not.updatable": "CPU number, memory, and CPU speed cannot be updated for a non-dynamic service offering.", + "vm.update.ova.details.change.not.allowed": "OVA detail settings are read from OVA and cannot be changed via API call.", + "vm.update.ova.details.cleanup.not.allowed": "OVA detail settings are read from OVA and cannot be cleaned up via API call.", + "vm.update.owner.not.found": "The owner of Instance {{instance}} does not exist.", + "vm.update.securitygroup.vm.not.stopped": "Instance {{instance}} must be stopped before updating security groups.", + "vm.update.securitygroup.vmware.not.supported": "Security group feature is not supported for VMware hypervisor.", + "vm.update.sharedfs.not.supported": "Operation not supported on Shared FileSystem Instance.", + "vm.update.userdata.failed": "Failed to reset userdata for the Instance.", + "vm.update.userdata.network.element.not.found": "Cannot find network element for UserData provider needed for userdata update.", + "vm.update.vm.not.found": "Unable to find virtual machine with specified ID.", + "vm.update.vm.not.right.state": "Instance {{instance}} is not in the right state for this operation.", + "vm.updatenic.default.nic.not.found": "Unable to find the default NIC for the Instance.", + "vm.updatenic.default.no.default": "Unable to update default NIC to {{nic}} for the Instance {{instance}} and now it has no default.", + "vm.updatenic.default.unknown.error": "Something strange happened, new default network {{newDefaultNetwork}} is not null, and is not equal to the network {{networkId}} of the chosen nic.", + "vm.updatenic.default.update.failed": "Setting a default NIC failed, and we had no default nic, but we were unable to set it back to the original.", + "vm.updatenic.job.exception": "Exception while updating Instance {{instance}} NIC.", + "vm.updatenic.job.exception.admin": "Exception while updating Instance {{instance}} NIC. Check logs for more information.", + "vm.updatenic.job.execution.failed": "Unexpected job execution result.", + "vm.updatenic.nic.already.default": "NIC {{nic}} is already the default for the Instance {{instance}}.", + "vm.updatenic.nic.network.not.found": "Unable to update NIC {{nic}} for the Instance {{instance}} as the Network for the NIC is not found.", + "vm.updatenic.nic.not.attached": "Unable to update NIC {{nic}} for the Instance {{instance}} as the NIC is not attached to the Instance.", + "vm.updatenic.nic.not.found": "Unable to update NIC for the Instance {{instance}} as the specified NIC is not found.", + "vm.updatenic.nic.profile.not.found": "Unable to update NIC {{nic}} for the Instance {{instance}} as failed to find a NIC profile for the existing default Network.", + "vm.updatenic.vm.having.snapshots": "Unable to update NIC for the Instance {{instance}} as it has Instance Snapshots.", + "vm.updatenic.vm.hypervisor.not.kvm": "Unable to update NIC {{nic}} for the Instance {{instance}} as NIC update is only supported with KVM hypervisor.", + "vm.updatenic.vm.not.found": "Unable to update NIC as the specified Instance is not found.", + "vm.updatenic.vm.not.running.or.stopped": "Unable to update NIC {{nic}} for the Instance {{instance}} as the Instance not Running or Stopped.", + "vm.updatenic.work.nic.not.found": "Unable to update NIC as the specified NIC is not found.", + "vm.updatenic.work.nic.not.found.admin": "Unable to update NIC as the specified NIC ID: {{nicId} is not found.", + "vm.updatenic.zone.basic.not.allowed": "Zone {{zone}}, has a NetworkType of Basic. Can't change default NIC on a Basic Network.", + "vm.updatenicip.allocation.failed.basic": "Allocating IP to guest NIC {{nicId}} failed, please choose another IP.", + "vm.updatenicip.allocation.failed.capacity": "Allocating IP to guest NIC {{nic}} failed, for insufficient address capacity.", + "vm.updatenicip.allocation.failed.choose.another": "Allocating IP to guest NIC {{nic}} failed, please choose another IP.", + "vm.updatenicip.datacenter.not.found": "There is no dc with the NIC.", + "vm.updatenicip.network.not.found": "There is no network with the nic.", + "vm.updatenicip.network.not.right.state": "Network is not in the right state to update vm nic ip. Correct states are: {{allowedStates}}.", + "vm.updatenicip.nic.not.found": "There is no nic for the {{nicId}}.", + "vm.updatenicip.nic.not.user.vm": "The nic is not belongs to user vm.", + "vm.updatenicip.not.supported.l2.network": "UpdateVmNicIpCmd is not supported in L2 network.", + "vm.updatenicip.offering.not.found": "There is no network offering with the network.", + "vm.updatenicip.pod.id.null": "Instance Pod ID is null in Basic zone; can't decide the range for IP allocation.", + "vm.updatenicip.vm.not.found": "There is no vm with the nic.", + "vm.updatenicip.vm.running": "VM is not Stopped, unable to update the vm nic having the specified id.", + "vm.upgrade.disk.offering.id.not.same": "Unable to Scale VM, since disk offering id associated with the old service offering is not same for new service offering.", + "vm.upgrade.disk.offering.strictness.mismatch": "Unable to Scale VM, since disk offering strictness flag is not same for new service offering and old service offering.", + "vm.upgrade.disk.offering.tags.mismatch": "Unable to upgrade Instance: the current service offering tags must be a subset of the new service offering tags.", + "vm.upgrade.dynamic.scaling.flag.mismatch": "Unable to Scale VM: since dynamic scaling enabled flag is not same for new service offering and old service offering.", + "vm.upgrade.external.hypervisor.not.supported": "Operation not supported for instance: {{instance}} as it is external hypervisor instance.", + "vm.upgrade.hypervisor.not.supported": "Scaling the VM dynamically is not supported for VMs running on Hypervisor {{hypervisorType}}.", + "vm.upgrade.insufficient.resources": "Unable to upgrade Instance: not enough resources available for the new service offering.", + "vm.upgrade.same.serviceoffering": "Not upgrading Instance {{instance}} since it already has the requested service offering {{serviceOffering}}.", + "vm.upgrade.serviceoffering.inactive": "Unable to upgrade Instance: service offering {{serviceOffering}} is inactive.", + "vm.upgrade.serviceoffering.not.active": "Unable to upgrade Instance {{instance}} with an inactive service offering {{serviceOffering}}.", + "vm.upgrade.serviceoffering.null": "Unable to upgrade Instance: new service offering cannot be null.", + "vm.upgrade.storage.local.to.shared": "Unable to upgrade Instance {{instance}}: target service offering uses local storage but the volume is in a shared storage pool.", + "vm.upgrade.storage.shared.to.local": "Unable to upgrade Instance {{instance}}: target service offering uses shared storage but the volume is in a local storage pool.", + "vm.upgrade.system.use.mismatch": "Unable to upgrade Instance: the system use property differs between the current and new service offering.", + "vm.upgrade.vm.not.right.state": "Unable to upgrade Instance {{instance}} in state {{instanceState}}; make sure the Instance is stopped.", + "vm.upgrade.vm.sunning.scale.down.unsupported": "Scaling down is not supported while the VM is running. The new service offering attributes {\"memory\": {{newMemory}}, \"CPU speed\": {{newSpeed}}, \"vCPUs\": {{newCPU}}} must not be lower than the current values {\"memory\": {{currentMemory}}, \"CPU speed\": {{currentSpeed}}, \"vCPUs\": {{currentCPU}}}.", + "vm.upgrade.vm.uuid.not.found": "Unable to find VM's UUID.", + "vm.upgrade.vm.wrong.state": "Unable to upgrade Instance {{instance}} in state {{instanceState}}; make sure the Instance is stopped or running.", + "vm.userdata.vm.not.found": "Unable to find Instance with specified ID.", + "vm.validate.serviceoffering.cpu.cores.not.dynamic": "CPU cores cannot be customized for service offering {{serviceOffering}} as they have been already predefined to {{cpuCores}}.", + "vm.validate.serviceoffering.cpu.speed.not.dynamic": "CPU speed cannot be customized for service offering {{serviceOffering}} as they have been already predefined to {{cpuSpeed}} MHz.", + "vm.validate.serviceoffering.custom.params.missing": "Need to specify custom parameter values cpu, cpu speed and memory when using custom service offering {{serviceOffering}}.", + "vm.validate.serviceoffering.invalid.cpu.cores": "Invalid cpu cores value for service offering {{serviceOffering}}, please choose another service offering with cpu cores between 1 and {{maxCPUCores}}.", + "vm.validate.serviceoffering.invalid.memory": "Invalid memory value for service offering {{serviceOffering}}, please choose another service offering with memory between 32 and {{maxMemory}} MB.", + "vm.validate.serviceoffering.invalid.params.cpu.cores": "Invalid CPU cores value for service offering {{serviceOffering}}, specify a value between {{minCPUCores}} and {{maxCPUCores}}.", + "vm.validate.serviceoffering.invalid.params.cpu.speed": "Invalid CPU speed value for service offering {{serviceOffering}}, specify a value between 1 and {{maxCPUSpeed}}.", + "vm.validate.serviceoffering.invalid.params.memory": "Invalid memory value for service offering {{serviceOffering}}, specify a value between {{minMemory}} and {{maxMemory}} MB.", + "vm.validate.serviceoffering.memory.not.dynamic": "Memory cannot be customized for service offering {{serviceOffering}} as it has been already predefined to {{memory}} MB." } diff --git a/engine/orchestration/src/test/java/com/cloud/vm/VirtualMachineManagerImplTest.java b/engine/orchestration/src/test/java/com/cloud/vm/VirtualMachineManagerImplTest.java index c656e1a282a..f07c53e5944 100644 --- a/engine/orchestration/src/test/java/com/cloud/vm/VirtualMachineManagerImplTest.java +++ b/engine/orchestration/src/test/java/com/cloud/vm/VirtualMachineManagerImplTest.java @@ -971,7 +971,6 @@ public class VirtualMachineManagerImplTest { private void prepareAndRunCheckIfNewOfferingStorageScopeMatchesStoragePool(boolean isRootOnLocal, boolean isOfferingUsingLocal) { Mockito.doReturn(isRootOnLocal).when(virtualMachineManagerImpl).isRootVolumeOnLocalStorage(anyLong()); - Mockito.doReturn("vmInstanceMockedToString").when(vmInstanceMock).toString(); Mockito.doReturn(isOfferingUsingLocal).when(diskOfferingMock).isUseLocalStorage(); virtualMachineManagerImpl.checkIfNewOfferingStorageScopeMatchesStoragePool(vmInstanceMock, diskOfferingMock); } @@ -1824,7 +1823,7 @@ public class VirtualMachineManagerImplTest { vmTO.setName(vmName); when(virtualMachineManagerImpl.findClusterAndHostIdForVm(vmInstanceMock, false)).thenReturn(new Pair<>(clusterMockId, null)); CloudRuntimeException exception = assertThrows(CloudRuntimeException.class, () -> virtualMachineManagerImpl.persistDomainForKVM(vmInstanceMock, null)); - assertEquals("No available host to persist domain XML for Instance: " + vmName, exception.getMessage()); + assertEquals("vm.unmanage.kvm.no.host", exception.getMessageKey()); } @Test @@ -1834,7 +1833,7 @@ public class VirtualMachineManagerImplTest { UnmanageInstanceAnswer failureAnswer = new UnmanageInstanceAnswer(null, false, "failure"); when(agentManagerMock.send(anyLong(), any(UnmanageInstanceCommand.class))).thenReturn(failureAnswer); CloudRuntimeException exception = assertThrows(CloudRuntimeException.class, () -> virtualMachineManagerImpl.persistDomainForKVM(vmInstanceMock, null)); - assertEquals("Failed to persist domain XML for Instance: " + vmName + " on host ID: " + hostMockId, exception.getMessage()); + assertEquals("vm.unmanage.kvm.persist.failed", exception.getMessageKey()); } @Test @@ -1843,7 +1842,7 @@ public class VirtualMachineManagerImplTest { when(vmInstanceMock.getHostId()).thenReturn(hostMockId); doThrow(new AgentUnavailableException("Agent down", hostMockId)).when(agentManagerMock).send(anyLong(), any(UnmanageInstanceCommand.class)); CloudRuntimeException exception = assertThrows(CloudRuntimeException.class, () -> virtualMachineManagerImpl.persistDomainForKVM(vmInstanceMock, null)); - assertEquals("Failed to send command to persist domain XML for Instance: " + vmName + " on host ID: " + hostMockId, exception.getMessage()); + assertEquals("vm.unmanage.kvm.command.failed", exception.getMessageKey()); } @Test(expected = ConcurrentOperationException.class) @@ -1860,7 +1859,7 @@ public class VirtualMachineManagerImplTest { when(vmInstanceMock.getHostId()).thenReturn(hostMockId); doThrow(new OperationTimedoutException(null, hostMockId, 123L, 60, false)).when(agentManagerMock).send(anyLong(), any(UnmanageInstanceCommand.class)); CloudRuntimeException exception = assertThrows(CloudRuntimeException.class, () -> virtualMachineManagerImpl.persistDomainForKVM(vmInstanceMock, null)); - assertEquals("Failed to send command to persist domain XML for Instance: " + vmName + " on host ID: " + hostMockId, exception.getMessage()); + assertEquals("vm.unmanage.kvm.command.failed", exception.getMessageKey()); } @Test(expected = CloudRuntimeException.class) diff --git a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java index 8fc4121c141..88891d54ef4 100644 --- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java @@ -8906,7 +8906,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir PhysicalNetwork physicalNetwork = _physicalNetworkDao.findById(physicalNetworkId); if (physicalNetwork == null) { - throw Exceptions.invalidParameterValueException("vm.assign.physical.network.not.found", Map.of("physicalNetworkId", physicalNetworkId, "tag", requiredOfferingTags)); + throw Exceptions.invalidParameterValueException("vm.assign.physical.network.not.found", + Map.of("physicalNetworkId", physicalNetworkId, "tag", StringUtils.toNullSafeString(requiredOfferingTags))); } long requiredOfferingId = requiredOffering.getId(); diff --git a/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java b/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java index 23b385e7cd4..c6d01ca506c 100644 --- a/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java +++ b/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java @@ -17,6 +17,68 @@ package org.apache.cloudstack.vm; +import static org.apache.cloudstack.api.ApiConstants.MAX_IOPS; +import static org.apache.cloudstack.api.ApiConstants.MIN_IOPS; +import static org.apache.cloudstack.storage.volume.VolumeImportUnmanageService.AllowImportVolumeWithBackingFile; +import static org.apache.cloudstack.vm.ImportVmTask.Step.CloningInstance; +import static org.apache.cloudstack.vm.ImportVmTask.Step.Completed; +import static org.apache.cloudstack.vm.ImportVmTask.Step.ConvertingInstance; +import static org.apache.cloudstack.vm.ImportVmTask.Step.Importing; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.Set; +import java.util.stream.Collectors; + +import javax.inject.Inject; + +import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.api.ApiCommandResourceType; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.ResponseGenerator; +import org.apache.cloudstack.api.ResponseObject; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.admin.vm.ImportUnmanagedInstanceCmd; +import org.apache.cloudstack.api.command.admin.vm.ImportVmCmd; +import org.apache.cloudstack.api.command.admin.vm.ListImportVMTasksCmd; +import org.apache.cloudstack.api.command.admin.vm.ListUnmanagedInstancesCmd; +import org.apache.cloudstack.api.command.admin.vm.ListVmsForImportCmd; +import org.apache.cloudstack.api.command.admin.vm.UnmanageVMInstanceCmd; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.UnmanagedInstanceResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.error.Exceptions; +import org.apache.cloudstack.framework.config.ConfigKey; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.reservation.dao.ReservationDao; +import org.apache.cloudstack.resourcelimit.Reserver; +import org.apache.cloudstack.storage.datastore.db.ImageStoreDao; +import org.apache.cloudstack.storage.datastore.db.ImageStoreVO; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.cloudstack.storage.volume.VolumeOnStorageTO; +import org.apache.cloudstack.utils.volume.VirtualMachineDiskInfo; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MapUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; import com.cloud.agent.api.CheckConvertInstanceAnswer; @@ -59,8 +121,6 @@ import com.cloud.exception.AgentUnavailableException; import com.cloud.exception.InsufficientAddressCapacityException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.InsufficientVirtualNetworkCapacityException; -import com.cloud.exception.InvalidParameterValueException; -import org.apache.cloudstack.error.Exceptions; import com.cloud.exception.OperationTimedoutException; import com.cloud.exception.PermissionDeniedException; import com.cloud.exception.ResourceAllocationException; @@ -141,68 +201,9 @@ import com.cloud.vm.VirtualMachineProfileImpl; import com.cloud.vm.VmDetailConstants; import com.cloud.vm.dao.NicDao; import com.cloud.vm.dao.UserVmDao; -import com.cloud.vm.dao.VMInstanceDetailsDao; import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.vm.dao.VMInstanceDetailsDao; import com.google.gson.Gson; -import org.apache.cloudstack.acl.ControlledEntity; -import org.apache.cloudstack.api.ApiCommandResourceType; -import org.apache.cloudstack.api.ApiConstants; -import org.apache.cloudstack.api.ApiErrorCode; -import org.apache.cloudstack.api.ResponseGenerator; -import org.apache.cloudstack.api.ResponseObject; -import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.command.admin.vm.ImportUnmanagedInstanceCmd; -import org.apache.cloudstack.api.command.admin.vm.ImportVmCmd; -import org.apache.cloudstack.api.command.admin.vm.ListImportVMTasksCmd; -import org.apache.cloudstack.api.command.admin.vm.ListUnmanagedInstancesCmd; -import org.apache.cloudstack.api.command.admin.vm.ListVmsForImportCmd; -import org.apache.cloudstack.api.command.admin.vm.UnmanageVMInstanceCmd; -import org.apache.cloudstack.api.response.ListResponse; -import org.apache.cloudstack.api.response.UnmanagedInstanceResponse; -import org.apache.cloudstack.api.response.UserVmResponse; -import org.apache.cloudstack.context.CallContext; -import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; -import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService; -import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; -import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; -import org.apache.cloudstack.framework.config.ConfigKey; -import org.apache.cloudstack.framework.config.dao.ConfigurationDao; -import org.apache.cloudstack.reservation.dao.ReservationDao; -import org.apache.cloudstack.resourcelimit.Reserver; -import org.apache.cloudstack.storage.datastore.db.ImageStoreDao; -import org.apache.cloudstack.storage.datastore.db.ImageStoreVO; -import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; -import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; -import org.apache.cloudstack.storage.volume.VolumeOnStorageTO; -import org.apache.cloudstack.utils.volume.VirtualMachineDiskInfo; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.collections.MapUtils; -import org.apache.commons.lang3.BooleanUtils; -import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import javax.inject.Inject; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.Set; -import java.util.stream.Collectors; - -import static org.apache.cloudstack.api.ApiConstants.MAX_IOPS; -import static org.apache.cloudstack.api.ApiConstants.MIN_IOPS; -import static org.apache.cloudstack.storage.volume.VolumeImportUnmanageService.AllowImportVolumeWithBackingFile; -import static org.apache.cloudstack.vm.ImportVmTask.Step.CloningInstance; -import static org.apache.cloudstack.vm.ImportVmTask.Step.Completed; -import static org.apache.cloudstack.vm.ImportVmTask.Step.ConvertingInstance; -import static org.apache.cloudstack.vm.ImportVmTask.Step.Importing; public class UnmanagedVMsManagerImpl implements UnmanagedVMsManager { protected Logger logger = LogManager.getLogger(UnmanagedVMsManagerImpl.class); @@ -3114,7 +3115,8 @@ public class UnmanagedVMsManagerImpl implements UnmanagedVMsManager { } final String hypervisorType = cmd.getHypervisor(); if (!Hypervisor.HypervisorType.KVM.toString().equalsIgnoreCase(hypervisorType)) { - throw Exceptions.invalidParameterValueException("vm.import.kvm.list.hypervisor.not.supported", Map.of("hypervisor", hypervisorType)); + throw Exceptions.invalidParameterValueException("vm.import.kvm.list.hypervisor.not.supported", + Map.of("hypervisor", StringUtils.defaultIfEmpty(hypervisorType, "null"))); } String keyword = cmd.getKeyword(); diff --git a/server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java b/server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java index 75779cc4c96..19b9c990689 100644 --- a/server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java +++ b/server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java @@ -1545,7 +1545,6 @@ public class UserVmManagerImplTest { when(accountMock.getId()).thenReturn(userId); when(userVmDao.findById(vmId)).thenReturn(userVmVoMock); when(userVmVoMock.getAccountId()).thenReturn(accountId); - when(userVmVoMock.getUuid()).thenReturn("a967643d-7633-4ab4-ac26-9c0b63f50cc1"); when(accountDao.findById(accountId)).thenReturn(callerAccount); when(userVmVoMock.getState()).thenReturn(VirtualMachine.State.Starting); @@ -1561,7 +1560,6 @@ public class UserVmManagerImplTest { when(accountMock.getId()).thenReturn(userId); when(userVmDao.findById(vmId)).thenReturn(userVmVoMock); when(userVmVoMock.getAccountId()).thenReturn(accountId); - when(userVmVoMock.getUuid()).thenReturn("a967643d-7633-4ab4-ac26-9c0b63f50cc1"); when(accountDao.findById(accountId)).thenReturn(callerAccount); when(userVmVoMock.getState()).thenReturn(VirtualMachine.State.Running); when(userVmVoMock.getTemplateId()).thenReturn(currentTemplateId); @@ -1582,7 +1580,6 @@ public class UserVmManagerImplTest { when(accountMock.getId()).thenReturn(userId); when(userVmDao.findById(vmId)).thenReturn(userVmVoMock); when(userVmVoMock.getAccountId()).thenReturn(accountId); - when(userVmVoMock.getUuid()).thenReturn("a967643d-7633-4ab4-ac26-9c0b63f50cc1"); when(accountDao.findById(accountId)).thenReturn(callerAccount); when(userVmVoMock.getState()).thenReturn(VirtualMachine.State.Running); when(userVmVoMock.getTemplateId()).thenReturn(currentTemplateId); @@ -1850,25 +1847,25 @@ public class UserVmManagerImplTest { @Test public void validateIfVmSupportsMigrationTestVmIsNullThrowsInvalidParameterValueException() { - String expectedMessage = String.format("There is no VM by ID [%s].", 1L); + String expectedMessageKey = "vm.assign.vm.not.found"; InvalidParameterValueException assertThrows = Assert.assertThrows(expectedInvalidParameterValueException, () -> { userVmManagerImpl.validateIfVmSupportsMigration(null, 1L); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test public void validateIfVmSupportsMigrationTestVmIsRunningThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Unable to move VM [%s] in [%s] state.", userVmVoMock, VirtualMachine.State.Running); + String expectedMessageKey = "vm.assign.vm.not.right.state"; Mockito.doReturn(VirtualMachine.State.Running).when(userVmVoMock).getState(); InvalidParameterValueException assertThrows = Assert.assertThrows(expectedInvalidParameterValueException, () -> { userVmManagerImpl.validateIfVmSupportsMigration(userVmVoMock, 1L); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -1879,7 +1876,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.validateIfVmSupportsMigration(userVmVoMock, 1L); }); - Assert.assertEquals("Migration is not supported for Shared FileSystem Instances.", assertThrows.getMessage()); + Assert.assertEquals("vm.assign.sharedfs.not.supported", assertThrows.getMessageKey()); } @Test @@ -1897,29 +1894,30 @@ public class UserVmManagerImplTest { @Test public void validateOldAndNewAccountsTestOldAccountIsNullThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Invalid old account [%s] for VM in domain [%s].", userVmVoMock.getAccountId(), assignVmCmdMock.getDomainId()); + String expectedMessageKey = "vm.assign.old.account.invalid"; InvalidParameterValueException assertThrows = Assert.assertThrows(expectedInvalidParameterValueException, () -> { userVmManagerImpl.validateOldAndNewAccounts(null, accountMock, userVmVoMock.getAccountId(), "", assignVmCmdMock.getDomainId()); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test public void validateOldAndNewAccountsTestNewAccountIsNullThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Invalid new account [%s] for VM in domain [%s].", assignVmCmdMock.getAccountName(), assignVmCmdMock.getDomainId()); + String expectedMessageKey = "vm.assign.new.account.invalid"; + Mockito.doReturn("test").when(assignVmCmdMock).getAccountName(); InvalidParameterValueException assertThrows = Assert.assertThrows(expectedInvalidParameterValueException, () -> { userVmManagerImpl.validateOldAndNewAccounts(accountMock, null, 1L, assignVmCmdMock.getAccountName(), assignVmCmdMock.getDomainId()); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test public void validateOldAndNewAccountsTestNewAccountStateIsDisabledThrowsInvalidParameterValueException() { - String expectedMessage = String.format("The new account owner [%s] is disabled.", accountMock); + String expectedMessageKey = "vm.assign.new.account.disabled"; Mockito.doReturn(Account.State.DISABLED).when(accountMock).getState(); @@ -1927,12 +1925,12 @@ public class UserVmManagerImplTest { userVmManagerImpl.validateOldAndNewAccounts(accountMock, accountMock, 1L, "", 1L); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test public void validateOldAndNewAccountsTestOldAccountIsTheSameAsNewAccountThrowsInvalidParameterValueException() { - String expectedMessage = String.format("The new account [%s] is the same as the old account.", accountMock); + String expectedMessageKey = "vm.assign.same.account"; Mockito.doReturn(Account.State.ENABLED).when(accountMock).getState(); @@ -1940,7 +1938,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.validateOldAndNewAccounts(accountMock, accountMock, 1L, "", 1L); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -1963,7 +1961,7 @@ public class UserVmManagerImplTest { @Test public void validateIfVmHasNoRulesTestPortForwardingRulesExistThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Remove any Port Forwarding rules for VM [%s] before assigning it to another user.", userVmVoMock); + String expectedMessageKey = "vm.assign.portforwarding.rules.exist"; Mockito.doReturn(portForwardingRulesListMock).when(portForwardingRulesDaoMock).listByVm(Mockito.anyLong()); @@ -1971,12 +1969,12 @@ public class UserVmManagerImplTest { userVmManagerImpl.validateIfVmHasNoRules(userVmVoMock, 1L); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test public void validateIfVmHasNoRulesTestStaticNatRulesExistThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Remove the StaticNat rules for VM [%s] before assigning it to another user.", userVmVoMock); + String expectedMessageKey = "vm.assign.staticnat.rules.exist"; Mockito.doReturn(firewallRuleVoListMock).when(firewallRulesDaoMock).listStaticNatByVmId(Mockito.anyLong()); @@ -1984,12 +1982,12 @@ public class UserVmManagerImplTest { userVmManagerImpl.validateIfVmHasNoRules(userVmVoMock, 1L); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test public void validateIfVmHasNoRulesTestLoadBalancingRulesExistThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Remove the Load Balancing rules for VM [%s] before assigning it to another user.", userVmVoMock); + String expectedMessageKey = "vm.assign.loadbalancer.rules.exist"; Mockito.doReturn(loadBalancerVmMapVoListMock).when(loadBalancerVmMapDaoMock).listByInstanceId(Mockito.anyLong()); @@ -1997,12 +1995,12 @@ public class UserVmManagerImplTest { userVmManagerImpl.validateIfVmHasNoRules(userVmVoMock, 1L); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test public void validateIfVmHasNoRulesTestOneToOneNatRulesExistThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Remove the One to One Nat rule for VM [%s] for IP [%s].", userVmVoMock, ipAddressVoMock.toString()); + String expectedMessageKey = "vm.assign.onetoonat.rule.exists"; LinkedList ipAddressVoList = new LinkedList<>(); @@ -2014,7 +2012,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.validateIfVmHasNoRules(userVmVoMock, 1L); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2048,13 +2046,13 @@ public class UserVmManagerImplTest { @Test public void validateIfNewOwnerHasAccessToTemplateTestTemplateIsNullThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Template for VM [%s] cannot be found.", userVmVoMock.getUuid()); + String expectedMessageKey = "vm.assign.template.not.found"; InvalidParameterValueException assertThrows = Assert.assertThrows(expectedInvalidParameterValueException, () -> { userVmManagerImpl.validateIfNewOwnerHasAccessToTemplate(userVmVoMock, accountMock, null); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2109,13 +2107,13 @@ public class UserVmManagerImplTest { @Test public void addDefaultNetworkToNetworkListTestDefaultNetworkIsNullThrowsInvalidParameterValueException() { - String expectedMessage = "Unable to find a default network to start a VM."; + String expectedMessageKey = "vm.assign.default.network.not.found"; InvalidParameterValueException assertThrows = Assert.assertThrows(expectedInvalidParameterValueException, () -> { userVmManagerImpl.addDefaultNetworkToNetworkList(networkVoListMock, null); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2138,7 +2136,7 @@ public class UserVmManagerImplTest { @Test public void addSecurityGroupsToVmTestIsVmWareAndSecurityGroupIdListIsNotNullThrowsInvalidParameterValueException() { - String expectedMessage = "Security group feature is not supported for VMWare hypervisor."; + String expectedMessageKey = "vm.assign.securitygroup.vmware.not.supported"; LinkedList securityGroupIdList = new LinkedList<>(); Mockito.doReturn(Hypervisor.HypervisorType.VMware).when(virtualMachineTemplateMock).getHypervisorType(); @@ -2147,7 +2145,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.addSecurityGroupsToVm(accountMock, userVmVoMock, virtualMachineTemplateMock, securityGroupIdList, networkMock); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2180,8 +2178,7 @@ public class UserVmManagerImplTest { @Test public void getOfferingWithRequiredAvailabilityForNetworkCreationTestRequiredOfferingsListHasNoOfferingsThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Unable to find network offering with availability [%s] to automatically create the network as a part of VM creation.", - NetworkOffering.Availability.Required); + String expectedMessageKey = "vm.assign.network.offering.required.not.found"; LinkedList requiredOfferings = new LinkedList<>(); Mockito.doReturn(requiredOfferings).when(networkOfferingDaoMock).listByAvailability(NetworkOffering.Availability.Required, false); @@ -2190,25 +2187,23 @@ public class UserVmManagerImplTest { userVmManagerImpl.getOfferingWithRequiredAvailabilityForNetworkCreation(); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test public void getOfferingWithRequiredAvailabilityForNetworkCreationTestFirstOfferingIsNotEnabledThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Required network offering ID [%s] is not in [%s] state.", 1L, NetworkOffering.State.Enabled); + String expectedMessageKey = "vm.assign.network.offering.required.not.enabled"; Mockito.doReturn(networkOfferingVoListMock).when(networkOfferingDaoMock).listByAvailability(NetworkOffering.Availability.Required, false); Mockito.doReturn(networkOfferingVoMock).when(networkOfferingVoListMock).get(0); Mockito.doReturn(NetworkOffering.State.Disabled).when(networkOfferingVoMock).getState(); - Mockito.doReturn(1L).when(networkOfferingVoMock).getId(); - InvalidParameterValueException assertThrows = Assert.assertThrows(expectedInvalidParameterValueException, () -> { userVmManagerImpl.getOfferingWithRequiredAvailabilityForNetworkCreation(); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test(expected = CloudRuntimeException.class) @@ -2225,7 +2220,7 @@ public class UserVmManagerImplTest { @Test public void selectApplicableNetworkToCreateVmTestVirtualNetworkHasMultipleNetworksThrowsInvalidParameterValueException() { - String expectedMessage = String.format("More than one default isolated network has been found for account [%s]; please specify networkIDs.", accountMock); + String expectedMessageKey = "vm.assign.multiple.default.networks"; HashSet applicableNetworks = new HashSet<>(); LinkedList virtualNetworks = new LinkedList<>(); @@ -2238,7 +2233,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.selectApplicableNetworkToCreateVm(accountMock, _dcMock, applicableNetworks); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2419,7 +2414,7 @@ public class UserVmManagerImplTest { @Test public void addAdditionalNetworksToVmTestNetworkIsNullThrowsInvalidParameterValueException() { - String expectedMessage = "Unable to find specified Network ID."; + String expectedMessageKey = "vm.assign.network.not.found"; LinkedList networkIdList = new LinkedList<>(); HashSet applicableNetworks = Mockito.spy(new HashSet<>()); HashMap requestedIPv4ForNics = new HashMap<>(); @@ -2431,12 +2426,12 @@ public class UserVmManagerImplTest { userVmManagerImpl.addAdditionalNetworksToVm(userVmVoMock, accountMock, networkIdList, applicableNetworks, requestedIPv4ForNics, requestedIPv6ForNics); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test public void addAdditionalNetworksToVmTestNetworkOfferingIsSystemOnlyThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Specified network [%s] is system only and cannot be used for VM deployment.", networkMock); + String expectedMessageKey = "vm.assign.network.system.only"; LinkedList networkIdList = new LinkedList<>(); HashSet applicableNetworks = Mockito.spy(new HashSet<>()); HashMap requestedIPv4ForNics = new HashMap<>(); @@ -2452,7 +2447,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.addAdditionalNetworksToVm(userVmVoMock, accountMock, networkIdList, applicableNetworks, requestedIPv4ForNics, requestedIPv6ForNics); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2542,12 +2537,12 @@ public class UserVmManagerImplTest { public void createApplicableNetworkToCreateVmTestPhysicalNetworkIsNullThrowsInvalidParameterValueException() { Mockito.doReturn(networkOfferingVoMock).when(userVmManagerImpl).getOfferingWithRequiredAvailabilityForNetworkCreation(); - String expectedMessage = String.format("Unable to find physical network with ID [%s] and tag [%s].", 0L, null); + String expectedMessageKey = "vm.assign.physical.network.not.found"; InvalidParameterValueException assertThrows = Assert.assertThrows(expectedInvalidParameterValueException, () -> { userVmManagerImpl.createApplicableNetworkToCreateVm(accountMock, _dcMock); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2739,7 +2734,7 @@ public class UserVmManagerImplTest { @Test public void implementNetworkTestImplementedNetworkCatchException() throws ResourceUnavailableException, InsufficientCapacityException { - String expectedMessage = String.format("Failed to implement network [%s] elements and resources as a part of network provision.", networkMock); + String expectedMessageKey = "vm.assign.network.implement.failed"; CallContext callContextMock = Mockito.mock(CallContext.class); @@ -2757,13 +2752,13 @@ public class UserVmManagerImplTest { userVmManagerImpl.implementNetwork(accountMock, _dcMock, networkMock); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } } @Test public void updateBasicTypeNetworkForVmTestNetworkIdListIsNotEmptyThrowsInvalidParameterValueException() { - String expectedMessage = "Cannot move VM with Network IDs; this is a basic zone VM."; + String expectedMessageKey = "vm.assign.basic.zone.network.ids.not.allowed"; LinkedList networkIdList = new LinkedList<>(); LinkedList securityGroupIdList = new LinkedList<>(); @@ -2774,7 +2769,7 @@ public class UserVmManagerImplTest { securityGroupIdList); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2814,7 +2809,7 @@ public class UserVmManagerImplTest { @Test public void updateAdvancedTypeNetworkForVmTestSecurityGroupIsEnabledApplicableNetworksIsEmptyThrowsInvalidParameterValueException() { - String expectedMessage = "No network is specified, please specify one when you move the VM. For now, please add a network to VM on NICs tab."; + String expectedMessageKey = "vm.assign.advanced.sg.no.network"; LinkedList securityGroupIdList = Mockito.mock(LinkedList.class); LinkedList networkIdList = new LinkedList<>(); @@ -2826,7 +2821,7 @@ public class UserVmManagerImplTest { }); Mockito.verify(securityGroupManagerMock).removeInstanceFromGroups(Mockito.any()); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2852,7 +2847,7 @@ public class UserVmManagerImplTest { @Test public void updateAdvancedTypeNetworkForVmTestSecurityGroupIsNotEnabledSecurityGroupIdListIsNotEmptyThrowsInvalidParameterValueException() { - String expectedMessage = "Cannot move VM with security groups; security group feature is not enabled in this zone."; + String expectedMessageKey = "vm.assign.securitygroup.zone.not.enabled"; LinkedList securityGroupIdList = Mockito.mock(LinkedList.class); LinkedList networkIdList = new LinkedList<>(); @@ -2865,7 +2860,7 @@ public class UserVmManagerImplTest { _dcMock, networkIdList, securityGroupIdList); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2961,8 +2956,7 @@ public class UserVmManagerImplTest { @Test public void validateIfVolumesHaveNoSnapshotsTestVolumeHasSnapshotsThrowsInvalidParameterException() { - String expectedMessage = String.format("Snapshots exist for volume [%s]. Detach volume or remove snapshots for the volume before assigning VM to another user.", - volumeVOMock.getName()); + String expectedMessageKey = "vm.assign.volume.snapshots.exist"; LinkedList volumes = new LinkedList<>(); volumes.add(volumeVOMock); @@ -2975,7 +2969,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.validateIfVolumesHaveNoSnapshots(volumes); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -2991,7 +2985,7 @@ public class UserVmManagerImplTest { @Test public void moveVmToUserTestCallerIsNotRootAdminAndDomainAdminThrowsInvalidParameterValueException() { - String expectedMessage = String.format("Only root or domain admins are allowed to assign VMs. Caller [%s] is of type [%s].", callerAccount, callerAccount.getType()); + String expectedMessageKey = "vm.assign.permission.denied"; Mockito.doReturn(false).when(accountManager).isRootAdmin(Mockito.anyLong()); Mockito.doReturn(false).when(accountManager).isDomainAdmin(Mockito.anyLong()); @@ -3000,7 +2994,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.moveVmToUser(assignVmCmdMock); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -3024,7 +3018,7 @@ public class UserVmManagerImplTest { public void moveVmToUserTestProjectIdProvidedAndDomainIdIsNullThrowsInvalidParameterValueException() throws ResourceUnavailableException, InsufficientCapacityException, ResourceAllocationException { - String expectedMessage = "Please provide a valid domain ID; cannot assign VM to a project if domain ID is NULL."; + String expectedMessageKey = "vm.assign.domain.id.null"; Mockito.doReturn(true).when(accountManager).isRootAdmin(Mockito.anyLong()); Mockito.doReturn(userVmVoMock).when(userVmDao).findById(Mockito.anyLong()); @@ -3037,7 +3031,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.moveVmToUser(assignVmCmdMock); }); - Assert.assertEquals(expectedMessage, assertThrows.getMessage()); + Assert.assertEquals(expectedMessageKey, assertThrows.getMessageKey()); } @Test @@ -3800,6 +3794,7 @@ public class UserVmManagerImplTest { public void testApplyLeaseOnUpdateInstanceForNoLease() { UserVmVO userVm = Mockito.mock(UserVmVO.class); when(userVm.getId()).thenReturn(vmId); + when(userVm.getUuid()).thenReturn(UUID.randomUUID().toString()); when(vmInstanceDetailsDao.listDetailsKeyPairs(anyLong(), anyList())).thenReturn(getLeaseDetails(5, VMLeaseManager.LeaseActionExecution.DISABLED.name())); userVmManagerImpl.applyLeaseOnUpdateInstance(userVm, 10, VMLeaseManager.ExpiryAction.STOP); Mockito.verify(userVmManagerImpl, Mockito.times(0)).addLeaseDetailsForInstance(any(), any(), any()); @@ -3809,6 +3804,7 @@ public class UserVmManagerImplTest { public void testApplyLeaseOnUpdateInstanceForLease() { UserVmVO userVm = Mockito.mock(UserVmVO.class); when(userVm.getId()).thenReturn(vmId); + when(userVm.getUuid()).thenReturn(UUID.randomUUID().toString()); when(vmInstanceDetailsDao.listDetailsKeyPairs(anyLong(), anyList())).thenReturn(getLeaseDetails(5, VMLeaseManager.LeaseActionExecution.PENDING.name())); userVmManagerImpl.applyLeaseOnUpdateInstance(userVm, 10, VMLeaseManager.ExpiryAction.STOP); Mockito.verify(userVmManagerImpl, Mockito.times(1)).addLeaseDetailsForInstance(any(), any(), any()); @@ -3818,6 +3814,7 @@ public class UserVmManagerImplTest { public void testApplyLeaseOnUpdateInstanceForDisabledLeaseInstance() { UserVmVO userVm = Mockito.mock(UserVmVO.class); when(userVm.getId()).thenReturn(vmId); + when(userVm.getUuid()).thenReturn(UUID.randomUUID().toString()); when(vmInstanceDetailsDao.listDetailsKeyPairs(anyLong(), anyList())).thenReturn(getLeaseDetails(5, VMLeaseManager.LeaseActionExecution.DISABLED.name())); userVmManagerImpl.applyLeaseOnUpdateInstance(userVm, 10, VMLeaseManager.ExpiryAction.STOP); Mockito.verify(userVmManagerImpl, Mockito.times(1)).addLeaseDetailsForInstance(any(), any(), any()); @@ -4040,7 +4037,7 @@ public class UserVmManagerImplTest { InvalidParameterValueException ex = assertThrows(InvalidParameterValueException.class, () -> userVmManagerImpl.createVirtualMachine(deployVMCmd)); - assertEquals("Deployment of virtual machine is supported only for Zone-wide storage pools", ex.getMessage()); + assertEquals("vm.deploy.volume.storage.pool.zone.required", ex.getMessageKey()); } @Test @@ -4056,7 +4053,7 @@ public class UserVmManagerImplTest { InvalidParameterValueException ex = assertThrows(InvalidParameterValueException.class, () -> userVmManagerImpl.createVirtualMachine(deployVMCmd)); - assertEquals("Deployment of virtual machine is supported only for Zone-wide storage pools", ex.getMessage()); + assertEquals("vm.deploy.volume.storage.pool.zone.required", ex.getMessageKey()); } @Test @@ -4190,7 +4187,7 @@ public class UserVmManagerImplTest { InvalidParameterValueException exception = assertThrows(InvalidParameterValueException.class, () -> { userVmManagerImpl.unmanageUserVM(vmId, null); }); - assertEquals("Unable to find a VM with ID = " + vmId, exception.getMessage()); + assertEquals("vm.unmanage.vm.not.found", exception.getMessageKey()); verify(userVmDao, never()).acquireInLockTable(anyLong()); verify(userVmDao, never()).releaseFromLockTable(anyLong()); } @@ -4214,7 +4211,7 @@ public class UserVmManagerImplTest { CloudRuntimeException exception = assertThrows(CloudRuntimeException.class, () -> { userVmManagerImpl.unmanageUserVM(vmId, null); }); - assertEquals("Instance: test-vm is not running or stopped, cannot be unmanaged", exception.getMessage()); + assertEquals("vm.unmanage.vm.not.right.state", exception.getMessage()); verify(userVmDao, times(1)).releaseFromLockTable(vmId); } @@ -4254,7 +4251,7 @@ public class UserVmManagerImplTest { userVmManagerImpl.unmanageUserVM(vmId, null); }); - assertEquals("Error while unmanaging VM: " + vmUuid, exception.getMessage()); + assertEquals("vm.unmanage.failed", exception.getMessageKey()); verify(userVmManagerImpl, never()).cleanupUnmanageVMResources(any(UserVmVO.class)); verify(userVmManagerImpl, never()).unmanageVMFromDB(anyLong()); verify(userVmDao, times(1)).releaseFromLockTable(vmId); @@ -4463,7 +4460,6 @@ public class UserVmManagerImplTest { private ServiceOfferingVO getMockedServiceOffering(boolean custom, boolean customSpeed) { ServiceOfferingVO serviceOffering = mock(ServiceOfferingVO.class); - when(serviceOffering.getUuid()).thenReturn("offering-uuid"); when(serviceOffering.isDynamic()).thenReturn(custom); when(serviceOffering.isCustomCpuSpeedSupported()).thenReturn(customSpeed); if (custom) { @@ -4484,7 +4480,7 @@ public class UserVmManagerImplTest { ServiceOfferingVO serviceOffering = getMockedServiceOffering(true, true); InvalidParameterValueException ex = Assert.assertThrows(InvalidParameterValueException.class, () -> userVmManagerImpl.validateCustomParameters(serviceOffering, Collections.emptyMap())); - assertEquals("Need to specify custom parameter values cpu, cpu speed and memory when using custom offering", ex.getMessage()); + assertEquals("vm.validate.serviceoffering.custom.params.missing", ex.getMessageKey()); } @Test @@ -4497,7 +4493,7 @@ public class UserVmManagerImplTest { InvalidParameterValueException ex = Assert.assertThrows(InvalidParameterValueException.class, () -> userVmManagerImpl.validateCustomParameters(serviceOffering, customParameters)); - Assert.assertTrue(ex.getMessage().startsWith("The CPU speed of this offering")); + Assert.assertEquals("vm.validate.serviceoffering.cpu.speed.not.dynamic", ex.getMessageKey()); } @Test @@ -4532,7 +4528,7 @@ public class UserVmManagerImplTest { InvalidParameterValueException ex = Assert.assertThrows(InvalidParameterValueException.class, () -> userVmManagerImpl.verifyVmLimits(userVmVoMock, customParameters)); - assertEquals("CPU number, Memory and CPU speed cannot be updated for a non-dynamic offering", ex.getMessage()); + assertEquals("vm.update.non.dynamic.cpu.memory.not.updatable", ex.getMessageKey()); } @Test @@ -4550,6 +4546,6 @@ public class UserVmManagerImplTest { InvalidParameterValueException ex = Assert.assertThrows(InvalidParameterValueException.class, () -> userVmManagerImpl.verifyVmLimits(userVmVoMock, customParameters)); - Assert.assertTrue(ex.getMessage().startsWith("The CPU speed of this offering")); + Assert.assertEquals("vm.validate.serviceoffering.cpu.speed.not.dynamic", ex.getMessageKey()); } } diff --git a/server/src/test/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImplTest.java b/server/src/test/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImplTest.java index bee6c4ad257..6b61706d487 100644 --- a/server/src/test/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImplTest.java +++ b/server/src/test/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImplTest.java @@ -397,6 +397,7 @@ public class UnmanagedVMsManagerImplTest { when(responseGenerator.createUserVmResponse(any(ResponseObject.ResponseView.class), Mockito.anyString(), any(UserVm.class))).thenReturn(userVmResponses); when(vmDao.findById(virtualMachineId)).thenReturn(virtualMachine); + when(virtualMachine.getUuid()).thenReturn(UUID.randomUUID().toString()); when(virtualMachine.getState()).thenReturn(VirtualMachine.State.Running); when(unmanagedInstanceMock.getCpuCores()).thenReturn(8); @@ -1041,9 +1042,11 @@ public class UnmanagedVMsManagerImplTest { public void testValidateSelectedConversionStoragePoolForVddkFailsWhenPoolDoesNotSupportDiskOfferings() { long poolId = 11L; StoragePoolVO selectedPool = mock(StoragePoolVO.class); + when(selectedPool.getName()).thenReturn("Pool"); ServiceOfferingVO serviceOffering = mock(ServiceOfferingVO.class); DiskOfferingVO rootDiskOffering = mock(DiskOfferingVO.class); DiskOfferingVO dataDiskOffering = mock(DiskOfferingVO.class); + when(dataDiskOffering.getName()).thenReturn("DataOffering"); when(serviceOffering.getDiskOfferingId()).thenReturn(21L); when(primaryDataStoreDao.findById(poolId)).thenReturn(selectedPool); diff --git a/utils/src/main/java/com/cloud/utils/StringUtils.java b/utils/src/main/java/com/cloud/utils/StringUtils.java index 73b8d04bf00..40f9369aa0a 100644 --- a/utils/src/main/java/com/cloud/utils/StringUtils.java +++ b/utils/src/main/java/com/cloud/utils/StringUtils.java @@ -438,4 +438,11 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { return null; } + + public static String toNullSafeString(String str) { + if (str == null) { + return "null"; + } + return str; + } } diff --git a/utils/src/main/java/com/cloud/utils/exception/CloudRuntimeException.java b/utils/src/main/java/com/cloud/utils/exception/CloudRuntimeException.java index bbd23240bd2..f8a5b7f1982 100644 --- a/utils/src/main/java/com/cloud/utils/exception/CloudRuntimeException.java +++ b/utils/src/main/java/com/cloud/utils/exception/CloudRuntimeException.java @@ -28,7 +28,6 @@ import java.util.Map; import com.cloud.utils.Pair; import com.cloud.utils.SerialVersionUID; -import com.cloud.utils.Ternary; /** * wrap exceptions that you know there's no point in dealing with. @@ -57,27 +56,6 @@ public class CloudRuntimeException extends RuntimeException implements ErrorCont setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName())); } - public CloudRuntimeException(String message, String messageKey, Map metadata) { - super(message); - this.messageKey = messageKey; - this.metadata = metadata; - setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName())); - } - - public CloudRuntimeException(Ternary> messageKeyAndMetadata) { - super(messageKeyAndMetadata.first()); - this.messageKey = messageKeyAndMetadata.second(); - this.metadata = messageKeyAndMetadata.third(); - setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName())); - } - - public CloudRuntimeException(Ternary> messageKeyAndMetadata, Throwable th) { - super(messageKeyAndMetadata.first(), th); - this.messageKey = messageKeyAndMetadata.second(); - this.metadata = messageKeyAndMetadata.third(); - setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName())); - } - protected CloudRuntimeException() { super(); @@ -117,6 +95,11 @@ public class CloudRuntimeException extends RuntimeException implements ErrorCont public CloudRuntimeException(Throwable t) { super(t.getMessage(), t); + if (t instanceof CloudRuntimeException) { + CloudRuntimeException cre = (CloudRuntimeException)t; + setMessageKey(cre.getMessageKey()); + setMetadata(cre.getMetadata()); + } } @Override @@ -169,7 +152,15 @@ public class CloudRuntimeException extends RuntimeException implements ErrorCont return messageKey; } + public void setMessageKey(String messageKey) { + this.messageKey = messageKey; + } + public Map getMetadata() { return metadata; } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } }