Thanks, Walter. I am going to check on this. I too had established a
specific service account with all of the necessary rights for vSphere
provisioning. It's quite possible
something was missed regarding the datastore holding the content library.
I did find this issue too which indicates the Python pyvmomi library may
not have support for the Content Library.
https://github.com/ansible/ansible/issues/37007
I hope it is a creds issue though.
On Friday, November 25, 2022 at 4:37:10 AM UTC-7 [email protected] wrote:
> This sounds like a datastore permissions issue within VMware related to
> the user ID you are using with the module. When we build our server
> provisioning workflow we had to create a special user ID for provisioning
> and grant it specific rights with VMware so it could do the things needed
> on the proper datastores, create VMs, manage networks, etc.
>
> Walter
> --
> Walter Rowe, Division Chief
> Infrastructure Services, OISM
> Mobile: 202.355.4123 <(202)%20355-4123>
>
> On Nov 23, 2022, at 2:55 PM, Christopher Bachmeyer <[email protected]>
> wrote:
>
> Did you find a resolution to this by chance?
>
> I just ran into the issue when I changed datastores. I was using a
> general datastore holding templates but the goal was to use the same
> datastore of the Content library and use those templates.
>
> "msg": "Failed to create a virtual machine : Unable to access the virtual
> machine configuration: Unable to access file [<datastore_name>]
> W2K19_STD/W2K19_STD.vmtx"}
>
> Thanks.
>
> On Tuesday, February 8, 2022 at 9:04:58 AM UTC-7 [email protected] wrote:
>
>> Forgot to mention I have a issue opened here: vmware_guest error:
>> Unable to access the virtual machine configuration: Unable to access file ·
>> Issue #1201 · ansible-collections/community.vmware · GitHub
>> <https://github.com/ansible-collections/community.vmware/issues/1201>
>>
>> On Tuesday, February 8, 2022 at 9:03:52 AM UTC-7 Jason B wrote:
>>
>>> SUMMARY
>>>
>>> When attempting to provision a new vmware VM using the vmware_guest
>>> module to VSAN storage, I am getting the following error:
>>>
>>> ```msg": "Failed to create a virtual machine : Unable to access the
>>> virtual machine configuration: Unable to access file
>>> [some_other_non_vsan_storage_cluster_not_connected_to_ESXI_Cluster]
>>> Linux_Base_Template/Linux_Base_Template.vmtx".```
>>>
>>> Same problem documented in: Ansible Issue: 28649 --- I have attempted
>>> the fix that is documented there by added a disk section ( see above ) with
>>> the datastore variable ( we have many datastores ). The templates live on a
>>> separate storage system NOT connected to ESXi Clusters that are configured
>>> for VSAN. * This works perfectly by manually cloning via vCenter to the
>>> target ESXi Cluster. * This works perfectly if I am provisioning to ESXi
>>> clusters that have the
>>> "[some_other_non_vsan_storage_cluster_not_connected_to_ESXI_Cluster] "
>>> connected to it. * This works perfectly by executing vmware powercli NEW-VM
>>> command here is the code for that:
>>> https://thesleepyadmins.com/2018/09/08/deploy-multiple-vms-using-powercli-and-vmware-template
>>>
>>> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fthesleepyadmins.com%2F2018%2F09%2F08%2Fdeploy-multiple-vms-using-powercli-and-vmware-template&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cf12d7d3e8d73488141a408dacd8ca2ac%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638048301171081431%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UvNgUZ8Vzed9bCy%2BOePL%2FOkZ78PxzIecBF1KCnl%2BKLU%3D&reserved=0>
>>>
>>> Code:
>>>
>>> ```
>>>
>>> msg": "Failed to create a virtual machine : Unable to access the virtual
>>> machine configuration: Unable to access file
>>> [some_other_non_vsan_storage_cluster_not_connected_to_ESXI_Cluster]
>>> Linux_Base_Template/Linux_Base_Template.vmtx". "invocation": {
>>> "module_args": { "name": "TMPBLDLNXLL0001", "hostname": "vCenterServer",
>>> "username": "XXXXXXXXXX", "password":
>>> "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "annotation": "Test VSAN
>>> provisioning", "template": "Linux-8_Base_Template", "datacenter":
>>> "devnulldc", "folder": "devnulldc/vm/Sandbox", "cluster": "CL-03", "disk":
>>> [ { "size_gb": 50, "type": "thin", "datastore": "['vSAN']",
>>> "autoselect_datastore": null, "controller_number": null, "controller_type":
>>> null, "disk_mode": null, "filename": null, "size": null, "size_kb": null,
>>> "size_mb": null, "size_tb": null, "unit_number": null } ], "hardware": {
>>> "num_cpus": 2, "memory_mb": 4096, "num_cpu_cores_per_socket": 2,
>>> "hotadd_cpu": false, "hotremove_cpu": false, "hotadd_memory": false,
>>> "nested_virt": false, "scsi": "paravirtual", "boot_firmware": null,
>>> "cpu_limit": null, "cpu_reservation": null, "max_connections": null,
>>> "mem_limit": null, "mem_reservation": null, "memory_reservation_lock":
>>> null, "secure_boot": null, "version": null, "virt_based_security": null,
>>> "iommu": null }, "networks": [ { "name": "BlackholeNet", "type": "static",
>>> "ip": "987.65.43.21", "netmask": "255.255.255.0", "gateway": "987.65.43.1",
>>> "device_type": "vmxnet3", "dvswitch_name": "vDSwitch", "start_connected":
>>> true } *** Truncated ***
>>>
>>> ```
>>>
>>> ** Note obviously I have masked a lot of information ( like IP address,
>>> etc ) ***
>>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9c8e7c38-8884-4506-9cf7-977dbaeea812n%40googlegroups.com
>
> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2F9c8e7c38-8884-4506-9cf7-977dbaeea812n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cf12d7d3e8d73488141a408dacd8ca2ac%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638048301171081431%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q6CwhZ%2BpkLWod6d3477gowIOdbgNjj63VFk8epAoYqY%3D&reserved=0>
> .
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/829c9622-d18f-4b23-9122-d6d0b507bd99n%40googlegroups.com.