I can't seem to get this to work. I've tried using 'vmware-cmd -s register' and 'vmregister.pl' and ran into troubles with each.
The problem seems to be that the commands require a 'resource pool' parameter but I do not know the default name of an ESXi resource pool if I haven't created any on the host. I've tried using the host's FQDN and the datastore name for this parameter, both unsuccessfully.
Can somebody provide an example command that would accomplish this task? Thanks.
Just clearing out a few doubt. have you tried giving the path of the vmx file correctly. For example, if my VM winxp's vmx file is in /vmfs/volumes/storage1, then i would give the command,
vmware-cmd -s register --server <serverip> --username <root> /vmfs/volumes/storage1/winxp.vmx and ENTER
the output is likely to be VM register =1
When I execute that exact command (using my own vmx of course) I get the following message:
Must specify resource pool
I haven't created any specific resource pools on the ESXi host, and I don't know what the default resource pool is called.
The exact command which gives the above error is:
vmware-cmd --server [my server ip] --username [my user name] -s register [main]/Igor/Igor.vmx
I found out what the default resource pool is called: Resources. So now if I execute:
vmware-cmd --server [my server ip] --username [my user name] -s register [main]/Igor/Igor.vmx ha-datacenter Resources
It registers! However, I cannot unregister it like so:
vmware-cmd --server [my server ip] --username [my user name] -s unregister [main]/Igor/Igor.vmx
I get the following output:
No virtual machine found
How can it not be found? I just registered it!!