VMware Cloud Community
zoomprofile
Enthusiast
Enthusiast
Jump to solution

vRA 8.6 cannot deploy linked clone from VM with imageRef

Hi,

I found on other forums and in vmware docs, that if I want to create linked clone from existing snapshot in vRA 8.6, I need to use imageRef attribute in code and specify "vmname/snapshotname" as value.

I have create following code for blueprint but it still fail with error "Cannot find matching image mappings for image: vra-template-a/ready"

From what I read, image mapping must not be use as there is no way how to map snapshots.

Permissions are correct, I have verified by signing in with cloud account credentials directly into vCenter.

 

 

 

formatVersion: 1
inputs:
  FQDN:
    type: string
    title: FQDN
resources:
  Cloud_vSphere_Machine_1:
    type: Cloud.vSphere.Machine
    properties:
      name: '${input.FQDN}'
      awaitIp: false
      cloneStrategy: LINKED
      cpuCount: 1
      totalMemoryMB: 1024
      imageRef: vra-template-a/ready

 

 

and here is screenshot how it looks on VM level

vra_vm_linkedclone.png

 

vra_deploy_error.png

 

Any help please?

 

Reply
0 Kudos
1 Solution

Accepted Solutions
zoomprofile
Enthusiast
Enthusiast
Jump to solution

We have found a problem ourselfs, even VMware support wasn't helpful. So for others who will face similar problem, the root cause were permissions.

VMware assume you will grant full administrator permissions for vCenter Cloud Account. But what in case you want to restrict it just for 1 cluster, 1 host and 1 folder? And that was it. Even all permissions granted for account worked great in vCenter WebUI, we missed that 1 sub-folder of VMs was still accessible by Cloud Account credentials, but host cluster of those VMs not. This thing caused bug where synchronization of all VMs from cloud account into "Virtual machine" secion in Infrastructure tab started to crashing (but vRA was still reporting all green, we found NullPointerException in logs).

Error looks like

 

 

 

Failed to pre process VMs for enumeration, failed with [java.util.concurrent.CompletionException: java.lang.NullPointerException

 

 

 

 

So results:

- If all virtual machines from vCenter are not synced correctly in Infrastructure tab, Virtual Machines section, then imageRef will not work. Source VM specified in imageRef must be in that list, otherwise you will get error in my original question.

- Is there code bug in vRA: definitely. If some data are not accessible it should show error in UI, or skip such data, not crash whole sync without any message

- Is there workaround? Yes, if permissions are really correctly configured (in case you want to restrict cloud account credentials) all should work, but keep in mind if you grant permission on some VM Folder, each host and cluster which host those VMs must accessible too.

View solution in original post

2 Replies
zoomprofile
Enthusiast
Enthusiast
Jump to solution

We have found a problem ourselfs, even VMware support wasn't helpful. So for others who will face similar problem, the root cause were permissions.

VMware assume you will grant full administrator permissions for vCenter Cloud Account. But what in case you want to restrict it just for 1 cluster, 1 host and 1 folder? And that was it. Even all permissions granted for account worked great in vCenter WebUI, we missed that 1 sub-folder of VMs was still accessible by Cloud Account credentials, but host cluster of those VMs not. This thing caused bug where synchronization of all VMs from cloud account into "Virtual machine" secion in Infrastructure tab started to crashing (but vRA was still reporting all green, we found NullPointerException in logs).

Error looks like

 

 

 

Failed to pre process VMs for enumeration, failed with [java.util.concurrent.CompletionException: java.lang.NullPointerException

 

 

 

 

So results:

- If all virtual machines from vCenter are not synced correctly in Infrastructure tab, Virtual Machines section, then imageRef will not work. Source VM specified in imageRef must be in that list, otherwise you will get error in my original question.

- Is there code bug in vRA: definitely. If some data are not accessible it should show error in UI, or skip such data, not crash whole sync without any message

- Is there workaround? Yes, if permissions are really correctly configured (in case you want to restrict cloud account credentials) all should work, but keep in mind if you grant permission on some VM Folder, each host and cluster which host those VMs must accessible too.

Mike_Wilson
Enthusiast
Enthusiast
Jump to solution

I know this is a ways back, but I was able to do it but only if there was only one snapshot in the chain. When I had two snapshots, it couldn't find it for some reason. But when I deleted one and waited for the cleanup, then it was able to see it and use it in vRA. 

Mike Wilson @it_muscle http://it-muscle.com VCAP5-DCA/DCD
Reply
0 Kudos