# Agent Install Methods

Morpheus Agent installation supports multiple install methods.

- SSH/WinRM
- VM Tools
- Cloud-Init & Cloudbase-Init
- Windows Unattended
- Manual

## For All Agent Install Methods

When an Instance is provisioned and the Agent does not install, verify the following for any Agent install mode:

- The HPE Morpheus Enterprise Appliance URL (Administration > Settings) is both reachable and resolvable from the provisioned node
- The Appliance URL begins with https://, not http://

NOTE

Be sure to use https:// even when using an IP address for the appliance.

- Inbound connectivity access to the HPE Morpheus Enterprise appliance from provisioned VMs and container hosts on port 443 (needed for Agent communication)
- Private (non-HPE Morpheus Enterprise provided) VM images and templates must have their credentials stored. These can be entered or edited in the Library > Virtual Images section by clicking the Actions dropdown on an image detail page and selecting Edit.

NOTE

Administrator user is required for Windows Agent install.

- The Instance does not have an IP address assigned. For scenarios without a DHCP server, static IP information must be entered by selecting the Network Type: Static in the Advanced Options section during provisioning. IP Pools can also be created in the Infrastructure > Networks > IPPools section and added to Cloud network sections for IPAM
- DNS is not configured and the node cannot resolve the appliance. If DNS cannot be configured, the IP address of the HPE Morpheus Enterprise appliance can be used as the main or Cloud appliance

## SSH

- Port 22 is open for Linux images, and SSH is enabled
- Credentials set on the image if using a custom or synced image. Credentials can be entered on images in the Library > Virtual Images section

## WinRM

- Port 5985 must be open and WinRM enabled for Windows images
- Credentials have been entered on the image if using a custom or synced image. Credentials can be entered on images in the Library > Virtual Images section

NOTE

Administrator user is required for Windows Agent install.

## VMware Tools (vmtools)

- VMware Tools is installed on the template(s)
- Credentials have been entered on the image if using custom or synced image. Credentials can be entered on images in the Library > Virtual Images section
- Sudo privileges required for Linux
- Administrator User required for Windows (SID 500)

## Cloud-Init

- Cloud-Init settings configured in Administration > Settings > Provisioning section
- Cloud-Init installed on Virtual Image
- `Cloud-Init` enabled on Virtual Image config

## Cloudbase-Init

- Windows Administrator Password defined in Administration > Settings > Provisioning section
- Cloudbase-Init installed on Virtual Image
- `Cloud-Init` enabled on Virtual Image config
- Cloudbase-Init is only required for OpenStack Cloud types

NOTE

Unattend Agent Installation and customizations are recommended over Cloudbase-Init

## Windows Unattended

- Windows Administrator Password defined in Administration > Settings > Provisioning section
- VMware: `Force Guest Customizations` set to forced on Virtual Image config when using DHCP (Static Assignment will already force Guest Customizations)
- Nutanix & SCVMM: Virtual Image is sysprepped and shutdown, `Sysprep Enabled` flagged on Virtual Image config

## Manual

Agent Install scripts can be downloaded from HPE Morpheus Enterprise by selecting Actions  >  Download Agent Script from the server detail page. After the scripts are downloaded, run them manually on the target host when required for a given managed resource.

NOTE

The script is unique to each managed resource. Do not save or reuse it for any other resource.

When installing on Windows, continue with the following steps to complete the manual installation:

1. Open PowerShell as an administrator
2. Run the `unblock-file cmdlet` against the download agent installation script:

   ```
   ```
   Unblock-File -Path C:\Users\User01\Documents\Downloads\installAgent.ps1  
   Get-ExecutionPolicy  
   Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
   ```
   ```
3. After running the PowerShell script, ensure that the script has downloaded the `msi` file, and the Agent service started correctly:

   ```
   ```
   Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
   ```
   ```

Following setup, verify that the Agent is reporting back to the HPE Morpheus Enterprise appliance.
