Heay
I imported a VMware Template via sunstone and i am able to Instantiate as non persistent - everything works as expected.
As soon as i try to Instantiate the VM as Persistent i receive the Error below.
I am even able to start the vm in the vcenter … if i terminate the broken VM there is a template-copy and a copy template in the Vcenter. If i Delete the copy Template (in Opennebula) it will stay in the Vcenter as well as the cloned disk on the VMware Datastore.
Thu Feb 14 13:10:12 2019 [Z0][VM][I]: New state is CLONING
Thu Feb 14 13:14:43 2019 [Z0][VM][I]: New state is PENDING
Thu Feb 14 13:15:08 2019 [Z0][VM][I]: New state is ACTIVE
Thu Feb 14 13:15:08 2019 [Z0][VM][I]: New LCM state is PROLOG
Thu Feb 14 13:15:08 2019 [Z0][VM][I]: New LCM state is BOOT
Thu Feb 14 13:15:08 2019 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/590/deployment.0
Thu Feb 14 13:15:08 2019 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Thu Feb 14 13:15:08 2019 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Thu Feb 14 13:15:24 2019 [Z0][VMM][I]: Command execution failed (exit code: 255): /var/lib/one/remotes/vmm/vcenter/deploy '/var/lib/one/vms/590/deployment.0' 'HA_Metro_Test1' 590 HA_Metro_Test1
Thu Feb 14 13:15:24 2019 [Z0][VMM][E]: deploy: Deploy of VM 590 on vCenter cluster HA_Metro_Test1 with /var/lib/one/vms/590/deployment.0 failed due to "undefined method `empty?' for nil:NilClass".
Thu Feb 14 13:15:24 2019 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Thu Feb 14 13:15:24 2019 [Z0][VMM][E]: Error deploying virtual machine
Thu Feb 14 13:15:24 2019 [Z0][VM][I]: New LCM state is BOOT_FAILURE
cat /var/lib/one/vms/590/deployment.0 | xmllint --format -
<?xml version="1.0"?>
<VM>
<ID>590</ID>
<UID>3</UID>
<GID>0</GID>
<UNAME>me</UNAME>
<GNAME>oneadmin</GNAME>
<NAME>DuIT_centos7_template-copy-590</NAME>
<PERMISSIONS>
<OWNER_U>1</OWNER_U>
<OWNER_M>1</OWNER_M>
<OWNER_A>0</OWNER_A>
<GROUP_U>0</GROUP_U>
<GROUP_M>0</GROUP_M>
<GROUP_A>0</GROUP_A>
<OTHER_U>0</OTHER_U>
<OTHER_M>0</OTHER_M>
<OTHER_A>0</OTHER_A>
</PERMISSIONS>
<LAST_POLL>0</LAST_POLL>
<STATE>3</STATE>
<LCM_STATE>2</LCM_STATE>
<PREV_STATE>3</PREV_STATE>
<PREV_LCM_STATE>2</PREV_LCM_STATE>
<RESCHED>0</RESCHED>
<STIME>1550146212</STIME>
<ETIME>0</ETIME>
<DEPLOY_ID/>
<MONITORING/>
<TEMPLATE>
<AUTOMATIC_DS_REQUIREMENTS><![CDATA[("CLUSTERS/ID" @> 101)]]></AUTOMATIC_DS_REQUIREMENTS>
<AUTOMATIC_REQUIREMENTS><![CDATA[(CLUSTER_ID = 101) & !(PUBLIC_CLOUD = YES)]]></AUTOMATIC_REQUIREMENTS>
<CLONING_TEMPLATE_ID><![CDATA[25]]></CLONING_TEMPLATE_ID>
<CONTEXT>
<DISK_ID><![CDATA[1]]></DISK_ID>
<ETH0_CONTEXT_FORCE_IPV4><![CDATA[]]></ETH0_CONTEXT_FORCE_IPV4>
<ETH0_DNS><![CDATA[]]></ETH0_DNS>
<ETH0_GATEWAY><![CDATA[]]></ETH0_GATEWAY>
<ETH0_GATEWAY6><![CDATA[]]></ETH0_GATEWAY6>
<ETH0_IP><![CDATA[]]></ETH0_IP>
<ETH0_IP6><![CDATA[]]></ETH0_IP6>
<ETH0_IP6_PREFIX_LENGTH><![CDATA[]]></ETH0_IP6_PREFIX_LENGTH>
<ETH0_IP6_ULA><![CDATA[]]></ETH0_IP6_ULA>
<ETH0_MAC><![CDATA[02:00:c0:b0:f6:06]]></ETH0_MAC>
<ETH0_MASK><![CDATA[]]></ETH0_MASK>
<ETH0_MTU><![CDATA[]]></ETH0_MTU>
<ETH0_NETWORK><![CDATA[]]></ETH0_NETWORK>
<ETH0_SEARCH_DOMAIN><![CDATA[]]></ETH0_SEARCH_DOMAIN>
<ETH0_VLAN_ID><![CDATA[]]></ETH0_VLAN_ID>
<ETH0_VROUTER_IP><![CDATA[]]></ETH0_VROUTER_IP>
<ETH0_VROUTER_IP6><![CDATA[]]></ETH0_VROUTER_IP6>
<ETH0_VROUTER_MANAGEMENT><![CDATA[]]></ETH0_VROUTER_MANAGEMENT>
<NETWORK><![CDATA[YES]]></NETWORK>
<SSH_PUBLIC_KEY><![CDATA[ssh-rsa *** ]]></SSH_PUBLIC_KEY>
<TARGET><![CDATA[hda]]></TARGET>
</CONTEXT>
<CPU><![CDATA[2]]></CPU>
<DISK>
<ALLOW_ORPHANS><![CDATA[NO]]></ALLOW_ORPHANS>
<CLONE><![CDATA[NO]]></CLONE>
<CLONE_TARGET><![CDATA[SYSTEM]]></CLONE_TARGET>
<CLUSTER_ID><![CDATA[101]]></CLUSTER_ID>
<DATASTORE><![CDATA[locsdit11084(IMG)]]></DATASTORE>
<DATASTORE_ID><![CDATA[125]]></DATASTORE_ID>
<DEV_PREFIX><![CDATA[sd]]></DEV_PREFIX>
<DISK_ID><![CDATA[0]]></DISK_ID>
<DISK_SNAPSHOT_TOTAL_SIZE><![CDATA[0]]></DISK_SNAPSHOT_TOTAL_SIZE>
<DISK_TYPE><![CDATA[FILE]]></DISK_TYPE>
<IMAGE><![CDATA[DuIT_centos7_template-copy-disk-0]]></IMAGE>
<IMAGE_ID><![CDATA[69]]></IMAGE_ID>
<IMAGE_STATE><![CDATA[10]]></IMAGE_STATE>
<LN_TARGET><![CDATA[NONE]]></LN_TARGET>
<OPENNEBULA_MANAGED><![CDATA[NO]]></OPENNEBULA_MANAGED>
<ORIGINAL_SIZE><![CDATA[30000]]></ORIGINAL_SIZE>
<PERSISTENT><![CDATA[YES]]></PERSISTENT>
<READONLY><![CDATA[NO]]></READONLY>
<SAVE><![CDATA[YES]]></SAVE>
<SIZE><![CDATA[30000]]></SIZE>
<SOURCE><![CDATA[one/69/one-69.vmdk]]></SOURCE>
<TARGET><![CDATA[sda]]></TARGET>
<TM_MAD><![CDATA[vcenter]]></TM_MAD>
<TYPE><![CDATA[FILE]]></TYPE>
<VCENTER_DS_REF><![CDATA[datastore-12]]></VCENTER_DS_REF>
<VCENTER_INSTANCE_ID><![CDATA[51daa2e9-de94-49c5-bb3f-65ed9a9c1f0d]]></VCENTER_INSTANCE_ID>
</DISK>
<GRAPHICS>
<LISTEN><![CDATA[0.0.0.0]]></LISTEN>
<PORT><![CDATA[6490]]></PORT>
<TYPE><![CDATA[vnc]]></TYPE>
</GRAPHICS>
<MEMORY><![CDATA[4096]]></MEMORY>
<NIC>
<AR_ID><![CDATA[0]]></AR_ID>
<BRIDGE><![CDATA[VLAN_DUIT411]]></BRIDGE>
<CLUSTER_ID><![CDATA[101]]></CLUSTER_ID>
<MAC><![CDATA[02:00:c0:b0:f6:06]]></MAC>
<NETWORK><![CDATA[VLAN_DUIT411]]></NETWORK>
<NETWORK_ID><![CDATA[13]]></NETWORK_ID>
<NIC_ID><![CDATA[0]]></NIC_ID>
<OPENNEBULA_MANAGED><![CDATA[NO]]></OPENNEBULA_MANAGED>
<SECURITY_GROUPS><![CDATA[0]]></SECURITY_GROUPS>
<TARGET><![CDATA[one-590-0]]></TARGET>
<VCENTER_INSTANCE_ID><![CDATA[51daa2e9-de94-49c5-bb3f-65ed9a9c1f0d]]></VCENTER_INSTANCE_ID>
<VCENTER_NET_REF><![CDATA[network-41]]></VCENTER_NET_REF>
<VCENTER_PORTGROUP_TYPE><![CDATA[Port Group]]></VCENTER_PORTGROUP_TYPE>
<VN_MAD><![CDATA[vcenter]]></VN_MAD>
</NIC>
<SECURITY_GROUP_RULE>
<PROTOCOL><![CDATA[ALL]]></PROTOCOL>
<RULE_TYPE><![CDATA[OUTBOUND]]></RULE_TYPE>
<SECURITY_GROUP_ID><![CDATA[0]]></SECURITY_GROUP_ID>
<SECURITY_GROUP_NAME><![CDATA[default]]></SECURITY_GROUP_NAME>
</SECURITY_GROUP_RULE>
<SECURITY_GROUP_RULE>
<PROTOCOL><![CDATA[ALL]]></PROTOCOL>
<RULE_TYPE><![CDATA[INBOUND]]></RULE_TYPE>
<SECURITY_GROUP_ID><![CDATA[0]]></SECURITY_GROUP_ID>
<SECURITY_GROUP_NAME><![CDATA[default]]></SECURITY_GROUP_NAME>
</SECURITY_GROUP_RULE>
<TEMPLATE_ID><![CDATA[27]]></TEMPLATE_ID>
<VCPU><![CDATA[2]]></VCPU>
<VMID><![CDATA[590]]></VMID>
</TEMPLATE>
<USER_TEMPLATE>
<DESCRIPTION><![CDATA[vCenter Template imported by OpenNebula from Cluster HA_Metro_Test1]]></DESCRIPTION>
<HYPERVISOR><![CDATA[vcenter]]></HYPERVISOR>
<VCENTER_CCR_REF><![CDATA[domain-c54]]></VCENTER_CCR_REF>
<VCENTER_INSTANCE_ID><![CDATA[51daa2e9-de94-49c5-bb3f-65ed9a9c1f0d]]></VCENTER_INSTANCE_ID>
<VCENTER_TEMPLATE_REF><![CDATA[vm-2733]]></VCENTER_TEMPLATE_REF>
</USER_TEMPLATE>
<HISTORY_RECORDS>
<HISTORY>
<OID>590</OID>
<SEQ>0</SEQ>
<HOSTNAME>HA_Metro_Test1</HOSTNAME>
<HID>7</HID>
<CID>101</CID>
<STIME>1550146508</STIME>
<ETIME>0</ETIME>
<VM_MAD><![CDATA[vcenter]]></VM_MAD>
<TM_MAD><![CDATA[vcenter]]></TM_MAD>
<DS_ID>124</DS_ID>
<PSTIME>1550146508</PSTIME>
<PETIME>1550146508</PETIME>
<RSTIME>1550146508</RSTIME>
<RETIME>0</RETIME>
<ESTIME>0</ESTIME>
<EETIME>0</EETIME>
<ACTION>0</ACTION>
<UID>-1</UID>
<GID>-1</GID>
<REQUEST_ID>-1</REQUEST_ID>
</HISTORY>
</HISTORY_RECORDS>
</VM>