Map a script to an OS profile

  • Rversion finale: Australia
  • Mis à jour 13 mars 2026
  • 1 minute de lecture
  • To execute scripted actions during VM provisioning, you can map a script to an OS profile. The script runs on VMs that are created based on the image template in the OS profile.

    Avant de commencer

    Role required: sn_cmp.cloud_admin

    You must have a cloud account with datacenters. You must run Discovery on the service accounts to populate the datacenters.

    Pourquoi et quand exécuter cette tâche

    In this procedure, you specify an existing script. See Create cloud initialization script templates and a script.
    Remarque :
    Profile mappings that specify more details run first. For example, a mapping that specifies a blueprint, OS profile, and resource alias takes precedence over a mapping that specifies only an OS profile.

    Procédure

    1. In the Cloud Admin Portal, navigate to Manage > Resource Profiles.
    2. In the Profiles list, select OS Profile and then open the profile.
    3. On the Cloud Script OS Profile Mappings related list, click New and then fill in the form.
      Field Description
      Blueprint

      [Optional]

      Select a blueprint to limit the script to a specific resource block used in the blueprint.
      Cloud script Select a cloud script to map the OS profile to.
      Active Select the check box if the cloud script should be run after the virtual machine is provisioned.
      Application Cloud Provisioning and Governance is auto-selected.
      OS profile If you specify a blueprint, the cloud script is run when the blueprint is provisioned.
      Resource Alias

      [Optional]

      If you specify a resource alias for the blueprint, then the cloud script is executed when the blueprint with the specified resource alias is provisioned.
    4. Right-click the form header and select Save.
      The Name attribute [scriptName] appears in the OS Profile Mapping Overrides list.
    5. In the OS Profile Mapping Overrides list, enter an attribute name and value to use when the resource is provisioned.