Title: First VM deployment from VMware template fails with VMDK locked; second deployment succeeds · Issue #11997 · apache/cloudstack · GitHub
Open Graph Title: First VM deployment from VMware template fails with VMDK locked; second deployment succeeds · Issue #11997 · apache/cloudstack
X Title: First VM deployment from VMware template fails with VMDK locked; second deployment succeeds · Issue #11997 · apache/cloudstack
Description: problem When deploying a VM from a VMware template, the first VM creation always fails, but the second attempt succeeds. versions CloudStack version: 4.21.0 VMware version: 8.0.3 / 24853646 Primary Storage: VMFS 6 The steps to reproduce ...
Open Graph Description: problem When deploying a VM from a VMware template, the first VM creation always fails, but the second attempt succeeds. versions CloudStack version: 4.21.0 VMware version: 8.0.3 / 24853646 Primary...
X Description: problem When deploying a VM from a VMware template, the first VM creation always fails, but the second attempt succeeds. versions CloudStack version: 4.21.0 VMware version: 8.0.3 / 24853646 Primary...
Opengraph URL: https://github.com/apache/cloudstack/issues/11997
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"First VM deployment from VMware template fails with VMDK locked; second deployment succeeds","articleBody":"### problem\n\n\nWhen deploying a VM from a VMware template, the first VM creation always fails,\nbut the second attempt succeeds. \n\n\n\n\n\n### versions\n\n- CloudStack version: 4.21.0\n- VMware version: 8.0.3 / 24853646\n- Primary Storage: VMFS 6\n\n### The steps to reproduce the bug\n\n1. Create a VMware template and register it in CloudStack.\n2. Deploy a VM using this template.\n3. First deployment fails.\n4. Deploy again using the same template.\n5. Second deployment succeeds.\n\nLogs:\n2025-11-06 08:51:08,334 INFO [o.a.c.s.v.VolumeServiceImpl] (Work-Job-Executor-1:[ctx-cc6702ac, job-34/job-35, ctx-fc2cf834]) (logid:74e2243d) releasing lock for VMTemplateStoragePool 2\n2025-11-06 08:51:08,341 ERROR [o.a.c.e.o.VolumeOrchestrator] (Work-Job-Executor-1:[ctx-cc6702ac, job-34/job-35, ctx-fc2cf834]) (logid:74e2243d) Unable to create volume [{\"name\":\"ROOT-3\",\"uuid\":\"d91479c1-b9dd-4034-b394-26939dad4eff\"}] due to [CopyCommand failed due to [Exception: java.lang.RuntimeException\nMessage: Unable to access file /vmfs/volumes/683fea5e-bc390134-295d-d4f5ef3ec3e8/8d93164511d13929aac98eec33062d49/8d93164511d13929aac98eec33062d49-000001.vmdk since it is locked\n].].\n2025-11-06 08:51:08,344 WARN [c.c.v.ClusteredVirtualMachineManagerImpl] (Work-Job-Executor-1:[ctx-cc6702ac, job-34/job-35, ctx-fc2cf834]) (logid:74e2243d) Unable to contact resource. com.cloud.exception.StorageUnavailableException: Resource [StoragePool:4] is unreachable: Unable to create volume [{\"name\":\"ROOT-3\",\"uuid\":\"d91479c1-b9dd-4034-b394-26939dad4eff\"}] due to [CopyCommand failed due to [Exception: java.lang.RuntimeException\nMessage: Unable to access file /vmfs/volumes/683fea5e-bc390134-295d-d4f5ef3ec3e8/8d93164511d13929aac98eec33062d49/8d93164511d13929aac98eec33062d49-000001.vmdk since it is locked\n].].\n at org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.recreateVolume(VolumeOrchestrator.java:1872)\n at org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.prepare(VolumeOrchestrator.java:2019)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:569)\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)\n at jdk.proxy3/jdk.proxy3.$Proxy257.prepare(Unknown Source)\n at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:1482)\n at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:5827)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:569)\n at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:102)\n at com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5951)\n at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:99)\n at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:689)\n at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)\n at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)\n at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)\n at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)\n at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)\n at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:637)\n at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)\n at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)\n at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\n at java.base/java.lang.Thread.run(Thread.java:840)\n\n2025-11-06 08:51:08,345 DEBUG [c.c.d.D.ExcludeList] (Work-Job-Executor-1:[ctx-cc6702ac, job-34/job-35, ctx-fc2cf834]) (logid:74e2243d) Adding StoragePool [4] to the avoid set due to [Resource [StoragePool:4] is unreachable: Unable to create volume [{\"name\":\"ROOT-3\",\"uuid\":\"d91479c1-b9dd-4034-b394-26939dad4eff\"}] due to [CopyCommand failed due to [Exception: java.lang.RuntimeException\n2025-11-06 08:51:08,345 DEBUG [c.c.d.D.ExcludeList] (Work-Job-Executor-1:[ctx-cc6702ac, job-34/job-35, ctx-fc2cf834]) (logid:74e2243d) Adding StoragePool [4] to the avoid set due to [Resource [StoragePool:4] is unreachable: Unable to create volume [{\"name\":\"ROOT-3\",\"uuid\":\"d91479c1-b9dd-4034-b394-26939dad4eff\"}] due to [CopyCommand failed due to [Exception: java.lang.RuntimeException\nMessage: Unable to access file /vmfs/volumes/683fea5e-bc390134-295d-d4f5ef3ec3e8/8d93164511d13929aac98eec33062d49/8d93164511d13929aac98eec33062d49-000001.vmdk since it is locked\n\n\n### What to do about it?\n\n_No response_","author":{"url":"https://github.com/midhunpjos","@type":"Person","name":"midhunpjos"},"datePublished":"2025-11-06T06:36:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/11997/cloudstack/issues/11997"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6f0fa48d-6513-03ff-d80b-6038e54c2ada |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CABC:DC47A:733B91:9F74AF:6A5078C9 |
| html-safe-nonce | 750eb52f61472fd43bb2dffa5f586afba568c03c7d614cce2ef52d080931a66c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUJDOkRDNDdBOjczM0I5MTo5Rjc0QUY6NkE1MDc4QzkiLCJ2aXNpdG9yX2lkIjoiMTk4MTIyMTAxNjE2OTM4MDA0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 68a3a348aa0ac8b016c11dea022812090a2e3c6accf141bf07974756e7e3c3a4 |
| hovercard-subject-tag | issue:3594332478 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/11997/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9f2451327dacf19b039e56df4011f7726c597e6599178f5012b930885518619e/apache/cloudstack/issues/11997 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9f2451327dacf19b039e56df4011f7726c597e6599178f5012b930885518619e/apache/cloudstack/issues/11997 |
| og:image:alt | problem When deploying a VM from a VMware template, the first VM creation always fails, but the second attempt succeeds. versions CloudStack version: 4.21.0 VMware version: 8.0.3 / 24853646 Primary... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | midhunpjos |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width