# SCVMM

NOTE

HPE Morpheus Enterprise supports SCVMM cloud deployment as HA SCVMM failover cluster. You must follow the process to have a singular agent API key and only one agent online at a time.

## Requirements

- Access to SCVMM host on port 5985 for Agent installation
- Access to Hyper-V host on port 2179 for hypervisor console access
- HPE Morpheus Enterprise Agent installation (installed on the target SCVMM host via port 5985 and WinRM)
- User with administrator privileges

## Agent Requirement

SCVMM and Hyper-V integrations utilize the HPE Morpheus Enterprise Agent for communication with the HPE Morpheus Enterprise appliance, making the HPE Morpheus Enterprise Agent required. This also means SCVMM and Hyper-V Clouds can only point to one HPE Morpheus Enterprise Appliance at any given time. If another HPE Morpheus Enterprise Appliance adds an SCVMM or Hyper-V Cloud thats is already managed by another HPE Morpheus Enterprise Appliance, the HPE Morpheus Enterprise Agent appliance\_url will be updated to point to the new HPE Morpheus Enterprise appliance\_url, and the previous HPE Morpheus Enterprise Appliance will no longer be able to communicate with the SCVMM Cloud or Hyper-V Cloud until the Agent configuration is updated to point to the previous appliance again. In HPE Morpheus Enterprise version 4.2.1 and higher, multiple HPE Morpheus Enterprise clouds can be created by integrating with the same SCVMM host. This allows users to create separate Clouds with are scoped to different SCVMM Cloud, Host and/or Cluster combinations.

## Add a SCVMM Cloud

### Procedure

