6. Creating a Virtual Machine

Note

For supported guest operating systems and other information, see the “Managing Virtual Machines” section in the Administrator’s Guide.

To create a VM, do the following:

  1. On the COMPUTE > Virtual machines > VIRTUAL MACHINES tab, click Create virtual machine. A window will open where you will need to specify VM parameters.

    _images/stor_image70_ac.png
  2. Specify a name for the new VM.

  3. In Deploy from, choose Volume if you have a boot volume or want to create one. Otherwise, choose Image.

  4. Depending on your choice, click the pencil icon in the Volumes or Image section and do one of the following:

    • In the Images window, select the ISO image or template and click Done.
    _images/stor_image71_ac.png
    • In the Volumes window, do one of the following:
      • If you have prepared a volume with an installed guest OS, click Attach, find and select the volume, and click Done.
    _images/stor_image72_ac.png _images/stor_image73_ac.png
  5. Optionally, in the Volumes window, click Add or Attach to create or attach any other volumes you need. To select a volume as bootable, place it first in the list by clicking the up arrow button next to it.

  6. In the Flavor window, choose a flavor and click Done.

    _images/stor_image74_ac.png
  7. In the network window, click Add, select a virtual network interface and click Add. It will appear in the Network interfaces list.

    _images/stor_image75_ac.png

    You can edit additional parameters of newly added network interfaces, like IP and MAC addresses and spoofing protection. To do this, click interface’s ellipsis icon, then Edit, and set parameters in the Edit network interface window.

    _images/stor_image75_1_ac.png

    You will not be able to edit these parameters later. Instead, you will be able to delete the old network interface and replace it with a new one.

    _images/stor_image75_2_ac.png

    Click Done.

  8. (Optional) If you are deploying the VM from a template or boot volume (not an ISO image), you can specify the following:

    • An SSH key to be injected into the VM. To do it, select an SSH key in the Select an SSH key window, and click Done.

      _images/stor_image76_ac.png

      Note

      To be able to connect to the VM via SSH, make sure the VM template or boot volume has cloud-init and OpenSSH installed (see the “Creating SSH-Enabled Templates” section in the Administrator’s Command Line Guide).

    • User data to customize the VM after launch. To do it, write a script in the Customization script field or browse a file on your local server to load the script from.

      You can specify user data in one of two formats: cloud-config or shell script. To inject a script in a Windows VM, refer to the Cloudbase-Init documentation.

      _images/stor_image77_ac.png

      Note

      For the guest OS to be customizable, make sure the VM template or boot volume has cloud-init installed.

  9. Back in the Create virtual machine window, click Deploy to create and boot the VM.

  10. If you are deploying the VM from an ISO image (not a boot volume template or a volume with a pre-installed guest OS), select the VM, click Console, and install the guest OS using the built-in VNC console.

  11. (Optional) If you are deploying the VM from a prepared template with an injected SSH key, you can connect to it via SSH using the username and the VM IP address:

    • For Linux templates, enter the username that is default for the cloud image OS (for example, for a CentOS cloud image, the default login is centos).
    • For Windows templates, enter the username that you specified during Cloudbase-Init installation.
    • For VMs customized with user data, enter the username specified in the script.

    For example:

    # ssh myuser@10.10.10.10