# Pluggable modules

> Configure and use OneFuse Pluggable Modules with VMware vRealize Automation 7.6

---

Site [llms.txt](/llms.txt)

---

To learn more about this OneFuse feature, refer to [Pluggable modules](/docs/onefuse/configure/pluggable-modules/).

## Prerequisites

1. Configure OneFuse [Property Set(s)](/docs/onefuse/templating/property-sets/) and OneFuse Module Policies.
1. Run [OneFuse Configuration](/docs/onefuse/consume/vmware-aria-automation/vrealize-automation-76/installation-and-setup/#run-the-onefuse-configuration-workflow) per vRA Tenant.
1. Review the [OneFuse Modules](/docs/onefuse/consume/vmware-aria-automation/vrealize-automation-76/modules/) overview for vRealize Automation 7.6.
1. Create a new **vRA Blueprint** (if none exist) or determine which existing Blueprint(s) will utilize this OneFuse Module.
   - Resource: [Designing Machine Blueprints](https://docs.vmware.com/en/vRealize-Automation/7.6/com.vmware.vra.prepare.use.doc/GUID-62A92480-A122-4C89-A4E3-F8F6EC26C19E.html#GUID-62A92480-A122-4C89-A4E3-F8F6EC26C19E)

## Configure the Blueprint

1. **Know the name of the OneFuse Endpoint** created via [OneFuse Configuration](/docs/onefuse/consume/vmware-aria-automation/vrealize-automation-76/installation-and-setup/#run-the-onefuse-configuration-workflow).
1. **Determine *which* OneFuse Pluggable Module Policies to run** for this Blueprint.
1. **Determine *when* to run each OneFuse Pluggable Module Policy** for the deployment provisioning lifecycle with vRA's EBS'.
1. **Update the Blueprint** to add in necessary vRA Properties to invoke OneFuse Pluggable Module Policies.
1. **Deploy the Blueprint** to provision a vRA Deployment and run provisioning scenarios for the Pluggable Module Policy.
1. **Destroy the vRA Deployment** to run deprovision for the Pluggable Module Policy, if any.

### Update the Blueprint

1. Log in to the **vRA Tenant**
1. Select the **Design** tab from the top menu bar
1. Select the **Blueprints** tab from the left menu
1. **Edit the Blueprint** and perform the below:

#### Add in necessary vRA Properties

The following vRA Properties need to be added Blueprint's **Properties** > **Custom Properties** section under the **Resource(s)** of interest.

**1. Trigger vRA EBS for Pluggable Module:**

| Property name format | Property value |
| --- | --- |
| See options below | `true` |

**Option 1.** Trigger only specific individual EBS state(s):

<div class="alert alert-info" role="alert">


This method is recommended to decrease provision time since it will only run the execute for the states defined. This also offers a quicker way to turn on/off the Policy for testing.
</div>


- `OneFuse_PluggableModulePolicy_Trigger_<EBSExecutionString>`
- Replace `<EBSExecutionString>` with an appropriate [Event Broker Subscription](/docs/onefuse/consume/vmware-aria-automation/vrealize-automation-76/modules/event-broker-subscriptions/).

**OR:**

**Option 2.** Trigger all EBS state(s):

<div class="alert alert-warning" role="alert">


This overrides the individual EBS Execution triggers if they are present (see above).
</div>


- `OneFuse_PluggableModulePolicy_Trigger`

**Example vRA Custom Properties** (in `key: value` pair format)

```yaml
# -- Property Name
# <EBSExecutionString> is replaced with ProvisionedPreLate
# <CustomID> is replaced with 001F5

# -- Property Value
# <OneFuse Endpoint Name>  is onefuse
# <Pluggable Module Policy Name> is prod
# <Pluggable Module Name> is F5

OneFuse_PluggableModulePolicy_Trigger_ProvisionedPreLate: true
OneFuse_PluggableModulePolicy_ProvisionedPreLate_001F5: onefuse:prod:F5
```

**2. Call Pluggable Module Policy for a vRA EBS:**

| Property name format | Property value format |
| --- | --- |
| `OneFuse_PluggableModulePolicy_<EBSExecutionString>_<CustomID>` | `<OneFuse Endpoint Name>:<Pluggable Module Policy Name>:<Pluggable Module Label>` |

- Replace `<EBSExecutionString>` with an appropriate [Event Broker Subscription](/docs/onefuse/consume/vmware-aria-automation/vrealize-automation-76/modules/event-broker-subscriptions/).
- Replace `<CustomID>` with a unique, user-defined friendly label.
- `<Pluggable Module Label>` is a friendly label for the Pluggable Module. Format is alphanumeric characters only (`A-Z`, `a-z`, `0-9`); no spaces, underscores, hyphens, or special characters. Does not need to match the actual Pluggable Module's name.

**Example vRA Custom Properties** (in `key: value` pair format)

```yaml
# Example CustomID with sorting

001Apache
002WebApp
003BackupClient
```

##### Pluggable Module EBS execution states

**EBSExecutionString** refers to a specific vRA EBS State for the OneFuse Module's policy to execute on.

Replace `<EBSExecutionString>` variable with one of the following EBS Execution State, using the table below as a resource:

| EBS Execution | Subscription State | EBS Priority | EBS Name |
| --- | --- | --- | --- |
| **Provision** | | | |
| BuildingPre | Early | 25 | OneFuse_Provision_PluggableModule_BuildingPreEarly |
| BuildingPre | Late | 2015 | OneFuse_Provision_PluggableModule_BuildingPreLate |
| ProvisionedPre | Early | 25 | OneFuse_Provision_PluggableModule_ProvisionedPreEarly |
| ProvisionedPre | Late | 2015 | OneFuse_Provision_PluggableModule_ProvisionedPreLate |
| **Deprovision** | | | |
| MachineDisposingPost | - | 25 | OneFuse_De-Provision_PluggableModule |

**List of vRA EBS Trigger Properties:**

```yaml
# -- Property Name
# <EBSExecutionString> is replaced with ProvisionedPreLate
# <CustomID> is replaced with 001F5

# -- Property Value
# <OneFuse Endpoint Name>  is onefuse
# <Pluggable Module Policy Name> is prod
# <Pluggable Module Name> is F5

OneFuse_PluggableModulePolicy_Trigger_ProvisionedPreLate: true
OneFuse_PluggableModulePolicy_ProvisionedPreLate_001F5: onefuse:prod:F5
```

##### CustomID

**CustomID** refers to a user specified text string to identify and can set an order of precedence for execution when calling multiple Policies for the OneFuse Module in the same vRA EBS State.

Replace `<CustomID>` variable with a unique custom identifier:

- Format is alphanumeric characters only `A-Z, a-z, 0-9`. No spaces, underscores, hyphens nor special characters.
- Must be unique across all EBS Execution Strings for the OneFuse Module on the specific VM for the Blueprint/Cloud Template.
- Is reusable either between different VM components of the Blueprint/Cloud Template canvas or between different Blueprints/Cloud Templates.

```yaml
# -- Property Name
# <EBSExecutionString> is replaced with ProvisionedPreLate
# <CustomID> is replaced with 001F5

# -- Property Value
# <OneFuse Endpoint Name>  is onefuse
# <Pluggable Module Policy Name> is prod
# <Pluggable Module Name> is F5

OneFuse_PluggableModulePolicy_Trigger_ProvisionedPreLate: true
OneFuse_PluggableModulePolicy_ProvisionedPreLate_001F5: onefuse:prod:F5
```

**Specify sorting with CustomID:**

When executing multiple different OneFuse Module's Policies in the same EBS State, prefix the `<CustomID>` with a numeric value (for example 001, 002, etc).

The `<CustomID>` is sorted prior to executing the OneFuse module's policies.

```yaml
# Example CustomID with sorting

001Apache
002WebApp
003BackupClient
```

##### Additional helpful vRA Properties

**Purpose: Relate OneFuse Policy executions from different OneFuse Modules together with a Tracking ID.**

| Property | Value format |
| --- | --- |
| `OneFuse_Tracking_Id` | A GUID (globally unique identifier) that links OneFuse Policy Executions and the resulting Managed Objects together for a given resource on a deployment. The first OneFuse Module Policy execution will populate this vRA property and it will be passed into other OneFuse Modules automatically. Learn more about OneFuse [Tracking ID](/docs/onefuse/concepts/tracking-id/). |

<div class="alert alert-info" role="alert">


When a Tracking ID is not provided, a Tracking ID gets generated for the Policy execution.
</div>


**Purpose: Reference a specific NIC's values to get hostname, IP address, etc.**

| Property format | Example |
| --- | --- |
| `OneFuse_VmNic<#>.<value>` | See examples below |

Replace `<#>` with a number from `0` to `9`, one for each NIC.

Replace `<value>` with an appropriate key: `dnsSuffix`, `fqdn`, `gateway`, `hostname`, `ipAddress`, `macAddress`, `netmask`, `network`, `subnet`, `target`

<div class="alert alert-info" role="alert">


For most use cases, NIC 0 is the primary network interface and the target hostname is a Fully Qualified Domain Name (FQDN).
</div>


Examples:

- `OneFuse_VmNic0.dnsSuffix`
- `OneFuse_VmNic0.fqdn`
- `OneFuse_VmNic0.hostname`
- `OneFuse_VmNic0.ipAddress`
- `OneFuse_VmNic0.target`: when DNS Suffix is provided, will be the FQDN; otherwise, will be the hostname (without domain).

##### Custom Property placement methods

Influence **Custom Properties** for Resources using different methods:

| Method | Description |
| --- | --- |
| Basic | Add a Custom Property to the vSphere machine on the blueprint canvas, or to the blueprint layer itself. |
| Advanced 1 | Add a Custom Property to an existing or new vRA [Property Group](https://docs.vmware.com/en/vRealize-Automation/7.6/com.vmware.vra.prepare.use.doc/GUID-73D5DB94-3B5D-410A-8E9C-CF42D4ADF6F0.html). |
| Advanced 2 | Add a Custom Property to a more global level - such as vCenter Endpoint (to run on all deployments) and/or a Reservation (to run on all deployments using that reservation), etc. |

Learn more: [Understanding Custom Properties Precedence](https://docs.vmware.com/en/vRealize-Automation/7.6/com.vmware.vra.prepare.use.doc/GUID-F45F332E-1003-45BC-BC05-0EA2FDE1B31F.html)

### Compiled example vRA Custom Properties

Review example below of vRA Custom Properties (in `key: value` pair format) for this OneFuse Module.

```yaml
# -- Property Name
# <EBSExecutionString> is replaced with ProvisionedPreLate
# <CustomID> is replaced with 001F5

# -- Property Value
# <OneFuse Endpoint Name>  is onefuse
# <Pluggable Module Policy Name> is prod
# <Pluggable Module Name> is F5

OneFuse_PluggableModulePolicy_Trigger_ProvisionedPreLate: true
OneFuse_PluggableModulePolicy_ProvisionedPreLate_001F5: onefuse:prod:F5
```

### Provision

Deploy a Blueprint with OneFuse Pluggable Module Policy configured. Pluggable Module's provisioning scenarios will run.

#### Outputs

The following vRA Properties will have the generated OneFuse Pluggable Module Managed Object as a JSON string on the Deployment.

| Property Name | Property Value Format |
| --- | --- |
| `OneFuse_PluggableModule_<Pluggable Module Name><CustomID>` | *JSON string of OneFuse Pluggable Module Managed Object* |

### Deprovision

Destroy an existing deployment with OneFuse Pluggable Module Policy configured. The Pluggable Module Policy's deprovisioning scenarios (if any) will run.

## vRA EBS

| EBS Execution | Subscription State | EBS Priority | EBS Name |
| --- | --- | --- | --- |
| **Provision** | | | |
| BuildingPre | Early | 25 | OneFuse_Provision_PluggableModule_BuildingPreEarly |
| BuildingPre | Late | 2015 | OneFuse_Provision_PluggableModule_BuildingPreLate |
| ProvisionedPre | Early | 25 | OneFuse_Provision_PluggableModule_ProvisionedPreEarly |
| ProvisionedPre | Late | 2015 | OneFuse_Provision_PluggableModule_ProvisionedPreLate |
| **Deprovision** | | | |
| MachineDisposingPost | - | 25 | OneFuse_De-Provision_PluggableModule |

**List of vRA EBS Trigger Properties:**

```yaml
# -- Property Name
# <EBSExecutionString> is replaced with ProvisionedPreLate
# <CustomID> is replaced with 001F5

# -- Property Value
# <OneFuse Endpoint Name>  is onefuse
# <Pluggable Module Policy Name> is prod
# <Pluggable Module Name> is F5

OneFuse_PluggableModulePolicy_Trigger_ProvisionedPreLate: true
OneFuse_PluggableModulePolicy_ProvisionedPreLate_001F5: onefuse:prod:F5
```

## Troubleshooting

Troubleshoot in vRealize Orchestrator.

1. Log in to **vRealize Orchestrator**.
1. Turn on [Verbose Logging](/docs/onefuse/consume/vmware-aria-automation/vrealize-automation-76/modules/#troubleshooting-verbose-logging) and try again to see additional log messages in vRO Workflows:
   - Select **Library** > **Workflows** from the left menu
   - Go to: **OneFuse** > **Pluggable Module** > **vRA7** to find corresponding workflow runs and view logs
   - Optionally, run the workflows in the **Manual** folder to manually test
1. Optionally, [configure timeouts for EBS](/docs/onefuse/consume/vmware-aria-automation/vrealize-automation-76/modules/event-broker-subscriptions/#configure-ebs-timeouts) and/or [Configure timeouts for OneFuse modules](/docs/onefuse/consume/vmware-aria-automation/vrealize-automation-76/installation-and-setup/#configure-timeouts-for-onefuse-modules).

**Additional resources:**

- Review [Troubleshooting in OneFuse](/docs/onefuse/getting-started/troubleshooting/)
- Review [VMware troubleshooting resources](/docs/onefuse/consume/vmware-aria-automation/vrealize-automation-76/getting-started/#troubleshooting)