1. Navigate to Infrastructure  >  Clouds
2. Select + CREATE CLOUD, select SCVMM, and then click Next.
3. Enter the following into the Create Cloud modal: 

   NOTE

   You will need to open port 5985 in order for HPE Morpheus Enterprise to communicate to SCVMM. You will also want to make sure the SCVMM Controller has WinRM enabled.

   Cloud Configuration

   NAME
   :   Name of the Cloud in HPE Morpheus Enterprise

   CODE
   :   Unique code used for api/cli, automation and policies.

   LOCATION
   :   Description field for adding notes on the cloud, such as location.

   VISIBILITY
   :   For setting cloud permissions in a multi-tenant environment. Not applicable in single tenant environments.

   TENANT
   :   If Visibility is set to Private, select the Tenant the Cloud resources will assigned to.

   ENABLED
   :   When disabled, automatic Cloud sync is paused and the Cloud will not be selectable for provisioning.

   AUTOMATICALLY POWER ON VMS
   :   When enabled, HPE Morpheus Enterprise will maintain the expected power state of managed VMs. HPE Morpheus Enterprise will power on any managed VMs in the Cloud that have been shut down for unknown reasons (not powered off by HPE Morpheus Enterprise) to ensure availability of services.

       NOTE

       When “AUTOMATICALLY POWER ON VMS” is enabled, the power state of managed VMs should be maintained in HPE Morpheus Enterprise. This setting is not applicable to discovered/unmanaged resources.

   Details

   SCVMM HOST
   :   IP address or URL of SCVMM host server

   USERNAME
   :   SCVMM Username, for example: svc.scvmm

   PASSWORD
   :   SCVMM user Password

   CLOUD
   :   To scope the SCVMM Integration to a single Cloud, select it from the Cloud dropdown, which populates after establishing communication and authorization over port 5985 using the supplied username and password. To scope to all Clouds, leave the dropdown selection as `Select Cloud`

   HOST GROUP
   :   To scope the SCVMM Integration to a single host group, select a host group from the dropdown list. To scope to all host groups, select `All Hosts`

   CLUSTER
   :   To scope the SCVMM Integration to a single cluster, select a cluster from the dropdown list. To scope to all host groups, select `All`

   LIBRARY SHARE
   :   Select a Library Share to be used with the cloud integration

   SHARED CONTROLLER
   :   When creating additional HPE Morpheus Enterprise clouds that point to an SCVMM host already integrated with this appliance, select the appropriate shared controller value from the dropdown.

       IMPORTANT

       Only set `SHARED CONTROLLER` on additional HPE Morpheus Enterprise clouds and not on the Primary HPE Morpheus Enterprise SCVMM cloud. Failure to set the `SHARED CONTROLLER` on secondary HPE Morpheus Enterprise clouds pointed to the same SCVMM cluster will cause agent comm issues resulting in provisioning failures.

       WORKING PATH
       :   Path for HPE Morpheus Enterprise to write to, for example `c:\cloud`

       DISK PATH
       :   Path for Virtual Disks, for example `c:\virtualdisks`

       HIDE HOST SELECTION FROM USERS
       :   Prevents host selection from appearing in provisioning wizards

       INVENTORY EXISTING INSTANCES
       :   Enable for HPE Morpheus Enterprise to automatically discover existing VMs in the scoped resources

       ENABLE HYPERVISOR CONSOLE
       :   Enable to use VNC Hypervisor Console for HPE Morpheus Enterprise console connection as opposed to the default SSH and RDP console connection methods. Requires resolution of all Hyper-V host names and access over port 2179 from the HPE Morpheus Enterprise appliance to Hyper-V hosts.

       SCVMM Specific Advanced Options

       INSTALL AGENT
       :   Enabled by default, INSTALL AGENT installs the HPE Morpheus Enterprise agent on the scvmm Controller when adding the cloud, which is required for full functionally unless using a shared controller in which scenario the agent would already be installed on the scvmm controller node. Disabling INSTALL AGENT on the cloud config when not using a shared controller will remove the ability to provision to the cloud.

       Advanced Options

       DOMAIN
       :   Specify a default domain for instances provisioned to this Cloud.

       SCALE PRIORITY
       :   Only affects Docker Provisioning. Specifies the priority with which an instance will scale into the cloud. A lower priority number means this cloud integration will take scale precedence over other cloud integrations in the group.

       APPLIANCE URL
       :   Alternate Appliance url for scenarios when the default Appliance URL (configured in admin  >  settings) is not reachable or resolvable for Instances provisioned in this cloud. The Appliance URL is used for Agent install and reporting.

       TIME ZONE
       :   Configures the time zone on provisioned VM’s if necessary.

       DATACENTER ID
       :   Used for differentiating pricing among multiple datacenters. Leave blank unless prices are properly configured.

       NETWORK MODE
       :   Unmanaged or select a Network Integration (NSX, ACI etc)

       LOCAL FIREWALL
       :   On or Off. Enable to managed Host and VM firewall/IP Table rules (linux only)

       SECURITY SERVER
       :   Security Server setting is for Security Service Integrations such as ACI

       TRUST PROVIDER
       :   Select Internal (Morpheus) or an existing Trust Provider Integration

       STORAGE MODE
       :   Single Disk, LVM or Clustered

       BACKUP PROVIDER
       :   Select a backup provider. Depending on the Cloud type and any currently-configured backup plugins you may select Internal Backups (Morpheus) or another configured backup solution

       REPLICATION PROVIDER
       :   Sets the default Replication Provider for the Cloud. Select an existing Replication Provider Integration

       GUIDANCE
       :   Enable Guidance recommendations on cloud resources.

       COSTING
       :   Enable for HPE Morpheus Enterprise to sync Costing data from the Cloud provider, when available. For on-prem Clouds, enabling costing activates a costing service designed to mirror the live costing experience of public clouds, including invoicing with line items and real-time cost data (Operations > Costing > Invoices). If your organization utilizes reserved instances and you want to pull in related pricing data, some Cloud integrations include the option to select Costing and Reservations. If this is not relevant, select Costing to save money on additional calls to the Cloud provider’s costing API.

       DNS INTEGRATION
       :   Records for instances provisioned in this cloud will be added to selected DNS integration.

       SERVICE REGISTRY
       :   Services for instances provisioned in this cloud will be added to selected Service Registry integration.

       CONFIG MANAGEMENT
       :   Select a Chef, Ansible or Puppet integration to be used with this Cloud.

       CMDB
       :   Select CMDB Integration to automatically update selected CMDB.

       CMDB DISCOVERY
       :   When checked, any automatically discovered (unmanaged) servers onboarded into HPE Morpheus Enterprise from this Cloud will also have CMDB records created for them.

       CHANGE MANAGEMENT
       :   Select an existing Change Management Integration to set on the Cloud. ex: Cherwell

       AGENT INSTALL MODE
       :   - SSH / WINRM / Guest Execution: HPE Morpheus Enterprise will attempt to use SSH, WINRM or Guest Execution for Agent install.
           - Cloud Init / Unattend (when available): (DEFAULT) HPE Morpheus Enterprise will utilize Cloud-Init or Cloudbase-Init for agent install when provisioning images with Cloud-Init/Cloudbase-Init installed. HPE Morpheus Enterprise will fall back on SSH or WINRM if cloud-init is not installed on the provisioned image. Morpheus will also add Agent installation to Windows unattend.xml data when performing Guest Customizations or utilizing syspreped images.

       VDI GATEWAY
       :   Set a VDI Gateway for outbound communication from the HPE Morpheus Enterprise Appliance to the vdi endpoints. VDI Gateways can be added in `/tools/vdi/gateways`

       CUSTOM LOGOS

       When integrating a Cloud, it will appear by default throughout the UI with its standard logo (VMware logo for VMware Clouds, etc.). If desired, you may upload a custom logo that should appear instead. This might be useful for MSPs which might not want to reveal the Cloud type underlying its services. A dark mode version of the logo may also be uploaded if the standard logo doesn’t look right against the HPE Morpheus Enterprise dark mode theme. Checking USE DEFAULT CLOUD LOGOS allows the user to return to the standard logo for the Cloud type without deleting the custom uploaded logo.

       INVENTORY OPTIONS

       Inventory options allow you to set a default active or inactive state for certain discovered resources. The list of available resources to configure will vary based on the Cloud type and its supported resources. By default, all possible resources for the Cloud type will be discovered in an active state. Uncheck the box for some or all resources to discover them in an inactive state. The list of potential resources that may appear include:

       - Service Plans
       - Resource Pools
       - Networks
       - Security Groups
       - Datastores
       - Folders

       Provisioning Command

       PROXY
       :   Set a proxy for inbound communication from Instances to the HPE Morpheus Enterprise Appliance. Proxies can be added in the Infrastructure  >  Networks  >  Proxies tab.

       Bypass Proxy for Appliance URL
       :   Enable to bypass proxy settings (if added) for HPE Morpheus Enterprise Agent communication to the Appliance URL.

       NO PROXY
       :   Include a list of IP addresses or name servers to exclude from proxy traversal

       USER DATA (LINUX)
       :   Add cloud-init user data. HPE Morpheus Enterprise 4.1.0 and earlier assumes bash syntax. HPE Morpheus Enterprise 4.1.1 and later supports all User Data formats. Refer to <https://cloudinit.readthedocs.io/en/latest/topics/format.html> for more information.
