Enrolling template-based virtual machines automatically
Virtual machines that you create and deploy in your environment can be enrolled automatically. You must create these virtual machines from a customized template that contains the RSCD and Smart Agents. The following flow chart explains the auto-enrollment process:
Do the following:
- Create a virtual machine on a virtualization platform, such as vSphere, Solaris, and Hyper-V.
- Install the RSCD agent on the virtual machine and ensure the following while configuring the Smart Agent parameters:
- (Windows)
Leave the Smart Hub host name field blank. For information about configuring this parameter during Agent installation, see Installing-the-RSCD-agent-Windows. - (Linux)
In the nsh-install-defaults file, do not provide a value for the SMARTHUB_HOSTNAME parameter, and then run the agent installer. For information about configuring the nsh-install-defaults file and agent installation, see Configuring-the-installation-parameters-for-the-NSH-or-the-RSCD-agent and Using-RPM-to-install-NSH-or-the-RSCD-agent.
- (Windows)
- Stop the Smart Agent service.
- (Windows)
Open the Windows services, right-click TrueSight Server Automation Smartagent, and click Stop. - (Linux)
Run this command: systemctl stop smartagent
- (Windows)
- Open the smartagent.conf file and enter the Smart Hub host name.
- Navigate to the following path:
- (Windows) c:\windows\rsc
- (Linux) /etc/rsc
- Open the smartagent.conf file and provide the Smart Hub host name for the host parameter.
- Navigate to the following path:
- Create a template based on this virtual machine.
- Create virtual machines based on this template and deploy them in your environment. When the Smart Agent is started on a newly deployed virtual machine, it sends an enrollment request.
- Verify that the newly-provisioned virtual machines are enrolled automatically:
- Log in to the TrueSight Server Automation console.
- Navigate to the servers list, and verify that the new virtual machines are enrolled.
Enrolling cloned virtual machines
You can also enroll the virtual machines that are cloned from the existing virtual machine containing the RSCD and Smart Agents.
Do the following:
- Log in to the cloned virtual machine.
Stop the Smart Agent service.
- (Windows)
- On the search bar, type services.msc.
- Right-click TrueSight Server Automation Smartagent, and click Stop.
- (Linux)
Run any of these commands:- systemctl smartagent stop
- /etc/init.d/smartagent stop
- (Windows)
- Delete the smartagent.log file from the following path:
<rscd_agent_installation_directory>/RSCD/log/smartagent.log - Navigate to the following path:
- (Windows) c:\windows\rsc
- (Linux) /etc/rsc
Open smartagent.conf in a text editor, and update the following properties:
Property
Required updates
access key
Specify the Smart Hub access key. To know the access key, see Configuring-the-Smart-Hub-and-Smart-Hub-Gateway.
state
Change the Agent enrollment state to "new."
server_guid
Delete the existing value to keep it blank.
infra_id
Delete the existing value to keep it blank.
hostname
Delete the existing value to keep it blank.
- Delete the client.key and clientcert.pem files from the following path:
- (Windows) C:\Windows\rsc
- (Linux) /etc/rsc
- Restart the Smart Agent service.
- Repeat these steps for the other cloned virtual machines that you want to enroll.
- Log in to the TrueSight Server Automation console, and verify that the cloned virtual machines are enrolled.