../_images/preview.png

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.

Note

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
Datastore.Browse
Datastore.DeleteFile
Datastore.FileManagement
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
Global.ManageCustomFields
Global.SetCustomField
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
VirtualMachine.Config.SwapPlacement
VirtualMachine.Config.Settings
VirtualMachine.Config.Resource
VirtualMachine.Config.Rename
VirtualMachine.Config.RemoveDisk
VirtualMachine.Config.RawDevice
VirtualMachine.Config.MksControl
VirtualMachine.Config.Memory
VirtualMachine.Config.HostUSBDevice
VirtualMachine.Config.EditDevice
VirtualMachine.Config.DiskExtend
VirtualMachine.Config.CPUCount
VirtualMachine.Config.ChangeTracking
VirtualMachine.Config.Annotation
VirtualMachine.Config.AdvancedConfig
VirtualMachine.Config.AddRemoveDevice
VirtualMachine.Config.AddNewDisk
VirtualMachine.Config.AddExistingDisk
For internal purposes: different operations in time of provisioning virtual machines

















VirtualMachine.Interact.Suspend
VirtualMachine.Interact.Reset
VirtualMachine.Interact.PowerOn
VirtualMachine.Interact.PowerOff
VirtualMachine.Interact.DeviceConnection
In process of managing virtual machines: powering them on/off, rebooting and so on




VirtualMachine.Inventory.Create For internal purposes: creating task for virtual machine provisioning and running
VirtualMachine.Inventory.Delete For internal purposes: running task for virtual machine deleting
VirtualMachine.Provisioning.DeployTemplate
VirtualMachine.Provisioning.CloneTemplate
VirtualMachine.Provisioning.Clone
VirtualMachine.Provisioning.CreateTemplateFromVM
VirtualMachine.Provisioning.Customize
VirtualMachine.Provisioning.ModifyCustSpecs
VirtualMachine.Provisioning.ReadCustSpecs
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.

Note

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
SCE ACE
Environment screen
Click on the link for the cloud Click Add Credentials
ECC1 ECC2

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

../_images/VMWare-creds.png

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

../_images/VMWare-creds-2.png

Validating the Connection to VMWare

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