This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new f360f7048da vmware: do not tear down vm disks if deploy-as-is vm has
vm snapshots (#9243)
f360f7048da is described below
commit f360f7048da13e9e3784c9b621342be4fe70e4cc
Author: Wei Zhou <[email protected]>
AuthorDate: Tue Jun 18 08:28:20 2024 +0200
vmware: do not tear down vm disks if deploy-as-is vm has vm snapshots
(#9243)
---
.../main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
b/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 1b7a76e26cf..830f4e7a25b 100644
---
a/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++
b/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -2203,7 +2203,7 @@ public class VmwareResource extends ServerResourceBase
implements StoragePoolRes
throw new Exception("Failed to find the newly create or
relocated VM. vmName: " + vmInternalCSName);
}
}
- if (deployAsIs) {
+ if (deployAsIs && !vmMo.hasSnapshot()) {
s_logger.info("Mapping VM disks to spec disks and tearing down
datadisks (if any)");
mapSpecDisksToClonedDisksAndTearDownDatadisks(vmMo,
vmInternalCSName, specDisks);
}