knife-vsphere icon indicating copy to clipboard operation
knife-vsphere copied to clipboard

Issue with odd error: RbVmomi::Fault: NotFound (duplicate of #68 )

Open brent-c-mills opened this issue 8 years ago • 3 comments

Issue #68 was closed last July, but the reporter is still experiencing it and I am hitting it as well.

I am hitting this issue as well. When I attempt to build a new VM using a text ESX host with datastore01 build on local storage, there is no issue at all. However, when I move this into one of the production environments, I get:

CannotAccessVmConfig: Unable to access the virtual machine configuration: Unable to access file [datastore-odd-01] RHEL6Template/RHEL6Template.vmtx

In the command string, I define the template using:

--template "RHEL6Template"

Running a "knife vsphere template list", I get:

Template Name: RHEL6Template

brent-c-mills avatar Apr 26 '16 15:04 brent-c-mills

Hi, thanks for reporting this bug and updating #68. Is that datastore-odd-01 accessible from all hosts? Is it possible we're scheduling the clone on a host that can't access the datastore?

swalberg avatar Apr 26 '16 15:04 swalberg

It looks like that's the root of the problem. This datastore is only accessible to a single cluster within the datacenter. It looks like knife-vsphere uses --resource-pool to specify the cluster, which isn't very intuitive. It would be great to break that off into a --cluster flag. It would also be nice to capture this error message and output something telling the user to verify datastore accessibility from a given host / cluster within the specified datacenter.

brent-c-mills avatar Apr 26 '16 19:04 brent-c-mills

Ah, yea, I see what you mean. The API expects a pool which is probably the origin of this oddball naming. I think for now I will update the docs to point out this odd case.

I like the idea of offering better hints when things go wrong, thanks for the suggestion!

swalberg avatar Apr 26 '16 19:04 swalberg