VMmanager: Administrator guide

Creating a virtual machine

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 a 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, click Without OS.
  4. To create a VM with the ISO image attached:
    1. Click Select an ISO image.
    2. Select a method for uploading the image:
      • From repository — select the image from the connected repository; 
      • Local file — select the image file in iso format on your local computer;
      • Image URL — enter the URL where the ISO image is available. The image can be available via HTTP(S) or FTP.
    3. To upload from a local file or URL:
      1. Select the OS type:
        • Linux;
        • Windows;
        • FreeBSD;
        • Other OS.
      2. Specify the Image tags for the connected OS if this VM needs to run scripts. The script will run on the VM if at least one of its tags matches the OS tag.
    4. To avoid booting the VM from the image after connecting, disable the option Boot virtual machine from the ISO
    5. Click Upload image. The VM will be created from NoOS template with the ISO image attached.
  5. Select the VM Resources from the list. To create your own configuration, click Custom configuration and specify its parameters. For the description of the parameters, see VM configurations.
  6. 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. Click 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. Click Select .. scripts.

  7. 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.
    With the Automatically option, creating a VM with multiple network interfaces is not available.
     
  8. 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.

  9. Set the Network configuration for each VM interface. To change the settings for the main interface, click . To configure an additional interface, select its settings and click Add an interface. To delete an interface, click .
      To configure the network interface:
    1. Select a Network type:
    2. If you need to set a specific MAC address for an interface, enter it. If the value is blank, the platform will generate the MAC address automatically.
    3. For main and additional networks:
      1. In the Connect to bridge field, select the bridge to which you plan to connect the interface. If there is only one bridge in the cluster, it will be selected automatically. 
        A bridge is a network interface used on a cluster node. Each bridge can only be used on one virtual interface. Read more in the Network setting on the cluster node
      2. Select a Network device type — virtual NIC model:
        • virtio — suitable for most operating systems;
        • e1000 — for VMs installed from an ISO image;
        • e1000e;
        • rtl8139. 
      3. To not assign an IP address to the interface on the main or additional network, enable the Create an interface without an IP address option. 
        Anti-spoofing will be disabled on the VM with no IP address in order to work properly with the interface.
      4. Select how to Add IP address or subnet:
        • From pool IPv4:
          1. Select an IP address pool from which to assign addresses to the VM.
          2. Select or enter the desired Number of IP addresses. A maximum of 10 IP addresses can be issued to a VM;
        • From pool IPv6:
          1. Select an IP address pool from which to assign addresses to the VM.
          2. Enter the Subnet prefix from /32 to /125;
        • Manually:
          1. Enter the IPv4 address or IPv6 subnet. For an IPv4 address, use the format x.x.x.x.x, for an IPv6 subnet, use the format x:x:x:x:x:x:x:x:x:x:x/yy, where /yy is the subnet prefix from /32 to /125;
        • Via DHCP — The IP address will be provided by an external DHCP server. The platform will not consider this address, manage it and display it in the interface. You will be able to view the VM network settings only in the guest OS or DHCP server logs. The DHCP server must be correctly configured and be in the same L2 segment of the network as the VM.
          If the VM's address is allocated via DHCP, antispoofing will be disabled on the VM for correct interface operation.
    4. For virtual network:
      1. Select a Network device type — virtual NIC model:
        • virtio — suitable for most operating systems;
        • e1000 — for VMs installed from an ISO image;
        • e1000e;
        • rtl8139. 
      2. Select a VxLAN.
      3. Select a LAN.
      4. Select or enter the desired Number of IP addresses. A maximum of 10 IP addresses can be issued to a VM.
    5. Click the Create (Save) button.
  10. Set the VM Parameters:
    1. Select the Number of VM — from 1 to 5: 

      You cannot create more than one VM at a time with an ISO image attached.
      • when creating a single VM:
        1. Specify a VM name or click 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. Click generate to automatically generate new names, or click е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 click generate to automatically create a new password. You can copy it to clipboard.
    5. Add a discretionary Note.

  11. Click the Create a VM button.

Creating from an image

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

If the source image was created with an OS installed from an ISO image, then specifying network settings during VM creation will not be available.

To create a 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. Read more in the Linked clones.
  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 click generate to automatically create a new password. You can copy it to clipboard

    If a custom answer file was used when creating the Windows OS image, the VM password field will not be displayed. The VM will be created with the password from the answer file. Read more in the article Answer files for OS Windows images.
  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. 
    With the Select Automatically option, creating a VM with multiple network interfaces is not available.
  8. If the cluster node was manually selected, select Storages for VM disks. 
    Storage selection is not available if the VM image is in NAS.
  9. Set the Network configuration for each VM interface. To change the settings for the main interface, click . To configure an additional interface, select its settings and click Add an interface. To delete an interface, click .
      To configure the network interface:
    1. Select a Network type:
    2. If you need to set a specific MAC address for an interface, enter it. If the value is blank, the platform will generate the MAC address automatically.
    3. For main and additional networks:
      1. In the Connect to bridge field, select the bridge to which you plan to connect the interface. If there is only one bridge in the cluster, it will be selected automatically. 
        A bridge is a network interface used on a cluster node. Each bridge can only be used on one virtual interface. Read more in the Network setting on the cluster node
      2. Select a Network device type — virtual NIC model:
        • virtio — suitable for most operating systems;
        • e1000 — for VMs installed from an ISO image;
        • e1000e;
        • rtl8139. 
      3. To not assign an IP address to the interface on the main or additional network, enable the Create an interface without an IP address option. 
        Anti-spoofing will be disabled on the VM with no IP address in order to work properly with the interface.
      4. Select how to Add IP address or subnet:
        • From pool IPv4:
          1. Select an IP address pool from which to assign addresses to the VM.
          2. Select or enter the desired Number of IP addresses. A maximum of 10 IP addresses can be issued to a VM;
        • From pool IPv6:
          1. Select an IP address pool from which to assign addresses to the VM.
          2. Enter the Subnet prefix from /32 to /125;
        • Manually:
          1. Enter the IPv4 address or IPv6 subnet. For an IPv4 address, use the format x.x.x.x.x, for an IPv6 subnet, use the format x:x:x:x:x:x:x:x:x:x:x/yy, where /yy is the subnet prefix from /32 to /125;
        • Via DHCP — The IP address will be provided by an external DHCP server. The platform will not consider this address, manage it and display it in the interface. You will be able to view the VM network settings only in the guest OS or DHCP server logs. The DHCP server must be correctly configured and be in the same L2 segment of the network as the VM.
          If the VM's address is allocated via DHCP, antispoofing will be disabled on the VM for correct interface operation.
    4. For virtual network:
      1. Select a Network device type — virtual NIC model:
        • virtio — suitable for most operating systems;
        • e1000 — for VMs installed from an ISO image;
        • e1000e;
        • rtl8139. 
      2. Select a VxLAN.
      3. Select a LAN.
      4. Select or enter the desired Number of IP addresses. A maximum of 10 IP addresses can be issued to a VM.
    5. Click the Create (Save) button.
  10. Specify the Number of VM — from 1 to 5:
    • when creating a single VM:
      1. Specify a VM name or click 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. click generate to automatically generate new names, or click edit to enter names and domains manually.
  11. Click the Create button.

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"}'
    Comments to the command

    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"
    }

    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>"}'
    Comments to the command
    Increasing this parameter will increase the load on the platform and cluster nodes.