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:

vm_template_based_provisioning.png

Do the following:

  1. Create a virtual machine on a virtualization platform, such as vSphere, Solaris, and Hyper-V.
  2. Install the RSCD agent on the virtual machine and ensure the following while configuring the Smart Agent parameters:
  3. 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
  4. Open the smartagent.conf file and enter the Smart Hub host name.
    1. Navigate to the following path:
      • (Windowsc:\windows\rsc
      • (Linux/etc/rsc
    2. Open the smartagent.conf file and provide the Smart Hub host name for the host parameter.
  5. Create a template based on this virtual machine.
  6. 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.
  7. Verify that the newly-provisioned virtual machines are enrolled automatically:
    1. Log in to the TrueSight Server Automation console.
    2. 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:

  1. Log in to the cloned virtual machine.
  2. Stop the Smart Agent service.

    • (Windows
      1. On the search bar, type services.msc.
      2. Right-click TrueSight Server Automation Smartagent, and click Stop.
    • (Linux)
      Run any of these commands:
      • systemctl smartagent stop
      • /etc/init.d/smartagent stop
  3. Delete the smartagent.log file from the following path:
    <rscd_agent_installation_directory>/RSCD/log/smartagent.log
  4. Navigate to the following path:
    • (Windowsc:\windows\rsc
    • (Linux/etc/rsc
  5. 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.

  6. Delete the client.key and clientcert.pem files from the following path:
    • (WindowsC:\Windows\rsc
    • (Linux/etc/rsc
  7. Restart the Smart Agent service. 
  8. Repeat these steps for the other cloned virtual machines that you want to enroll.
  9. Log in to the TrueSight Server Automation console, and verify that the cloned virtual machines are enrolled.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*