VMware Cloud Community
LuckyT
Contributor
Contributor

Linux VM Payload

Hi All,

Is it possible to do VM payload (Guest OS : Linux) on start up via vcenter orchestrator? I want to do without SSH, coz i may not know the IP address of the newly cloned VM.

Thanks & Regards,

Tejesh

Reply
0 Kudos
14 Replies
Burke-
VMware Employee
VMware Employee

I don't understand what the ask is here....

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
Reply
0 Kudos
LuckyT
Contributor
Contributor

Like passing some data or shell cmd on start up.

Reply
0 Kudos
Burke-
VMware Employee
VMware Employee

Ah, then perhaps some in guest scripts (uses API to access Guest OS so IP does not need to be known):

Guest script manager package

You could connect to the Guest OS, add some files and/or echo some commands into one of the init scripts so that they run automatically upon subsequent boots..

That's the first thing that comes to my mind...

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
Reply
0 Kudos
LuckyT
Contributor
Contributor

Thanks alot.

When i try to run the built-in workflow "Run program in guest" it fails with error message "The guest operations agent could not be contacted. (Workflow:Run program in guest / Scriptable task (item1)#15)", my Linux VM is installed with VMware tools. Kindly suggest.

Reply
0 Kudos
LuckyT
Contributor
Contributor

Hi,

Any help on this?

Reply
0 Kudos
LuckyT
Contributor
Contributor

Is there any guest agent available to install within VM ? can anyone suggest?

Reply
0 Kudos
tschoergez
Leadership
Leadership

There is no other guest agent available except the VMware tools. If they are installed and running (in the version that fits the ESX host), the guest operations are available.

Only works with ESX 5.x, not with 4.x

Reply
0 Kudos
LuckyT
Contributor
Contributor

VM is installed with vmware tools & i'm using ESX 5.1. But everytime i execute workflow it fails with "The guest operations agent could not be contacted. (Workflow:Run program in guest / Scriptable task (item1)#15)"," error. Could you help further?

Reply
0 Kudos
tschoergez
Leadership
Leadership

check that:

- the virtual machine is powered on

- vmware tools are up and running and at the current version inside the vm

- the Guest OS is on the list of supported guest OSes

Reply
0 Kudos
LuckyT
Contributor
Contributor

Thanks, now it is working.

I have a scenario, where i need to change the password for the VM. I'm changing the password through script input parameter. But the issue is, it goes into infinit loop at "wait timer" activity in "Run Script in guest" workflow, coz while starting a VM i gave one password and then through i changed the password. now it cannot proceed further. Any help would be appreciated.

Reply
0 Kudos
tschoergez
Leadership
Leadership

You have to change the password (or do any other task you want) in a complete non-interactive way. Execute a script, that runs without any additional input or "read from stdin", and finishes without interaction no matter what happened.

See here for examples bash - Change linux password in a script, quietly - Stack Overflow

Reply
0 Kudos
LuckyT
Contributor
Contributor

Yes, i'm trying to change like that. but still it is failing with error msg "Failed to authenticate with the guest operating system using the supplied credentials. (Workflow:Get processes from guest / Scriptable task (item1)#8)"

Reply
0 Kudos
tschoergez
Leadership
Leadership

then try to run a simple command (like uptime) first, to ensure that the initial connection works before messing around with the passwords.

Reply
0 Kudos
LuckyT
Contributor
Contributor

I have modified the workflow & passing new password to internal workflows wherever needed.

Now i have another issue while setting password, if i execute the script individually then script is working fine. but when i try to run the same script inside another workflow i.e after guest customization, i run this script to change the password but it fails with "Validation error" it doesn't shows where is error. Attached screenshot.

Kindly suggest the solution.

Reply
0 Kudos