Avatar of w00tix
w00tix
 asked on

Can't add VMs to Vsphere from NFS share

After losing power the night before last we have been having problems with our ESXi server.  Most have been resolved, but our biggest issue is that the VMs that are stored on an NFS share will not start.  The share is connected in VSphere and we can brows the folders that they are contained in but the .vmx files display a generic icon and the option to add them to inventory is grayed out.  No settings have changed so I don't know where to look to sort this out.
VMwareActive Directory

Avatar of undefined
Last Comment
ianmellor

8/22/2022 - Mon
ianmellor

Hi,

Can you register the vm via the RCLI?

vmregister.pl  --operation <register/unregister> [options]

Cheers,
w00tix

ASKER
Nope.  "vmregister.pl not found"
ianmellor

Hi,

Can you look here and see if you can see the script

C:\Program Files (x86)\VMware\VMware vSphere CLI\Perl\samples\vm

Thanks,
Your help has saved me hundreds of hours of internet surfing.
fblack61
w00tix

ASKER
Thank you for the quick replies.  Inside of C:\Program Files\VMware the only folder is "Infrastructure".  Seems like I'm missing out on some potentially important things.
ianmellor

Hi,

No problem, you need to install VMware vSphere CLI, below is the link to the download. Once you have installed this you can then use it to manage your ESXi hosts.

http://www.vmware.com/support/developer/vcli/

Cheers,
w00tix

ASKER
I've got it installed now and I can run the script, but the "--operation" option isn't available and "--help" doesn't seem to contain anything that looks similar.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ianmellor

Hi,

Try vmregister.pl --register <path to vmx>
http://www.vmware.com/support/developer/viperltoolkit/viperl15/doc/vmregister.html

Above is the link to the vmware doc.

Cheers,
w00tix

ASKER
I used the command and formatting from the bottom of that article and get the error "unknown option: operation".
ianmellor

Hi,

Right, I have just run this script against a dev system and it is working.

.\vmregister.pl --server <server ip> --vmxpath "[<path to vmx] VM\VM.vmx"

it will ask for username and password.

Cheers,
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Paul Solovyovsky

Browse the NFS share and ensure that you can add and delete a folder. Ensure that it's not in read only mode which will cause the VMs not to start up
w00tix

ASKER
The share is writable.  I was able to create a new VM in VSphere but couldn't start it or anything.  I tested to be sure though.

I am still trying out that command that ianmellor posted but can't seem to get the file path right for the .vmx file I want to load.  I should have it worked out soon though.
w00tix

ASKER
I finally got the command to work (first try of the new day!), but now I get the message "Filtering is only supported for simple types"
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
ianmellor

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.