VSphere Provider: error processing disk changes post-clone

Hi All,

I am trying to build a VM in vmware vcenter using terraform(V0.12.24). The vspehere provider version is 1.18.1. However getting below error:

Error: error reconfiguring virtual machine: error processing disk changes post-clone: disk.0: ServerFaultCode: NoPermission: RESOURCE (vm-159576:2000), ACTION (queryAssociatedProfile): RESOURCE (vm-159576), ACTION (PolicyIDByVirtualDisk)

The same code works with vpshere provider version 1.15.0. Anything above that fails with same error. What is causing this issue? Any hints or ideas would be much appreciated.

Thanks all in advance.

3 Likes

Hey,
Is there any update on this issue?
I have the same issue with Terraform v0.12.25 and vsphere provider version 1.18.2. I tried downgrading to vsphere v1.15.0 but didnt solve it for me.

Error was “Virtual machine customization failed”

No updates as of now. Still trying to find what is causing this issue. vsphere v1.15 works for me.

Is there any update on this issue? I am facing same issue with vsphere v1.24.0 version
and Terraform v0.13.4

Error: error reconfiguring virtual machine: error processing disk changes post-clone: disk.0: ServerFaultCode: NoPermission: RESOURCE (vm-101923:2000), ACTION (queryAssociatedProfile): RESOURC
E (vm-101923), ACTION (PolicyIDByVirtualDisk)

I am experiencing the same issue. Any update?

Anyone? any update on this?
I have the same issue, please inform us on how to solve this issue or any workaround will be appreciated.

It must be permission related issue. Is your provisioning user administrator?
Please provide more details with your scenario and error codes so we can help you.

For me on vSphere 6.7 U3 it was the privilege StorageProfile.View

Is there an update on the cause of this issue? Getting the same error using terraform version 0.14.10 and VSphere version 6.7.0.46000. Just for clarity this does work with administrator account. I’m looking to have this working with a custom account with the proper roles assigned to that account.

On vcenter, change the role permission and set Storage Views → “View” permission.
Other permissions:

  • Datastore
    • Allocate space
    • Browse datastore
    • Low level file operations
    • Remove file
    • Update virtual machine files
    • Update virtual machine metadata
  • Folder (all)
    • Create folder
    • Delete folder
    • Move folder
    • Rename folder
  • Network
    • Assign network
  • Resource
    • Apply recommendation
    • Assign virtual machine to resource pool
  • Virtual Machine
    • Configuration (all) - for now
    • Guest Operations (all) - for now
    • Interaction (all)
    • Inventory (all)
    • Provisioning (all)

Just incase anyone else is having problems, for versions of vSphere > 7,

At the root object of vCenter, you must enable:
VM storage policies

  • Update VM storage policies
  • View VM storage policies

Prior to version 8, these two fields were found under

Profile-driven Storage

  • Update VM storage policies
  • View VM storage policies