VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
1 2 Previous Next 27 Replies Last post: Feb 27, 2009 10:24 AM by Dave.Mishchen…   Go to original post

Re: vmware-cmd.pl not case sensitive

15. Feb 25, 2009 3:58 PM in response to: JasonBurrell
Click to view sdelmas's profile Novice 7 posts since
Jan 23, 2006

I believe my problem was probably different than yours... (sorry for cluttering the thread). I traced this down to this scenario/issue:

I am using the vmware-cmd.pl remote access feature. When I issue the command on the local ESX server the getstate works just fine. If I do it remotely it fails with the aforementioned error. What it comes down to is this code in vmware-cmd.pl (well... actually the functions that are being called):

my $vm_cfg_path = generate_cfg_path($cmdarray[0]);
my $vm_view;
if (defined $vm_cfg_path) {
$vm_view = get_vm($vm_cfg_path);
}

As the function name suggests, generate_cfg_path generates the path to the configuration. In the remote case, the get_vm call does not actually append the actual configuration file name (the one with the .vmx). I haven't looked into why that happens, but the function returns just the original path and then things fail. If I pass in the already resloved name as "Volume VM/12345/vmwconfig.vmx" then things work fine.

Looks like a name lookup issue in vm_view, and a lack of testing this tool in remote mode. Another workaround would be to take the tail of the original cmdarray[0] (after the last /) and append that to $vm_view if it is identical to $vm_cfg_path.

Thanks,

Sven

Re: vmware-cmd.pl not case sensitive

16. Feb 25, 2009 4:06 PM in response to: sdelmas
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
I assume you're passing in the fullpath to the .vmx to the command in either of these formats:

/vmfs/volumes/somedatastorename/my_vm.vmx

or

[somedatastorename] my_vm/my_vm.vmx

If that's the case, then it "should" function like version on the Service Console


=========================================================================
--William
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

Re: vmware-cmd.pl not case sensitive

17. Feb 25, 2009 4:11 PM in response to: lamw
Click to view sdelmas's profile Novice 7 posts since
Jan 23, 2006

Yes... I am passing the exact path in that is returned by vmware-cmd.pl. The exact same command works fine on the local esx server. In my case that would be the absolute file system path. One thing that may confuse thinks for vmware-cmd.pl (not sure... I haven't looked into the underlying code), is that the server is linux, while the client is windows. Nevertheless... using the already resolved name as "Volume blah/blah.vmx" works fine remotely, so something with the finding of the vmx file seems to be messed up.

If you want me to run any debugging code I am happy to do that...

Thanks,
Sven

Re: vmware-cmd.pl not case sensitive

18. Feb 25, 2009 4:16 PM in response to: sdelmas
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
I'm using VMware VIMA and the RCLI and it works fine:

[vi-admin@vima-primp-industries ~]$ vmware-cmd.pl /vmfs/volumes/48c3a8cb-92b015b9-de33-003048670886/VIMA/VIMA.vmx getstate --server himalaya.primp-industries.com
Enter username: root
Enter password:
getstate() = on[vi-admin@vima-primp-industries ~]$


Are you using the latest RCLI, on Windows or Linux? I would highly recommend VIMA to manage your hosts and automate scripted tasks/queries

=========================================================================
--William
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

Re: vmware-cmd.pl not case sensitive

19. Feb 25, 2009 4:46 PM in response to: lamw
Click to view sdelmas's profile Novice 7 posts since
Jan 23, 2006

I am using VMWareVIRemoteCLI on Windows... I take it VIMA is your appliance VM? Can't use that because I need to collect that info on a machine that also has other infrastructure information available. Or is there a different set of CLI tools? If yes, please send me the link for the download.

Thanks,

Sven

Re: vmware-cmd.pl not case sensitive

20. Feb 25, 2009 5:50 PM in response to: sdelmas
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
VMware VIMA is a vApp (virtual appliance) by VMware, it's an alternative to the Service Console most of us are used to and eventually will replace the Service Console and remove the management console into a VM. This is primarily useful in when managing and automating tasks on ESXi which does not have a supported console.

VIMA basically provides the default RCLI utilities along with VI Perl Toolkit and some neat features such as VI-Fastpass and vilogger which only comes with VMware VIMA.

For some high level information you can check out: http://engineering.ucsb.edu/~duonglt/vmware/#vmware_vima

It's a great tool and free download to help manage your ESX/ESXi host and virtual machines.

=========================================================================
--William
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

Re: vmware-cmd.pl not case sensitive

21. Feb 26, 2009 7:54 AM in response to: lamw
Click to view sdelmas's profile Novice 7 posts since
Jan 23, 2006

Yeah... that's what I thought. As mentioned before... I need to run my stuff on a machine that has additional services running that is proprietary.

I suspect though that if the remote cli is the same on your vapp, that it would fail the same as my remote cli. My suspicion is that there is either a configuration issue or some other incompatibility. Do you want me to run some debug code to see why cmware-cmd.pl fails in my environment?

Thanks,

Sven

Re: vmware-cmd.pl not case sensitive

22. Feb 26, 2009 8:39 AM in response to: sdelmas
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
Just make sure you're running the latest VI Perl Toolkit which is 1.6 which is the same version that's installed by default on the VIMA.

=========================================================================
--William
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

Re: vmware-cmd.pl not case sensitive

23. Feb 26, 2009 10:44 AM in response to: lamw
Click to view sdelmas's profile Novice 7 posts since
Jan 23, 2006
I donwloaded the rcli 2 days ago... so I am pretty sure it's current.

Re: vmware-cmd.pl not case sensitive

24. Feb 26, 2009 8:42 PM in response to: sdelmas
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
Are you using the RCLI for Windows or for Linux? The command itself should work on RCLI for Linux and I've demonstrated on VIMA as well. It could be a bug or known issue if you're running it on Windows. You can always open an SR to VMware to see if that is the case

=========================================================================
--William
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

Re: vmware-cmd.pl not case sensitive

25. Feb 27, 2009 10:02 AM in response to: lamw
Click to view sdelmas's profile Novice 7 posts since
Jan 23, 2006

Yes... the client is a Windows machine. I also noticed that there is no resxtop installed... is that intentional?

Thanks,
Sven

Re: vmware-cmd.pl not case sensitive

26. Feb 27, 2009 10:22 AM in response to: sdelmas
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
You can try to either post in the VI API forum, there are some engineers that might be able to help or you can create an SR w/VMware if you have a support contract.

In terms of rsxtop .. I don't recall if this is installed by default with RCLI, I know it's available in VIMA and that's what I use for management so I'm not 100% sure, you can probably check the release notes if this is part of the RCLI or part of VIMA only.


=========================================================================
--William
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

Re: vmware-cmd.pl not case sensitive

27. Feb 27, 2009 10:24 AM in response to: lamw
Click to view Dave.Mishchenko's profile Guru 8,943 posts since
Nov 15, 2005
It's in the Linux RCLI install / appliance but not in the Windows install.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities