VMware: vSphere Integration

Disclaimer

Your use of this download is governed by Stonebranch’s Terms of Use, which are available at https://www.stonebranch.com/integration-hub/Terms-and-Privacy/Terms-of-Use/

Overview

This integration helps the users to orchestrate VMware vCenter Server operations from the Universal Controller. It encourages collaboration by enabling automated deployment and management of Virtual machines on the EXSi hosts connected to the vCenter Server.

VMware vSphere is the virtualization platform which helps with transforming datacenters into aggregated computing infrastructure. The main components of vSphere includes ESXi and vCenter server. With this integration, the users can perform operations like list, create, delete, start, stop, suspend, resume Virtual machines and also list, create, delete Hosts and Datacenters.

  • UAC communicates with VMware vCenter through the vSphere Python SDK libraries.

  • Helps with automated deployment and management of virtual machine lifecycle.

  • Helps with automated management of Datacenters in the vCenter server.

  • Helps with automated management of Hosts in the vCenter server.

Software Requirements

This integration requires an Universal Agent and a Python runtime to execute the Universal Task against a instance.

Software Requirements for Universal Template and Universal Task

  • Requires Python 3.6 or higher. Tested with the Universal Agent bundled Python distribution.

  • Python modules required:

    • requests

    • vSphere Automation python client library

Software Requirements for Universal Agent

Either:

  • Universal Agent for Windows x64 Version 6.9 and later with python options installed

  • Universal Agent for Linux Version 6.9 and later with python options installed

Software Requirements for Universal Controller

  • Universal Controller 6.9.0.0 or later is required.

Software Requirements for the Application to be Scheduled

This Universal Task has been tested with the following versions:

  • vCenter Server Appliance v7.0 U2

Technical Considerations

This Universal Task uses the Python Module functions (vmware/vsphere-automation-sdk-python: Python samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API (github.com)) to makeREST API calls.

Key Features

Feature

Description

List VM

Returns the list of virtual machines in vCenter.

Start VM

Start the specified virtual machine in vCenter .

Stop VM

Stop the specified virtual machine in vCenter.

Suspend VM

Suspend the specified virtual machine in vCenter.

Resume VM

Resume the specified virtual machine form in vCenter.

Create VM

Creates a new virtual machine in vCenter according to the specification provided in the config file.

Clone VM

Create a new virtual machine form an already existing virtual machine.

Delete VM

Deletes the specified virtual machine in vCenter.

List Datacenter

Returns the list of Datacenters in vCenter.

Create Datacenter

Create a new datacenter in the vCenter inventory.

Delete Datacenter

Deletes the specified datacenter in the vCenter inventory.

List Host

Returns the list of hosts in vCenter.

Create Host

Add a single host to the vCenter inventory under the specified Datacenter.

Delete Host

Remove the standalone host form the vCenter inventory.

Import the E-Mail Universal Template

To use this downloadable Universal Template, you first must perform the following steps:

  1. This Universal Task requires the /wiki/spaces/UC71x/pages/5178443 feature. Check that the/wiki/spaces/UC71x/pages/5177877 system property has been set to true.

  2. To import the Universal Template into your Controller, follow the instructions here.
  3. When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.

Configure VMware vSphere Integration Universal Tasks

For this new Universal Task type, create a new task, and enter the task-specific details that were created in the Universal Template.

Field Descriptions for VMware vSphere Integration Universal Task

Field

Description

VMware Function

Select the desired function you would need to perform in vCenter

vCenter Hostname/IP address

vCenter server domain name or ip address

vCenter Credentials

User credentials of vCenter server to authenticate API call

VM Name

Name of the virtual machine to execute the desired function

New VM Name

New name for creating a new virtual machine from scratch or for cloning a virtual machine

VM Configuration

Configuration Script with specification information for creating a new virtual machine form scratch

New Datacenter Name

Name of the new datacenter to add to the vCenter inventory

Folder Name

Identifier of the folder to add the new datacenter in the vCenter inventory

Datacenter Name

Name of the datacenter to execute the desired function (Delete Datacenter)

Force Deletion

Enable to delete the datacenter forcefully (To delete non empty datacenter)

ESXi Hostname / IP address

Hostname or IP address of the ESXi Host to add to the vCenter inventory

EXSi Host Credentials

User credentials of the ESXi host

Host name

Hostname or IP address to execute the desired function ( Delete Host)

Examples for VMware vSphere Integration Universal Tasks

List VM

Start VM

Stop VM

Suspend VM

Resume VM

Create VM

Sample Configuration Script for Virtual Machine Creation

{
	"guest_OS": "xxxxx",
	"name": "xxxxx",
	"placement": {
		"datastore": "xxxxx",
		"folder": "xxxxx",
		"host": "xxxxx",
		"resource_pool": "xxxxx"
	},
	"boot_devices": [],
	"cdroms": [
	],
	"boot": {
		"delay": 0,
		"retry_delay": 10,
		"enter_setup_mode": false,
		"type": "BIOS",
		"retry": false
	},
	"cpu": {
		"cores_per_socket": 1,
		"count": 1,
		"hot_add_enabled": true,
		"hot_remove_enabled": true
	},
	"memory": {
		"hot_add_enabled": false,
		"size_MiB": 2048
	},
	"hardware_version": "VMX_17"
}

Clone VM

Delete VM

List Datacenter

Create Datacenter

Delete Datacenter

List Host

Create Host

Delete Host

Document References

This document references the following documents:

Name

Location

Description

Universal Templates

Universal Templates

User documentation for creating Universal Templates in the Universal Controller user interface.

Universal Tasks

Universal Tasks

User documentation for creating Universal Tasks in the Universal Controller user interface.

vSphere Automation SDK

https://vmware.github.io/vsphere-automation-sdk-python/vsphere/7.0.2.0/

User documentation for vSphere automation SDK.

vSphere Automation API

https://developer.vmware.com/docs/vsphere-automation/latest/

User documentation for vSphere automation API.

Python requests module

https://pypi.org/project/requests/#description

User documentation for python requests module.