VMware Cloud Community
m1kew1lson
Contributor
Contributor

Need to create users on hosts

I'm new to what orchestrator can do, but can anyone tell me if it is possible to leverage it to create users within the ESX hosts themselves?

0 Kudos
6 Replies
Burke-
VMware Employee
VMware Employee

I'm unsure of what your use-case could be for this scenario, but I suppose you could use the SSH plug-in to SSH into the console of your ESX Host, then execute an appropriate set of commands to add/modify your user accounts. Overall, I wouldn't be too keen on creating additional accounts on a host in the first place.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
admin
Immortal
Immortal

Hi,

You can create a user account in the ESX using the CreateUser API. This is invoked on the ESX which has been configured with the vCO server.

To make things a bit simpler, I have created a sample workflow which adds a user in the host. You can import the attached AddUser.workflow and execute in your vCO. All the input arguments have been defined when you run the workflow.

I hope this helps you. Please also share your observations and let me know in-case you face any issues while running the workflow.

Cheers!

Angela

0 Kudos
tschoergez
Leadership
Leadership

Hi Angela,

the workflow you provided works nice without problems.

But you have to configure the ESX-host as a "server" in the orchestrator configuration.

Is there a way to automate this, or even better, to avoid this?

regards,

joerg

0 Kudos
admin
Immortal
Immortal

Hey Joerg,

CreateUser API is defined on HostLocalAccountManager, which is null for a vCenter Server. This property is only set for an ESX hence one has to configure the ESX with vCO to invoke this API.

Presently, there's no way to automate this. One has to configure the ESX the same way one configures a vCenter Server with vCO.

0 Kudos
tschoergez
Leadership
Leadership

ok, thanks for confirming my thoughts...!

regards,

joerg

0 Kudos
admin
Immortal
Immortal

I think many customers who create accounts use the SSH plugin and go directly to ESX with it. There is a "getAllHostSystems" action you can use to iterate all hosts in a given VC. If you follow that with a command to add user, you should be all set. Probably easier than adding each of your ESX host to vCO.

Thanks,

Sia

0 Kudos