This example illustrates how you can create a custom generic inventory data provider using our sample of a collector workflow. For this you need to download VMware generic import data collector.pkg.
The VMware data collector workflow will collect the same data that is collected by the Inventory of VMware vCenter data provider. You do not need to edit this workflow. It is ready to use. Use the Import Workflow action to import in into your system.
This workflow converts the obtained VMware data to JSON objects and then creates a package for importing.
The InvokePowerShell activity located in the TryCreatePackage > Create Package > Flowchart part of the workflow contains the Script property that showcases what kind of transformations must be performed to process the VMware data received.
Please refer to this section on configuring the generic inventory data provider. It provides the comprehensive guide on filing in the configuration.
For the use case at hand the following specifics must be taken care of:
- On the General page of the data provider configuration:
- Select Enabled.
- Select the VMware generic inventory provider data collector sample workflow.
- On the Settings page:
- Select the Create new computers checkbox to enable import of new computers.
- Use the Status for New Computers drop-down field to select the status for computers that are imported for the first time.
- Fill in the matching keys for the import.
- Add three custom workflow parameters:
- The User and Password parameters need to contain the user account and password that will be used to connect to VMwarevCenter.
- The VmWareScriptPath parameter needs to contain the file path of the VMware PowerShell script that is used by the Inventory of VMware vCenter data provider. The format will be as follows:
Matrix42 root folder\Matrix42 Workplace Management\DataGateway\Apps\Matrix42.DataGateway.Inventory\Extensions\Module\Matrix42.Virtualization.VmWare.ps1
- On the Scanned Computers page, add the vCenter server to the Include Following Computers grid. It is required to fill in the DNS name for the server.
- Save the configuration.
Now you can enable and activate the data provider. As a result, the data provider will import virtual machines and their specifics from your VMware vCenter.
If import of one computer fails, the last result summary will still indicate success. To view detailed data on how many computers were imported successfully, see the HostCommon.log.