4. After clicking NEXT, the new Cloud can be added to a Group or configured with additional advanced options.

### Create Ubuntu 22.04 image template

Use the template creation steps detailed in the below article:

https://support.hpe.com/hpesc/public/docDisplay?docId=sd00006774en\_us&page=GUID-5E1D1576-AB5F-4842-842F-A314D73E97AD\_2.html#ariaid-title1

with the exceptions as below:

1. Enable required VM integration services before deploying the VM

- Naviagate to "Hardware Configuration" -> "Advanced" -> "Integration Services". Check the checkbox "Guest services" under "Services".

2. After the the step titled "Complete the installation process and reboot the machine. Update the package list and apply any upgrades", execute the below (to install a collection of utilities for hypervisor integration) :

```
```
sudo apt install -y linux-cloud-tools-$(uname -r) linux-tools-$(uname -r)
```
```

Follow the subsequent steps as in the article.

**Create windows template**

Create a new machine in SCVMM and install a base version of your preferred Windows build. The smaller the VMDK drive, typically the faster you can clone and deploy. Utilizing HPE Morpheus Enterprise, provisioning and post deploy scripts can expand drives to desired sizing.

**Procedure**

- Apply any service packs / updates to the operating system.
- Install .Net at least 4.5.2
- Install SCVMM Agent
- Ensure Windows Firewall will allow WinRM connections.
- Shutdown the virtual machine and convert to a template.

  Note : Morpheus will sysprep images based on the “Force Guest Customizations” flag under the Virtual Image’s settings when using DHCP. Ensure a sysprep has not been performed on the template if this flag is enabled or if using Static IPs/IP Pools when provisioning, which will always use Guest Customizations and trigger a sysprep.
