weizhouapache commented on code in PR #10586:
URL: https://github.com/apache/cloudstack/pull/10586#discussion_r2002824623


##########
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java:
##########
@@ -2715,8 +2715,12 @@ private boolean powerOnVM(final VirtualMachineMO vmMo, 
final String vmInternalCS
                 return vmMo.powerOn();
             } catch (Exception e) {
                 logger.info(String.format("Got exception while power on VM %s 
with hostname %s", vmInternalCSName, vmNameOnVcenter), e);
-                if (e.getMessage() != null && e.getMessage().contains("File 
system specific implementation of Ioctl[file] failed")) {
+                if (e.getMessage() != null &&
+                        (e.getMessage().contains("File system specific 
implementation of Ioctl[file] failed") ||
+                                e.getMessage().contains("Unable to access 
file") ||
+                                e.getMessage().contains("it is locked"))) {
                     logger.debug(String.format("Failed to power on VM %s with 
hostname %s. Retrying", vmInternalCSName, vmNameOnVcenter));
+                    Thread.sleep(1000);

Review Comment:
   would it be better to surround line 2723 by try-catch ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to