vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.26k stars 896 forks source link

[BUG] govc 0.37.3 datastore.create cannot add nfs41 storage #3471

Open redhat-demo opened 2 weeks ago

redhat-demo commented 2 weeks ago

Describe the bug hello I want to use govc datastore.create to add a nfs v4.1 datastore into a vcenter cluster I have confirm that storage is worked because i use vcenter web console to add successfully

To Reproduce Steps to reproduce the behavior:

My NFS Server is 192.168.12.11 My NFS Path is /data/nfs/vsphere My ESXi Host is 192.168.12.21

the full command line as following:

govc datastore.create \ -type NFS41 \ -name datastore-nfs \ -remote-host 192.168.12.11 \ -remote-path /data/nfs/vsphere \ 192.168.12.21

but this command line get a error: govc: /Datacenter-1/host/Cluster-1/192.168.12.21: ServerFaultCode: A specified parameter was not correct:

there are some cluster information as following

govc ls /Datacenter-1/host/Cluster-1 /Datacenter-1/host/Cluster-1/Resources /Datacenter-1/host/Cluster-1/VM Network /Datacenter-1/host/Cluster-1/192.168.12.22 /Datacenter-1/host/Cluster-1/192.168.12.21

Expected behavior Add a NFS v4 datastore into vCenter Cluster and ESXi hosts

Affected version govc version govc 0.37.3

I have also tried govc 0.37.2, the issue was same

github-actions[bot] commented 2 weeks ago

Howdy 🖐   redhat-demo ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

dougm commented 9 hours ago

The command hasn't been changed in 4+ years, I'm not able to reproduce. Are you able to add it from GUI? Can you add the -trace flag and check the output for more details. You can also check ESX host logs govc logs -host 192.168.12.21