hey all
Can i edit ESXi files from vMA server?
For example: I want to edit the /etc/vmware/config file (for the copy/paste issue 4.1)
How can i do it on several hosts?
thanks
Harel Shavit.
vMA is not meant to edit specific configuration files on the ESX or ESXi directly. It's usecase is to use either the vCLI a set of remote management scripts esxcfg-/vicfg- commands, simliiar to those that exists in the classic ESX Service Console or custom vSphere SDK for Perl scripts to configure and manage your VMwre infrastructure.
Howerver, WRT to this particular configuration and few others, you can access a subset of the configuration files and you can view them by opening a browser and entering the following: http:///host, you will be prompted for your credentials which you should be using root to login. Once authenticated, you'll notice some configuration files, these are the same that reside under /etc/vmware and only subset are available. One interesting one is vmware_config which is actually the same configuration file under /etc/vmware/config and is the same file that needs to be updated to resolve the vSphere 4.1 copy/paste issue as identified by this VMware KB - http://kb.vmware.com/kb/1026437
You can use a vCLI command called vifs which is basically a simple http get/put utility to actually download the configuration file, make the appropriate changes and upload to your ESXi hosts.
Here is the vCLI online documentation - http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/index.html
Here is some examples of using vifs on Dave Mischenko's website - http://www.vm-help.com/esx/esx3i/esx_3i_rcli/vifs.php
This should allow you to make the change once and upload to all your ESXi hosts w/o having to login to the unsupported Busybox (Tech Support Mode)
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware VCP3,4
VMware VCAP4-DCA
VMware scripts and resources at:
Getting Started with the vMA (tips/tricks)
Getting Started with the vSphere SDK for Perl
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
Hi, William
Thanks for your reply,
the command that i used:
vifs --server /host)
thanks allot!
ok finally i got it..
vifs --server /host/vmware_config /home........
any suggestion how to use vifs put on 70 ESXi's??
thanks again!
Write a simple bash for loop to go through all hosts and update their vmware_ config file
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware VCP3,4
VMware VCAP4-DCA
VMware scripts and resources at:
Getting Started with the vMA (tips/tricks)
Getting Started with the vSphere SDK for Perl
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
how can i deal with the username and password situation, for all the ESXi's?
Either use a session file, store the username/password in a configuration file using --config or use vMA's vi-fastpass authentication.
I recommend you take a look at the vMA documentation to get more details on the various methods of connecting to a host - http://www.vmware.com/support/developer/vima/
Here are a few articles that may also be useful:
http://www.virtuallyghetto.com/2010/07/vma-41-authentication-policy-fpauth-vs.html
http://www.virtuallyghetto.com/2010/05/getting-started-with-vma.html
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware VCP3,4
VMware VCAP4-DCA
VMware scripts and resources at:
Getting Started with the vMA (tips/tricks)
Getting Started with the vSphere SDK for Perl
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
hey William,
I used vMA AD integration, and ESXi AD integration and by that i didnt need to use username and password.
just run in all ESXi servers just from server list file or vifp listservers
for i in $(cat /tmp/servers); do
vifptarget -s $i
vifs -p /host/vmware_config /tmp/vmware_config
done
thanks alot william!