Solved

Can't add VMs to Vsphere from NFS share

Posted on 2011-03-04
13
953 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:w00tix
  • 6
  • 6
13 Comments
 
LVL 5

Expert Comment

by:ianmellor
ID: 35037837
Hi,

Can you register the vm via the RCLI?

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

Cheers,
0
 

Author Comment

by:w00tix
ID: 35037928
Nope.  "vmregister.pl not found"
0
 
LVL 5

Expert Comment

by:ianmellor
ID: 35037974
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,
0
 

Author Comment

by:w00tix
ID: 35038008
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.
0
 
LVL 5

Expert Comment

by:ianmellor
ID: 35038034
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,
0
 

Author Comment

by:w00tix
ID: 35038255
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.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 5

Expert Comment

by:ianmellor
ID: 35038424
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,
0
 

Author Comment

by:w00tix
ID: 35038703
I used the command and formatting from the bottom of that article and get the error "unknown option: operation".
0
 
LVL 5

Expert Comment

by:ianmellor
ID: 35040111
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,
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 35040461
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
0
 

Author Comment

by:w00tix
ID: 35040481
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.
0
 

Author Comment

by:w00tix
ID: 35056603
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"
0
 
LVL 5

Accepted Solution

by:
ianmellor earned 500 total points
ID: 35067964
Hi,

Please make a backup/copy of the vmregister.pl script. Then open the script and edit it. If you search for a line

filter => \%folder_filter

It will be below the following line

my $folder_view = Vim::find_entity_view(view_type => 'Folder',

Just put a # at the start of the line to comment out the line. Then run the script again.

Hope this helps.

Cheers,
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now