VMware Cloud Community
vmkarthik
Enthusiast
Enthusiast

Establish a permanent session

HI,

Am new to the CLI, so need your help.

Is there anyway we can create a permanent session to vcenter or to host??

Like we do a ssh?? because everytime i connect to the vcenter server using "passthroughauth" the connection end soon after i run the command....

Even if am using the session file also, it requires to be called everytime to run any command....

Need your Help ...

Regards,

Karthik

0 Kudos
1 Reply
lamw
Community Manager
Community Manager

That is an expected behavior of the default vCLI scripts, you login, perform some operations, perhaps get some output and it logs out.

If you need to maintain a session to do bulk updates, then you would need to create a customized script that basically login and does operation X,Y,Z before logging out, else any of the scripts you run, is generally done on a per host basis unless you login to vCenter and perform bulk operations against X number of ESX(i) hosts.

If you could further elaborate what you're trying to accomplish, it might help us give guide you. In general, if you're performing operations against hosts themsevles, the best way is to write a quick for loop and execute vCLI scripts and pass in either .viperlconfig or specify the credentials to be passed in.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos