# Provisioning a Workload

## Prerequisites

Ensure to have completed the procedures in the following topics:

- [Provisioning the Cluster](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/render?page=GUID-C48BBE9B-C5E3-4F60-8362-0D05D4634B2F.html)
- [HVM stretched Cluster deployment](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/render?page=GUID-B9EF3A2F-776E-40CE-86EF-9EFC2CABF90B.html)

## About this task

After successfully provisioning a cluster, you can now provision workloads. The default Ubuntu instance type includes a layout that is compatible with Morpheus HVM hypervisor deployments, so it is suitable for this environment. When you create an HVM instance, choose settings in the following procedure to match your HVM deployment requirements.

## Procedure

1. Navigate to Provisioning > Instances. 

   The INSTANCES page lists previously created instances.
2. Click + Add.

   The CREATE INSTANCE page displays Type, Group, Configure, Automation, and Review sections. These sections
3. In the Type tab, select an instance type from the list of instances. If you know the instance type, enter the same in the Search box (for example, enter HVM to select the HVM instance type). 

   Alternatively, you can hover over each icon to learn the instance type and then click the icon to filter the instance types based on your requirement. Once done, you can then view and select from the filtered list of instance types.

   NOTE

   If the selected type supports multiple deployment models (for example, VM, container, or bare metal), select the correct icon for your deployment.
4. Click Next.
5. On the Group tab, provide the following details:
   1. GROUP – Select a group from the drop-down list that owns and manages the instance.
   2. CLOUD – Select the target cloud where Morpheus manages the instance.
   3. NAME – Enter an instance name.
   4. ENVIRONMENT – Select an environment from the drop-down list that identifies the instance purpose.
   5. LABELS – Enter labels to help identify and manage the instance.
6. Click Next.
7. In the Configure tab, complete the following:
   1. LAYOUT – Select the instance layout that matches your workload design.
   2. PLAN – Select a compute plan that defines CPU and memory for the instance.
   3. RESOURCE POOL – Select the resource pool where Morpheus places the instance.
   4. VOLUMES – Define the storage volumes for the instance by configuring the following:

      - Enter a volume name in the LABEL box.
      - Enter the volume size (in GB) in the Size box.

        IMPORTANT

        Enter only whole numbers. Do not enter decimal values like 10.12345.
      - Select the datastore for the volume from the Datastores drop-down list. For more information about datastores, see [Data Stores](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/render?page=GUID-D3548220-4D77-4DBB-8313-CFAD68416264.html).
      - Click the small down-arrow button to define how each volume allocates storage capacity (Storage Type) and how each volume handles write I/O behavior (Storage Profile) by configuring the following:
        - Storage Type:

          - Standard – Uses the default disk provisioning behavior for the selected target.
          - Thin – Allocates storage as data is written and it can be unavailable based on the target policy.
          - Thick (Lazy Zero) – Pre-allocates full disk capacity and zeroes blocks on first write.
          - Thick (eager) – Pre-allocates full disk capacity and zeroes all blocks at creation time.
        - Storage Profile:

          - Standard – Uses the default disk provisioning behavior for the selected target.
          - Thin – Allocates storage as data is written and it can be made available or unavailable based on the target policy.
      - Click **+** to add another volume.
   5. NETWORKS – Define the network interfaces for the instance by configuring the following options:

      - Select the network from the Select Network drop-down list to attach to the instance.
      - Select the network adapter model from the Virt IO(default adapter model) drop-down list.
      - If enabled, select one of the following from the drop-down list:

        - DHCP – Select if you want a DHCP server to automatically assign an IP address.

          NOTE

          The address can change over time unless a reservation is configured. This option is selected by default and is disabled if other options are not available.
        - Static – Select if you want to manually manage (set and update) IP address.
      - Click **+** to add another network interface.
   6. IMAGE – Select the image from the combo box that you want Morpheus to use for creating the instance.
   7. HOSTSelect a host from the drop-down list where you want Morpheus to place the instance.
   8. User Config – Expand and then choose one of the following options to define how Morpheus handles user assignment during provisioning.

      - CREATE YOUR USER – Select to have Morpheus create a user account during provisioning.
      - USER GROUP – Select a user group from the drop-down list to assign the instance to an existing user group.
   9. Expand Advanced Options and configure the following:

      - SCALE FACTOR – Specify the number of horizontally scaled nodes that Morpheus creates with the instance.
      - HOSTNAME – Enter the host name for the instance.
      - DOMAIN – Select the domain that Morpheus applies to the instance.
      - TIMEZONE – Select the time zone that Morpheus applies to the instance.
      - PORTS – Define the ports that Morpheus exposes for the instance.
        - Enter the port name name box.
        - Enter the port number in the port box.
        - Select the load balancer behavior for the port from the drop-down list.

          Click the delete icon to remove the port entry.
        - Click **+** icon to add another port.
      - QEMU ARGUMENTS – Enter custom QEMU arguments for the instance.

        AFFINITY GROUP – Select the affinity group that controls instance placement behavior.
      - ENABLE NESTED VIRTUALIZATION – Select to allow nested virtualization inside the instance.
      - PROVISION POWERED OFF – Select to create the instance in a powered-off state.
      - ATTACH VIRTIO DRIVERS – Select to attach Virt IO drivers during provisioning.
      - DISABLE EMULATED GRAPHICS  – Select to disable emulated graphics for the instance.
      - UEFI – Select to boot the instance by using UEFI firmware.
      - vTPM Enabled – Select to attach a virtual TPM to the instance.
      - SECURE BOOT – Select to enforce secure boot during startup.
      - **BIOS HOST MODE** – Select to use host BIOS mode settings for the instance.
      - **NETWORK BOOT** – Select to boot the instance from the network.
      - **ASSET TAG** – Enter the asset tag that Morpheus writes to the SMBIOS for the guest operating system.
      - **HUGE PAGES (MEMORY)** – Select to use Huge Pages, for instance memory allocation.
      - **SKIP AGENT INSTALL** – Select to skip Morpheus agent installation during provisioning.
      - **USER DATA** – Enter cloud-init user data or a custom script that Morpheus applies during provisioning.
      - **TAGS** – Complete the following to specify tags that Morpheus assigns to the instance.

        - Enter the tag name in the Name box.
        - Enter the tag value in the Value box.
        - Click the delete icon to remove the tag entry.
        - Click **+** to add another tag.
      - **ENVIRONMENT PREFIX** – Enter the prefix that Morpheus adds to environment-based naming or configuration.
      - **ENVIRONMENT VARIABLES** – Complete the following to specify environment variable name and value pairs that Morpheus applies to the instance.

        - Enter the environment variable name in the Name box.
        - Enter the environment variable value in the Value box.
        - Click the delete icon to remove the variable entry.
        - Click **+** to add another variable entry.
8. Click Next.
9. In the Automation tab, complete the following:

   - Expand Automation and complete the following:
     - WORKFLOW – Select the workflow that Morpheus runs for the instance.
     - TASK – Select the task that Morpheus runs for the instance.
   - Expand Scale and complete the following:
     - SCALE TYPE – Select the scaling method that Morpheus applies to the instance.
     - THRESHOLD – Select the threshold that triggers the scaling action.
   - Expand Backups and select the backup method from BACKUP TYPE drop-down list that Morpheus uses for the instance.
   - Expand Lifecycle and complete the following:
     - POWER SCHEDULE – Select the power schedule that Morpheus applies to the instance.
     - SHUTDOWN DAYS – Enter the number of days after which Morpheus shuts-down the instance.
     - EXPIRATION DAYS – Enter the number of days after which Morpheus expires the instance.
10. Click Next.
11. In the Review tab, review the configuration of your instance and click Complete. If you want to update the instance configuration, click Previous at the end of each screen until you reach the tab you want to update. Update your configuration and click Next until you reach the Review tab, and then click Complete to create the instance.

    NOTE

    If you want to create multiple copies of this instance, expand Options and enter the number of copies in the COPIES box, and then click Complete.
