MartinAmaro
Expert
Expert

vSphere 4.1 How to start management agents via powercli

Jump to solution

Hello I created powershell script to "Enable Remote Tec Support (SSH)" adn set the policy to Automatic

If I pipe the start-vmhostservice then I get a warning on vcenter client\host\sumary tab "Configuration issues Remote Tec Support Mode (SSH) for the host HostName has been enable" the way to remove the message is to restart the managment agents .. so I would like to add that step as part of the script.

Can you point me towards the right direction?

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful.
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

You probably did a

/sbin/services.sh restart

on the Tech SUpport console ?

That makes indeed the warning go away.

But with the Restart-VMHostService cmdlet you can only use the following services:

Key                  Label                          Policy     Running  Required
---                  -----                          ------     -------  --------
DCUI                 Direct Console UI              on         True     False
TSM                  Local Tech Support             off        False    False
TSM-SSH              Remote Tech Support (SSH)      automatic  True     False
lbtd                 lbtd                           on         True     False
lsassd               Local Security Authenticati... off        False    False
lwiod                I/O Redirector (Active Dire... off        True     False
netlogond            Network Login Server (Activ... off        True     False
ntpd                 NTP Daemon                     automatic  True     False
vmware-vpxa          VMware vCenter Agent           on         True     False

while the services.sh script restarts the following services

/etc/init.d/ntpd
/etc/init.d/DCUI
/etc/init.d/TSM-SSH
/etc/init.d/storageRM
/etc/init.d/vprobed
/etc/init.d/sensord
/etc/init.d/hostd
/etc/init.d/lbtd
/etc/init.d/slpd
/etc/opt/init.d/vmware-vpxa
/etc/init.d/usbarbitrator
/etc/init.d/sfcbd
/etc/init.d/sfcbd-watchdog

And I'm afraid it's one of the services you can't manipulate from PowerCLI that does the trick.

Note that this difference is not a PowerCLI problem since the underlying HostServiceSystem also has this limitation.

____________

Blog: LucD notes

Twitter: lucd22


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
4 Replies
LucD
Leadership
Leadership

Are you sure you can remove the Configuration issue messages permanently like that ?

Afaik this message comes back as long as you have the TSM-SSH service running.

____________

Blog: LucD notes

Twitter: lucd22


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
MartinAmaro
Expert
Expert

Yes, you are correct if you start the service the message will appear.

However; if you restart the management agents it goes away and the service stays running.

Is there no way to start the management agents via powercli?

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful.
0 Kudos
LucD
Leadership
Leadership

You probably did a

/sbin/services.sh restart

on the Tech SUpport console ?

That makes indeed the warning go away.

But with the Restart-VMHostService cmdlet you can only use the following services:

Key                  Label                          Policy     Running  Required
---                  -----                          ------     -------  --------
DCUI                 Direct Console UI              on         True     False
TSM                  Local Tech Support             off        False    False
TSM-SSH              Remote Tech Support (SSH)      automatic  True     False
lbtd                 lbtd                           on         True     False
lsassd               Local Security Authenticati... off        False    False
lwiod                I/O Redirector (Active Dire... off        True     False
netlogond            Network Login Server (Activ... off        True     False
ntpd                 NTP Daemon                     automatic  True     False
vmware-vpxa          VMware vCenter Agent           on         True     False

while the services.sh script restarts the following services

/etc/init.d/ntpd
/etc/init.d/DCUI
/etc/init.d/TSM-SSH
/etc/init.d/storageRM
/etc/init.d/vprobed
/etc/init.d/sensord
/etc/init.d/hostd
/etc/init.d/lbtd
/etc/init.d/slpd
/etc/opt/init.d/vmware-vpxa
/etc/init.d/usbarbitrator
/etc/init.d/sfcbd
/etc/init.d/sfcbd-watchdog

And I'm afraid it's one of the services you can't manipulate from PowerCLI that does the trick.

Note that this difference is not a PowerCLI problem since the underlying HostServiceSystem also has this limitation.

____________

Blog: LucD notes

Twitter: lucd22


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
alonchap
Contributor
Contributor

Hi,

if you want to remove the warning, you can do it with the simple command using SSH to the ESX:

/etc/init.d/hostd restart

For a short period (30 seconds) you will see the ESX machine is not responding on the Virtual Center (if you are using one),

and that the virtual machines are disconnected.

After that, the ESX will be back to the Virtual Center and the warnings are removed.

Alon

0 Kudos