A virtual machine (VM) is a software system that emulates the operation of a physical server. VMs are created and run on VMmanager cluster nodes. Each VM runs in an isolated environment and does not affect the other VMs on the node.

The platform supports two ways to create VMs:

When creating a VM, consider the free resources on the cluster nodes. A VM will be created even if it uses all node resources.

Creating a VM based on the recommended configuration


To create an VM:

  1. Enter Virtual machinesCreate a VMRecommended configurations tab.
  2. Select the Cluster in which the VM will be created.
  3. Select the Operating system to be installed on the VM. To create a virtual machine without an operating system, press Without OS.
  4. Select the VM Resources from the list. To create your own configuration, press Custom configuration and specify its parameters. For the description of the parameters, see VM configurations.
  5. Select the Applications and scripts that will run on the VM after the operating system is installed. Read more in Creating a script for the VM.
      If an email template has been created for the selected script, you can enable the Send the email associated with the script option, select the language of the email and specify the recipient. Read more in Email templates in scripts.
      To select multiple scripts:
    1. Press Select another or several.
    2. Select the required scripts.
    3. Specify the script parameters.
    4. Select the order in which you want the scripts to run in the Start priority column. To change the priority, drag the script name to the required position.
    5. Press Select .. scripts.

  6. Select the cluster Node to host the VM. If you select the Automatically option, the platform will detect the node taking into account the VM distribution settings in the cluster and the distribution filters. Read more in Selecting a cluster node for the virtual machine and Managing servers in the cluster. If the VM configuration does not match the distribution filters for the cluster nodes, the creation of the VM will end with the error "Cannot find node with matching host filter program". In this case, select the node for the VM manually.
  7. If the cluster node was manually selected, configure VM disks distribution in storages of the cluster node. To change the location of the disk, drag it to the required storage location.

  8. Set the Network configuration for each VM interface. To change the settings for the main interface, press . To configure an additional interface, select its settings and press Add interface. To delete an interface, press .
      Network interface settings:
    • Network type: 
    • Bridge — the network bridge used on a cluster node. Each bridge can only be used in one virtual interface. Read more in Network setting on the cluster node;
    • MAC-address;
    • Pool — the pool of IP addresses from which the address will be assigned to the virtual machine. To set a specific IP address, select the Allocate IP option and enter the address;
    • Local network — a local network in a virtual network.

  9. Set the VM Parameters:
    1. Select the Number of VM — from 1 to 5:
      • when creating a single VM:
        1. Specify a VM name or press generate to automatically create a new one.
        2. Specify the Domain for the VM. A domain must have at least two parts separated by a dot. For example, example.com.
      • If two to five VMs are created, their names and domain names will be generated automatically. Press generate to automatically generate new names, or press еdit to enter names and domains manually.
    2. Select the VM Owner.
    3. To have the platform send an email with access details to the VM owner, enable the Send email with password option.
    4. Enter the VM password or press generate to automatically create a new password. You can copy it to clipboard.
    5. Add a discretionary Note.

  10. Press Create a VM.

Creating from an image


Before creating a VM, prepare the required image. Read more in Creating a disk image.

To create an VM:

  1. Enter Virtual machines Create a VM VM images tab → select an image from the list.
  2. To create a linked clone, enable the create as linked clone option.
  3. If you need to change the configuration, specify:
    • vCPU — number of vCPUs, pcs;
    • RAM — RAM size, MB;
    • Storage — disk storage size, GB.
  4. Select the VM Owner.
  5. Enter the VM password or press generate to automatically create a new password. You can copy it to clipboard.
  6. To have the platform send an email with access details to the VM owner, enable the Send email with password option.
  7. Select the cluster Node to host the VM. With the Select automatically option, the platform will determine the node taking into account the VM distribution settings in the cluster and the distribution filters. Read more in Selecting a cluster node for the virtual machine and Managing servers in the cluster. If the VM configuration does not match the distribution filters for the cluster nodes, the creation of the VM will end with the error "Cannot find node with matching host filter program". In this case, select the node for the VM manually.
  8. If the cluster node was manually selected, select Storages for VM disks.
  9. Specify the settings of the main and additional networks for the VM. To disable the network interface, press Do not use.
      Network interface parameters:
    1. Bridge for interfacethe network bridge used on the cluster node. Each bridge can only be used in one virtual interface. Read more in Network setting on the cluster node;
    2. Pool — the pool of IP addresses from which the address will be assigned to the virtual machine. To set a specific IP address, select the Assign IP option and enter the address.
  10. To add an interface, press Configure network Add interface and specify its parameters:
    1. Bridge for interface.
    2. MAC-address.
    3. Pool or a specific IP address.
  11. If a  virtual network is available in the cluster, you can select its parameters. To do this, press Use network and specify:
    1. Virtual network name.
    2. Local network name.
  12. To add a virtual interface, press Configure network Add interface and specify its parameters:
    1. Virtual network name.
    2. Local network name.
  13. Specify the Number of VM — from 1 to 5:
    • when creating a single VM:
      1. Specify a VM name or press generate to automatically create a new one.
      2. Specify the Domain for the VM. A domain must have at least two parts separated by a dot. For example, example.com.
    • If two to five VMs are created, their names and domain names will be generated automatically. Press generate to automatically generate new names, or press edit to enter names and domains manually.
  14. Press Create.

Access to a virtual machine


If the Send email with password option was enabled during VM creation, the platform will send an email with credentials to the VM owner.

The user name for connecting to the VM is taken from the OS template. Default values:

  • for Unix family OS — root;
  • for Windows family OS — admin or administrator.

Parallel VM creation


The platform can create multiple VMs simultaneously. There is a restriction on parallel creation of VMs with the same OS group on one cluster node. By default, no more than five such VMs can be created simultaneously. To change this value:

  1. Get the authorization token:
    curl -k -X POST -H "accept: application/json" -H "Content-Type: application/json" 'https://domain.com/auth/v4/public/token' -d '{"email": "admin_email", "password": "admin_pass"}'
    CODE

    domain.com — domain name or IP address of the server with the platform

    admin_email — platform administrator's email

    admin_pass — platform administrator's password

    In response, you will get the message in the form:

    Example of response in JSON

    {
      "confirmed": true,
      "expires_at": null,
      "id": "6",
      "token": "4-e9726dd9-61d9-2940-add3-914851d2cb8a"
    }
    CODE

    Save the received token value.

  2. Perform the API request: 

    curl -k -H "x-xsrf-token: <token>" -X POST "https://domain.com/vm/v3/setting/max_concurrent_host_create_tasks_per_node" -d '{"value":"<max_number>"}'
    BASH

    <token> — authorization token

    domain.com — domain name or IP address of the server with the platform

    <max_number> — maximum number of VMs

    Increasing this parameter will increase the load on the platform and cluster nodes.