VMware is a very common cloud integration choice supported by Morpheus. They have provided a top notch virtualization solution and one might argue pioneered the virtualization space altogether. As such, many companies utilize this technology and all the features that come with it, so Morpheus covers a broad feature set in VCenter.
- Virtual Machine Provisioning
- Backups / Snapshots
- Resource Groups
- Datastores and DRS Clusters
- Distributed Switches
- Datacenter / Cluster scoping
- Brownfield VM management and migration
- VMware to VMware migrations
- VMDK/OVF image conversion support
- Hypervisor Remote Console
- Periodic Synchronization
- Veeam Backup Integration
- Lifecycle Management and Resize
On top of all these features, Morpheus also adds additional features to VMware that do not exist out of the box to make it easier to manage in multi-tenant environments as well as hybrid cloud environments:
- Cloud-Init Support
- VHD to VMDK Image Conversion
- QCOW2 to VMDK Image Conversion
- Multi-tenancy resource allocation
- Virtual Image management (Templates)
- Auto-scaling and recovery
Add a VMware Cloud
Note: The VMware cloud integration is for vCenter. To add a single ESXI host without vCenter, use the ESXI cloud type.
To get started with VMware, simply add a VMware cloud. in either the Infrastructure -> Clouds or Infrastructure -> Groups section.
To add a vmware cloud from the Infrastructure -> Clouds section:
- Select "+ Create Cloud" Button on the right
- Select VMware from the Add Cloud modal
- Select Next
To add a vmware cloud from the Infrastructure -> Groups section:
- Select A Group (must have at least one existing group)
- In the group view, select the Clouds tab
- Scroll down and select VMware to bring up the add cloud modal.
Morpheus will present a "Use Existing" option to add an existing VMware cloud integration to the selected Group. To add a new cloud to he group, select the "Create New" option.
Configuring the Cloud Settings
Enter a Name for your cloud, as well as optional Location and Domain.
The Visibility and Account fields are for Multi-Tenant configurations and can be left as is in single tenant/account environments. More details can be found in the multi-tenanct configuration setup.
Scale Priority is used in auto-scaling to set the order an application will scale/burst across clouds.
Typically this is the url to the VCenter web client with a /sdk in the path
A set of credentials with high level access to VMware (ensure the account has Datacenter level access)
Once these fields are entered, some selections will start pre-populating. Note: If the drop-downs do not populate, please verify the api url and provided credentials have access to VCenter.
VDC & Cluster
A cloud integration must be scoped to a specific data center and cluster.
Another cool feature provided with the cloud integration is optional Resource Pool scoping. One can choose to allow the cloud to provision into All Resource Pools or a singular Resource Pool. When choosing All, these Resource Pools can be managed from a sub-account and visibility perspective via the Cloud Detail page (multi-tenancy).
The RPC Mode feature can be configured to allow Morpheus to install its agent on the Guest operating system via either SSH/WinRM or VMware Tools Guest Process feature. If it is not possible for the Appliance to have outbound access to all networks in which VM's are being provisioned to the SSH/WinRM ports (22, 5985 respectively) then Guest Execution is a great option.
The VMware cloud integration provides a few additional options including allowing users to make host selections or keeping that aspect hidden such that the best host is automatically chosen for the requested provision.
Hide Host Selection from Users
This allows users to make host selections when provisioning, or keeping that aspect hidden such that the best host is automatically chosen for the requested provision.
Inventory Existing Instances
Morpheus provides several features regarding pulling in existing virtual machines and servers in an environment. Most cloud options contain a checkbox titled 'Inventory Existing Instances'. When this option is selected, all VM's found within the specified scope of the cloud integration will be scanned periodically and Virtual Machines will be synced into Morpheus.
By default these virtual machines are considered 'unmanaged' and do not appear in the Provisioning -> Instances area but rather Infrastructure -> Hosts -> Virtual Machines. However, a few features are provided with regards to unmanaged instances. They can be assigned to various accounts if using a multi-tenant master account, however it may be best suited to instead assign the 'Resource Pool' to an account and optionally move all servers with regards to that pool (more on this in Multi-Tenancy sections). An unmanaged server can also be made into a managed server. During this process remote access is requested and an agent install is performed on the guest operating system. This allows for guest operations regarding log acquisition and stats. If the agent install fails, a server will still be marked as managed and an Instance will be created in Provisioning, however certain features will not function. This includes stats collection and logs.
NOTE: All Cloud data is resynchronized on a 5 minute interval. This includes Data Stores, Resource Pools, Networks, Templates, and Virtual Machines.
Enable Hypervisor Console
This features is Remote Console support directly to the hypervisor. To enable this feature a few prerequisites must be met. First, the Morpheus appliance must have network access to the ESXi hosts within vcenter. Secondly, firewall settings need to be adjusted on each ESXi host. This can be done in vsphere under firewall configuration on the host. Simply check the gdbserver option, which will open up the necessary ports (starting at 5900 range).
If this cloud requires an appliance url different than the main appliance url, enter it here. This is optional and typically left blank.
Agent Install Mode
*Please note all of these fields can be edited after the cloud is created.
If the cloud was added form Infrastructure -> Clouds, an option will be presented to create a group or add to an existing group. These groups can be given provisioning permission via role based access control. It is normally recommended that groups are organized such that one cloud exists in one group unless the networks are setup such that internal routing is possible between the clouds. This is very useful for bursting, or hybrid cloud configurations.
Click Save Changes and your Cloud will created and added to the Group.
A default set of Service Plans are created in Morpheus for the VMware provisioning engine. These Service Plans can be considered akin to AWS Flavors or Openstack Flavors. They provide a means to set predefined tiers on memory, storage, cores, and cpu. Price tables can also be applied to these so estimated cost per virtual machine can be tracked as well as pricing for customers. By default, these options are fixed sizes but can be configured for dynamic sizing. A service plan can be configured to allow a custom user entry for memory, storage, or cpu. To configure this, simply edit an existing Service Plan tied to VMware or create a new one. These all can be easily managed from the Admin -> Service Plans section.
Virtual Images / Templates
Morpheus will automatically take an inventory of all templates configured in VCenter and present them as options during provisioning. However, in order for Morpheus to properly provision these virtual machines and provide accurate stats and health of these virtual machines, an agent must be installed during virtual machine startup. This means remote access needs to be granted at the guest operating system level to Morpheus. To properly configure these virtual images, find the relevant images in Provisioning | Virtual Images and edit the entry. On this form, a few options are presented. The first is a check box asking whether or not cloud-init is enabled. If cloud-init is enabled, simply provide the default OS username configured (for Ubuntu the username is ubuntu and for CentOS the username is centos). For those looking to add cloud-init to existing templates Morpheus requires no special configuration and can use the default cloud.cfg settings.
A global cloud-init username/password can also be configured per account as well as a key-pair via the Admin -> Provisioning settings section. The great benefit of utilizing cloud-init is default templates do not need common credential sets thereby increasing provisioning security.
Windows systems do not typically support cloud-init. So simply turn this checkbox off and provide the Administrator credentials. It should be noted that these credentials are encrypted in the database. If using WinRM for the RPC Mode instead of VMware tools, a Local or Domain Administrator account credential set can be provided instead.
NOTE: Currently the Morpheus Agent supported Operating Systems are (Ubuntu 14.04, CentOS 7, RHEL 7, and Windows 2008 +).
So far this document has covered how to add the VMware cloud integration and has enabled users the ability to provision virtual machine based instances via the Add Instance catalog in Provisioning. Another great feature provided by Morpheus out of the box is the ability to use Docker containers and even support multiple containers per Docker host. To do this a Docker Host must first be provisioned into VMware (multiple are needed when dealing with horizontal scaling scenarios).
To provision a Docker Host simply navigate to the Cloud detail page or Infrastructure | Hosts section. From there click the + Container Host button to add a VMware Docker Host. This host will show up in the Hosts tab next to othe ESXi servers that were inventoried by the VMware cloud integration. Morpheus views a Docker host just like any other Hypervisor with the caveat being that it is used for running containerized images instead of virtualized ones. Once a Docker Host is successfully provisioned a green checkmark will appear to the right of the host marking it as available for use. In the event of a failure click into the relevant host that failed and an error explaining the failure will be displayed in red at the top.
Some common error scenarios include network connectivity. For a Docker Host to function properly, it must be able to resolve the Morpheus appliance url which can be configured in Admin | Settings. If it is unable to resolve and negotiate with the appliance than the agent installation will fail and provisioning instructions will not be able to be issued to the host.
A very common scenario for Managed Service Providers is the need to provide access to VMware resources on a customer by customer basis. With VMware several administrative features have been added to ensure customer resources are properly scoped and isolated. For VMware it is possible to assign specific Networks, Datastores, and Resource Pools to customer accounts or even set the public visibility of certain resources, therefore allowing all sub accounts access to the resource.
It is also possible to import vm snapshots for backup or conversion purposes from Vcenter and also an ESXi host. However, this does require that the ESXi host license has an enterprise level license as it will not allow the appliance to download a virtual image if it is not a paid vmware license.