Connecting Scalr to VMWare vSphere

Scalr needs access to your Cloud Platform(s) in order to provision and manage infrastructure on your behalf. To achieve this there is configuration work to do in both VMWare and Scalr as follows.

  1. Configure a User for Scalr to use to access VMWare
  2. Configure Instance Connection Policy
  3. Add VMWare credentials to Scalr and link to Environments.

If you need assistance creating a VMWare user please refer to Add a Local ESXi User NEWWIN.


Your credentials are safe with us
Credentials are stored securely and encrypted. Scalr will not use your Credentials for any purpose you have not agreed to. Our terms of service can be found on the Scalr Website Policies Page.
Why Does Scalr Need Credentials?
Cloud Credentials are needed by Scalr to provision and manage cloud infrastructure on your behalf.

Configure VMWare for Scalr

Permissions Needed:

The following is a list of permissions that must be granted in order for this VMware service user to function correctly with Scalr.

Permission Purpose
Datastore.AllocateSpace Creating virtual machine
For internal purposes: writing files of virtual machine to datastores and other service operation

Folder.Create Creating new folder
Folder.Delete Deleting existed folder
Global.CancelTask For internal purposes: cancel running tasks
Global.Diagnostics Retrieving logs from Log Browser
Adding custom fields

Network.Assign Assigning networks to virtual machine
Resource.AssignVMToPool Assigning virtual machine to resource pool
Resource.DeletePool Destroying resource pool
Sessions.ValidateSession For internal purposes: in process of sessions handling
For internal purposes: different operations in time of provisioning virtual machines

In process of managing virtual machines: powering them on/off, rebooting and so on

VirtualMachine.Inventory.Create| VirtualMachine.Inventory.CreateFromExisting
For internal purposes: creating task for virtual machine provisioning and running|
VirtualMachine.Inventory.Delete For internal purposes: running task for virtual machine deleting
For internal purposes: provisioning of virtual machine, working with their templates etc.

VirtualMachine.State.CreateSnapshot Creating snapshot of running virtual machine action
VirtualMachine.Interact.ConsoleInteract View host console snapshot

Configure Instance Connection Policy

You will also need to perform some additional configuration work to ensure that Scalr can connect to your VMWare instances. There are three options for this.

  1. Public - Scalr will ONLY connect to the Public IP of instances. Only use this option if ALL instances managed by Scalr will have a Public IP.
  2. Local - Scalr will ONLY connect to the local/private IP of instances. This option is only possible if one of the following scenarios applies.
    1. All your managed instances are in the same network as Scalr.
    2. You have routing or peering connections to all the other networks where Scalr managed instances reside.
    3. You have VPN connection(s) to all the other networks where Scalr managed instances reside.
  3. Auto - (default) Scalr will connect to the Public IP of an instance if it has one, otherwise it will fall back to the local/private IP.

If you choose to use the “public” or “local” option then you need to login to your Scalr server and update the configuration in /etc/scalr-server/scalr-server.rb by adding the following entry. (NOTE: this entry must be merged with any exiting entries in the `app[:configuration] = ` structure)

app[:configuration] = {
    "scalr" => {
      "vmware" => {
        "instances_connection_policy" => "local" or "public"

After adding this entry you must re-configure scalr by running sudo scalr-server-ctl reconfigure.

Adding VMWare Credentials to Scalr

You will need the following information in order to set up VMWare credentials in Scalr

  1. URL of vCenter
  2. URL’s of any linked vCenter’s (optional)
  3. Username
  4. Password

You can now add Cloud Credentials at either the Scalr or Account Scope. You can add new credentials directly from the Main Menu or via the Environment configuration screen at the Account Scope.


Credentials added at the Scalr Scope will be available to all Accounts. Only use Scalr Scope credentials if all Accounts are trusted to use the connected cloud account.

Scalr Scope Account Scope
Environment screen
Click on the link for the cloud Click Add Credentials

After selecting Add Credentials, you will be prompted to configure your Cloud Credentials and properties:


Click Save and your screen should look similar like this after Scalr has validate the Credentials.


You can now proceed to adding these credentials to your Environments.

Adding Instance Types

To ensure our customers have a uniform experience across clouds, we have implemented the idea of instance types for VMware. End users will have the ability to add custom instance types when they are building Farm Roles (if policy allows), but as an Admin you can restrict them to specific types. To create instance types, go to the Scalr scope, click on the main Scalr dropdown MENU_SCALR , and go down to instance types. Once on the instance types page, you can define the following:


These instance types will now apply to all VMware environments.

VMware Activities that Impact Scalr

For informational purposes, if the following events take place directly in VMware, Scalr could be negatively impacted:

  • UnregisterVM_Task of Virtual Machines and Templates that are used by Scalr. Registering them back into Scalr will not resolve the issue as the VMware UUID will change.
  • Scalr will give the following error if DRS/SRDS is disabled for Compute Resources/Storage Pods on running Farms: “Unable to launch instance: Object Datastore with managed object reference: was not found.” Reenabling that functionality or editing the Farm fixes the issue. A warmup of VMware cache will be required to get everything fully functional.
  • Relocating a server to a linked vCenter that is not configured in Scalr will cause the server to go into a “Missing” state. Scalr will not terminate or shutdown the server, it just won’t be able to manage the server.
  • Deleting a scalr-meta Custom Attribute from a single server ends up removing all of the scalr-meta attributes from ALL servers in that vCenter. This is a function of vCenter, Scalr never deletes Custom Attributes.

Enable Cost Tags

If you tag resources in VMware, you can utilize those tags to filter in the Scalr Cost Manager. After adding credentials, you will see a radio button for “Enabled Detailed Billing” appear, by checking that radio button you can select which tags should be used to filter in Cost Manager: