官术网_书友最值得收藏!

Installing an agent on Windows servers

Before we start managing any machine, we need to install an agent on it. This can be done in multiple ways, such as pushing it from the VCM console, installing it manually, or installing it with a script.

In this recipe, we will have a look at installing the agent manually and with a script on a Windows server.

Getting ready

Prepare a server to install the agent; the installer is available on the VCM Collector server, at X:\Program Files (x86)\Vmware\VCM\AgentFiles and the certificate is available at X:\Program Files (x86)\Vmware\VCM\CollectorData, where X is the drive where VCM is installed.

Copy the installer and certificate on a shared location from where it can be copied to the server where we want to install it.

We need administrative access on the server where we will be installing the agent.

The local firewall should be disabled (not recommended) or port 26542 must be open between the managed machine and VCM Collector.

For an agent push, we need the machines to be registered as licensed machines on the VCM console and the network authority account to be a part of the local administrators group, and port 26542 should be open on the machine where we are pushing the agent.

How to do it...

We will split this recipe into three sections, as follows

  • Manual agent installation
  • Agent push from the console
  • Licensing Windows machines

Manual agent installation

Log in to the server with an administrative account, copy the installer with a certificate locally, and follow this process:

  1. Start VCMAgentInstall.exe.
  2. Click on Next, again on Next, and on the destination location screen, continue with the default C:\Windows\CMAgent value.
  3. Select Allow HTTP, and go with the default port, 26542.
  4. On this page, browse to the location where the certificate is copied.
  5. Click on Next three more times, and it will start installing the agent.
  6. Once the agent has been installed, log in to VCM console.
  7. Go to Administration | Machines Manager | Licensed Machines | Licensed Windows Machines, and click on Add Machine.
  8. Select Basic and select automatically license machines.
  9. Provide details about the machine where you installed the agent, as follows:
    • Provide the hostname for the Machine Name parameter
    • Select the domain from the dropdown which the machine belongs to
    • Select DNS as Type
    • Select Windows Server as Machine Type
  10. Click on Next and then on Finish to close the wizard.
  11. Once the machine has been added to VCM, we need to hit the Refresh button on the console and click on Collect to start data collection.
  12. Monitor the data collection job, and finally, we are done with adding a machine to VCM.

Agent push from the console

The machine should be in the VCM console either by running a discovery rule or adding it manually. Now, we can perform a push of the agent from the console.

Log in to the VCM console and follow these steps to install the agent on the machine:

  1. Go to Administration | Machines Manager | Licensed Machines | Licensed Windows Machines, and select the machine which you want to add the agent to.
  2. Click on Install in the menu.
  3. The wizard will open. Make sure the machine appears in the Selected box.
  4. On the next page, set the following values:
    • Install At: Keep this default.
    • Install From: Keep this default.
    • Options: Select HTTP and set the port to 26542. Keep the rest default.
  5. On the schedule screen, select Run Now.
  6. Confirm the selection and click on Finish.
  7. Click on Jobs to see whether the job is successful, and after that, go back to the console, scroll to the right, and check whether the machine has its agent state changed from Unknown to Current Agent and shows its agent version as 5.8.2.
  8. Once the machine has its agent installed, perform an initial collection.

Licensing Windows machines

We will perform the following steps to license a managed machine. The steps are the same for Windows and Linux/Unix machines.

  1. Log in to the VCM console with an admin account.
  2. Click on Administration.
  3. Go to Machines Manager | Available Machines.
  4. Select the Windows machines to license.
  5. Click on License.

Follow the wizard to finish licensing the machine, and if the available number is below zero and in red, contact VMware to purchase more licenses.

How it works...

With this recipe, we are making sure that the machine we want to manage has an agent installed, is licensed in VCM, and that we have performed the data collection.

VCM has enough information about managed machines to start deploying software; put the machine in the correct machine group. We can perform further specific collections to find out the compliance status or patching status, and based on that, we can fix the machine or install missing patches.

There's more...

We can install the agent with a script.

Here is the code for the script:

cd C:\VCM_Agent CMAgentInstall.exe /s INSTALLPATH=C:\Windows\CMAgent PORT=26542 CERT=C:\VCM_Agent\VMware_VCM_Enterprise_Certificate_E5D8927D-A9A7-43E8-8E6F-5C88D1E40F12.pem 

Here is what the options stand for:

Just run the batch file and then follow steps 6 to 11 to complete the agent installation.

You can also use the PowerCLI commands Copy.VMGuestFile and Invoke-VMSCript to automate the deployment.

主站蜘蛛池模板: 名山县| 刚察县| 三明市| 武清区| 彩票| 临泽县| 怀集县| 靖安县| 维西| 驻马店市| 遵化市| 胶州市| 中西区| 汕头市| 轮台县| 揭阳市| 宜兰市| 五台县| 四川省| 新竹市| 湖州市| 浏阳市| 蓝田县| 六枝特区| 正镶白旗| 崇义县| 泰来县| 太仓市| 濉溪县| 金寨县| 武穴市| 新乡市| 九龙县| 罗甸县| 海口市| 文昌市| 章丘市| 同江市| 宾川县| 万州区| 淮南市|