# Getting error while deploying VM in vcenter

**URL:** <https://forum.opennebula.io/t/getting-error-while-deploying-vm-in-vcenter/4365>\
**Category:** Product Support\
**Created:** [May 30, 2017, 9:23pm UTC](https://forum.opennebula.io/t/getting-error-while-deploying-vm-in-vcenter/4365 "2017-05-30T21:23:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amit\_Kumar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/amit_kumar/32/7867_2.png) [@Amit\_Kumar](https://forum.opennebula.io/u/Amit_Kumar)\
**Post date:** [May 30, 2017, 9:23pm UTC](https://forum.opennebula.io/t/getting-error-while-deploying-vm-in-vcenter/4365/1 "2017-05-30T21:23:44Z")

</div>

Tue May 30 17:14:05 2017 [Z0][VM][I]: New state is ACTIVE  
Tue May 30 17:14:05 2017 [Z0][VM][I]: New LCM state is PROLOG  
Tue May 30 17:14:05 2017 [Z0][VM][I]: New LCM state is BOOT  
Tue May 30 17:14:05 2017 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/40/deployment.0  
Tue May 30 17:14:05 2017 [Z0][VMM][I]: Successfully execute network driver operation: pre.  
Tue May 30 17:14:06 2017 [Z0][VMM][I]: Command execution fail: /var/lib/one/remotes/vmm/vcenter/deploy ‘/var/lib/one/vms/40/deployment.0’ ‘VMcluster’ 40 VMcluster  
Tue May 30 17:14:06 2017 [Z0][VMM][I]: /usr/lib/one/ruby/vendors/rbvmomi/lib/rbvmomi/type\_loader.rb:66: warning: already initialized constant RbVmomi::VIM::Datastore  
Tue May 30 17:14:06 2017 [Z0][VMM][I]: /usr/lib/one/ruby/vcenter\_driver.rb:50: warning: previous definition of Datastore was here  
Tue May 30 17:14:06 2017 [Z0][VMM][I]: Deploy of VM 40 on host VMcluster with /var/lib/one/vms/40/deployment.0 failed due to "Cannot clone VM Template: undefined method `parent’ for nil:NilClass"  
Tue May 30 17:14:06 2017 [Z0][VMM][I]: ExitCode: 255  
Tue May 30 17:14:06 2017 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.  
Tue May 30 17:14:06 2017 [Z0][VMM][E]: Error deploying virtual machine  
Tue May 30 17:14:06 2017 [Z0][VM][I]: New LCM state is BOOT\_FAILURE

---

<div class="post-metadata">

**Author:** ![mcabrerizo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mcabrerizo/32/4829_2.png) [@mcabrerizo](https://forum.opennebula.io/u/mcabrerizo)\
**Post date:** [May 31, 2017, 5:02pm UTC](https://forum.opennebula.io/t/getting-error-while-deploying-vm-in-vcenter/4365/2 "2017-05-31T17:02:17Z")

</div>

Hi Amit!  
following the code, the possible reason for that error is that OpenNebula can’t find the template in vCenter. Could you answer the following questions so we have more info about this issue?

What OpenNebula version are you using?

Have you created your own OpenNebula template or have you imported a vCenter template using the import tool (either Sunstone or the onevcenter tool) [as explained here](http://docs.opennebula.org/5.2/deployment/vmware_infrastructure_setup/vcenter_driver.html#importing-vcenter-vm-templates-and-running-vms)?

Can you check if the template has the attributes VM\_TEMPLATE or the VCENTER\_REF inside the PUBLIC\_CLOUD section? Could you post a screenshot of the output of the following commands?:

- `onetemplate show TEMPLATE_ID -x` where TEMPLATE\_ID is the ID of your template in OpenNebula
- `onevm show 40 -x`

Cheers!
