Creating virtual machines – LS Cloud

Prerequisites

  • You have a guest OS source prepared, as described in Managing images.
  • One or more compute networks are created by using the instructions in Managing virtual networks.
  • (Optional) Custom security groups are configured, as instructed in Managing security groups.
  • (Optional) An SSH key is added, as outlined in Managing SSH keys. You can specify an SSH key only when creating VMs from a template or boot volume.

To create a virtual machine

  1. On the Virtual machines screen, click Create virtual machine. A window will open where you will need to specify the VM parameters.
  2. Specify a name for the new VM.
  3. Select the VM boot media:
    • If you have an ISO image or a template (click to expand)

      a. Select Image in the Deploy from section, and then click Specify in the Image section.
      b. In the Images window, select the ISO image or template, and then click Done.

    • If you have a compute boot volume

      a. Select Volume in the Deploy from section, and then click Specify in the Volumes section.
      b. In the Volumes window, click Attach.
      c. In the Attach volume window, find and select the volume, and then click Attach.
      If you attach more than one volume, the first attached volume becomes the boot volume, by default. To select another volume as bootable, place it first in the list by clicking the up arrow button next to it.


      Note

      If you select an image or volume with an assigned placement, the created VM will also inherit this placement.


      After selecting the boot media, volumes required for this media to boot will be automatically added to the Volumes section.
  4. Configure the VM disks:
    • In the Volumes window, make sure the default boot volume is large enough to accommodate the guest OS. Otherwise, click the ellipsis icon next to it, and then Edit. Change the volume size and click Save.
    • (Optional) Add more disks to the VM by creating or attaching volumes. To do this, click the pencil icon in the Volumes section, and then Add or Attach in the Volumes window.
    • Select volumes that will be removed during the VM deletion. To do this, click the pencil icon in the Volumes section, click the ellipsis icon next to the needed volume, and then Edit. Enable Delete on termination and click Save.
    • When you finish configuring the VM disks, click Done.
  5. Choose the amount of RAM and CPU resources that will be allocated to the VM in the Flavor section. In the Flavor window, select a flavor, and then click Done.
    Important

    When choosing a flavor for a VM, ensure it satisfies the hardware requirements of the guest OS


    Note

    If you select a flavor with an assigned placement, the created VM will also inherit this placement.

  6. Add network interfaces to the VM in the Networks section:
    • In the Network interfaces window, click Add to attach a network interface.
    • In the Add network interface window, select a compute network to connect to, and then specify MAC address, IP addresses, and security groups. By default, MAC and primary IP addresses are assigned automatically. To specify them manually, clear the Assign automatically check boxes, and enter the desired addresses. Optionally, assign additional IP addresses to the network interface in the Secondary IP addresses section.
      Note

      Secondary IP addresses, unlike the primary one, will not be automatically assigned to the network interface inside the virtual machine guest OS. You should assign them manually.

      • If you selected a virtual network with enabled IP address management

        In this case, spoofing protection is enabled and the default security group is selected by default. This security group allows all incoming and outgoing traffic on all the VM ports. If required, you can select another security group or multiple security groups. To disable spoofing protection, clear all of the check boxes and turn off the toggle switch. Security groups cannot be configured with disabled spoofing protection.

      • If you selected a virtual network with disabled IP address management

        In this case, spoofing protection is disabled by default and cannot be enabled. Security groups cannot be configured for such a network.

      • If you selected a shared physical network

        In this case, spoofing protection cannot be configured by a self-service user. If you want to enable or disable spoofing protection, contact your system administrator.


        After specifying the network interface parameters, click Add. The network interface will appear in the Network interfaces list.
    • (Optional) If required, edit IP addresses and security groups of newly added network interfaces. To do this, click the ellipsis icon, click Edit, and then set the parameters.
    • When you finish configuring the VM network interfaces, click Done.
  7. (Optional) If you have chosen to boot from a template or volume, which has cloud-init and OpenSSH installed:
    Important

    As cloud images have no default password, you can access VMs deployed from them only by using the key authentication method with SSH.

    • Add an SSH key to the VM, to be able to access it via SSH without a password.

      In the Select an SSH key window, select an SSH key and then click Done.

    • Add user data to customize the VM after launch, for example, change a user password.

      Write a cloud-config or shell script in the Customization script field or browse a file on your local server to load the script from.

  8. After configuring all of the VM parameters, click Deploy to create and boot the VM.

If you are deploying the VM from an ISO image, you need to install the guest OS inside the VM by using the built-in VNC console. Virtual machines created from a template or a boot volume already have a preinstalled guest OS.

Share this:
FacebookTwitterWhatsAppViberCopy LinkTelegramLinkedIn
Updated on May 31, 2022
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support