You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm at the beginning of understanding govc and it looks like a valid alternative to powercli. I'm able to login with AD credentials to my vCenter with something like "GOVC_PASSWORD=$pw govc session.login" in my govc login shell script. After that I'm not asked for credentials anymore, even after logout of the linux I created the session. I know I can use session.logout to make sure session is terminated.
My issue is the other way around. My main used case would be to use govc in a script as alternative to powercli for scheduled tasks like shutting down all VMs/hosts at a location at date xyz. Needless to say that I don't want to put a password in any file for that.
Even with extraordinary efforts in googling I did not find many examples for this use case (0 to be precise). What is the best approach for this? I see some general examples in https://github.com/vmware/govmomi/blob/main/govc/USAGE.md for session.login but I think I'm missing the context or understanding. What is the lifetime of such a session, why would I need to clone a ticket?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm at the beginning of understanding govc and it looks like a valid alternative to powercli. I'm able to login with AD credentials to my vCenter with something like "GOVC_PASSWORD=$pw govc session.login" in my govc login shell script. After that I'm not asked for credentials anymore, even after logout of the linux I created the session. I know I can use session.logout to make sure session is terminated.
My issue is the other way around. My main used case would be to use govc in a script as alternative to powercli for scheduled tasks like shutting down all VMs/hosts at a location at date xyz. Needless to say that I don't want to put a password in any file for that.
Even with extraordinary efforts in googling I did not find many examples for this use case (0 to be precise). What is the best approach for this? I see some general examples in https://github.com/vmware/govmomi/blob/main/govc/USAGE.md for session.login but I think I'm missing the context or understanding. What is the lifetime of such a session, why would I need to clone a ticket?
Beta Was this translation helpful? Give feedback.
All reactions