Initial Deployment Operations

This section describes steps used to create a VM instance with the Create VM Instance wizard. In addition, operations commonly used immediately following VM instance creation are also described.

See the video demonstrating the basics of creating and management of zCompute Instances:

Creating VM Instances

To create VM instances:

  1. Navigate to the Compute > Instances view.

  2. Click Create.

    Note

    Fields marked with a red asterisk are mandatory.

The Create VM Instance wizard starts including the following four tabs: Compute, Storage, Networking, Config.

  1. Compute - defines the VM instances, their type, activation and quantity.

    compute-instances-create

    In the Compute tab, configure:

    • Name - the display name for the VM instance.

    • Create From - the source of the new VM instance. When you select one of the source options, the next field is updated as follows:

      • Image - select an image from available list. See Image Creation to create new image.

      • ISO - select Installation ISO from available list.

      • Volume - select Boot Volume from available list.

    • Instance Type - defines the amount of compute resource of the VM instance (CPU and RAM).

    • Key Pair - set of security credentials for ensuring the identity of the user connecting to the VM instance. Select existing key pair from pull down list or see Create a new key pair to generate or upload a new key.

    • Tags - select an existing tag or create a new tag.

    • Options:

      • Power Up - launches the VM instance post creation.

      • High Availability - ensures the VM instance is restarted in case of failure.

      • Protect from deletion - protects the VM instance from accidental deletion.

    • Create Multiple - drag the button to the right to create multiple VM instances.

    • Click Next.

  2. Storage - defines the storage requirements for the new VM instance.

    create-instance-storage

    In the Storage tab, configure:

    • Boot Volume - disk size (GB) and volume type that will be used for the boot volume of the VM instance.

    • Data Volumes (optional) - add new or existing data volumes. To add a new volume, click Add and + and configure the following:

      • Name - volume name.

      • Description - description of volume.

      • Volume Type - select the volume type from the dropdown list.

      • Size - volume size (GB).

      • Protection Group - protection group for the volume.

    • Click Next.

  3. Networking - defines the networking requirements for the new VM instance. For each VM instance, at least one network (Network 0) must be defined. Other networks can also be added to the VM instance by clicking Add.

    create-instance-networking

    For each network configure:

    • Subnet - subnet used for VM instance connectivity. Select from the existing list of subnets or create a new subnet.

    • IP - IP address for the interface. The IP must be within the entered subnet.

    • DNS Name - DNS name for the new instance.

    • Security Group - security group that will be used to limit/allow connectivity to the VM instance.

    Note

    If a security group is not specified, a port is associated with a default security group. The default security group allows both ingress and egress traffic. Security rules can be added to the default security group to change the traffic behavior.

    Important

    The MTU size for VM Instances with a Windows OS that use VxLAN-based networks, must not be greater than 1450.

    • Click Next.

  4. Config - allows configuration of optional settings for the new VM instance.

    create-instance-config

    In the Config tab, enter the following optional settings:

    • Cloud-init - drag and drop a cloud-init file to be used to initialize the VM instance post-creation.

    • Instance Profile - to pass role information to an instance when the instance starts, select an instance profile from the dropdown.

      To create an instance profile, and for further details about instance profiles, see Instance Profiles in the Identity & Access guide.

    • Metadata - key-value set for additional metadata configuration.

    • Click Finish to end the create instance wizard.

Starting VM Instances

To start a VM instance:

  1. In the Compute > Instances view, select the VM instance to run.

  2. Click Start.

The status on the selected VM Instance changes to Spawning, and VM started appears. The selected VM instance is automatically placed on one of the nodes in the cluster and starts running, and its status changes to Active.

Connecting to a VM Instance

Connect and access a VM instance in Active state by using VNC.

To connect to a VM instance:

  1. In the Compute > Instances view, select the VM instance to which to connect.

  2. Click Connect.

  3. In the displayed VM instance, click Send Ctrl-Alt-Del.

  4. The VNC window is displayed.

Attach Floating IP to a VM Instance

If a floating IP is required, add it to the VM instance after creation as follows:

  1. Navigate to Compute > Instances.

  2. Select the desired VM instance from the displayed list to open the detailed view.

  3. Click the Floating IPs tab.

  4. Click Attach and select a floating IP from the list.

Secure SSH Access to a VM Instance

To connect via SSH to a VM instance, enter the following:

$ ssh -i <private_key_file> <default_username_for_image>@<floating_ip>

Example: $ ssh -i id_rsa fedora@192.237.248.66

In the above example, the private key file is id_rsa, the default username for the image is fedora and the floating IP is 192.237.248.66.

Creating Snapshots of VM Instances

To create a VM instance snapshot:

  1. Navigate to the ComputeInstances view.

  2. From the displayed list, select the VM instance for which the snapshot is to be created and click More.

  3. In the More menu, select Snapshot.

  4. In the displayed Create Snapshot window, enter a name for the new snapshot or accept the default name consisting of the original VM instance name and the date-time stamp of the snapshot creation.

  5. (Optional) Enter the description of the snapshot.

  6. Click OK. A new snapshot is created. It is displayed in the ComputeSnapshots view.

Protecting VM Instances

After creating a VM instance, protect it by assigning it to a Protection Group.

Protecting VM Instances via the Zadara Cloud Services GUI

  1. Navigate to the Compute > Instances view.

  2. From the displayed list, select the VM instance to protect and click More.

  3. In the More menu, click Protect.

  4. In the Protect Resource window, select a protection group from the dispalyed list and click OK.

  5. In the Compute > Instances view, the protection column will be checked for the VM instance.

    Note

    This window can also be used to remove a protection group from a VM instance.

Protecting VM Instances via the Zadara Cloud Services CLI

To protect a VM instance resource, assign it to a protection group as shown in the example below for ‘VM-1’ assigned to Protection_Group-1’.

Note

The resource and the protection group must belong to the same project.

  1. Retrieve the ID of the VM instance,’VM-1’, together with its project_id.

    Zadara @ user1/cloudacc1> `vm list -m columns='^id|^name|^project_id'`
    
    +--------------------------------------+------+----------------------------------+
    | id                                   | name | project_id                       |
    +======================================+======+==================================+
    | c4d017cf-04f4-4f85-9e21-1d067e1d384e | VM-1 | 08459aa189e849d0a47ddd985db594bd |
    +--------------------------------------+------+----------------------------------+
    
  2. Retrieve the ID of the protection group, Protection-Group-1, together with its project_id.

    Zadara @ user1/cloudacc1 > *\ `protection groups list  -m columns='^id|^name|^project_id'`
    
  3. Verify that the VM instance and protection group belong to the same project.

  4. Protect the VM instance VM-1 by assigning it to the protection group Protection_Group-1.

    Zadara @ user1/cloudacc1 > protection memberships create  0d6df1eb-0e3b-4b59-9669-ed620b6ad65d instance c4d017cf-04f4-4f85-9e21-1d067e1d384e
    
    =============== ==========================================
    Field           Value
    =============== ==========================================
    | id            | ff25527a-7b08-4b76-bbc7-b5715f9182c0
    | account_id    | cloudacc1
    | created_at    | 2019-02-06T08:36:01.401731
    | group_id      | **0d6df1eb-0e3b-4b59-9669-ed620b6ad65d**
    | project_id    | 6666cfcf840f4a788cecfa6a3a00b2ee
    | resource_id   | **c4d017cf-04f4-4f85-9e21-1d067e1d384e**
    | resource_type | instance
    | triggered_at  | none
    | user_id       | user1
    =============== ==========================================
    
  5. The VM instance, ‘VM-1’ will now be protected according to the local backup schedule found in the protection group, ‘Protection-Group-1’.

Common VM Instance Management Operations

After a VM instance has been created, various operations allow you to stop, modify, or delete it.

Stop a VM Instance

To stop a VM instance:

  1. Navigate to the Compute > Instances view.

  2. From the displayed list, select a VM instance.

  3. In top toolbar, click Stop.

The VM instance will stop, and its status will change from Active to Shutoff.

Note

When a VM instance is stopped by using the UI controls, it has 60 seconds to complete a graceful shutdown.

If the VM’s OS isn’t shutdown in 60 seconds, zCompute forcibly shuts it down. This might lead to issues for VMs that take longer than 60 seconds to shut down, for example, a VM with a large database.

Best recommended practice

The best practice is to do a graceful shutdown on the VM from within its OS. For example (Linux):

sudo shutdown --poweroff

Modify a VM Instance

Modification of size and other parameters associated with a VM instance can only be done when the VM instance is in shutoff state.

To modify a VM instance:

  1. Navigate to the Compute > Instances view.

  2. From the displayed list, select the VM instance to be modified. If not already in shutoff state, click Stop.

  3. In top toolbar, click Modify.

  4. In the Modify VM window displayed, you can modify the following:

    • VM Instance Size (from predefined Instance Types)

    • Firmware Type

    • Operating System

    • Protection from deletion

    • Admin access to VNC console

Deleting VM Instances

A VM instance may only be deleted in Shutoff status.

To delete a VM instance:

  1. Navigate to the Compute > Instances view.

  2. From the displayed list, select the VM instance to be deleted. The selected VM instance details appear at the bottom of the window.

  3. If the VM instance is running, click Stop.

  4. In top toolbar, click Delete.

  5. The following appears: Are you sure you want to delete the VM?. Click OK.

Managing Networks for a VM Instance

VM instances cannot be created without a network, but networking changes can be made after creation. One network can be attached to numerous VM instances, and one VM instance can be attached to numerous networks.

Attaching Networks to VM Instances

  1. Navigate to the Networking > Networks Interfaces view.

  2. From the displayed list, select a network.

  3. In the top toolbar, click Attach.

  4. The Attach Network window is displayed with the VM instance list.

  5. Select the VM instance to which the network should be attached and click OK.

The selected VM instance is now attached to this network, in addition to the network to which it was attached during creation.

Detaching Networks from VM Instances

Before detaching a network from a running VM instance, it is recommended to stop the instance. The network can be detached using the Networking view or Compute view.

To detach network using the Networking view:

  1. Navigate to the Networking > Networks Interfaces view.

  2. From the displayed list, select a network.

  3. In the Networks view, select the VMs tab and then click Detach. The Network is detached from the current VM.

To detach network using the Compute GUI:

  1. Navigate to the Compute > Instance view.

  2. From the displayed list, select the VM instance to be detach from a network.

  3. In the Actions menu, select Detach. The VM instances will be detached from the network.

Adding Storage to VM Instances

During VM instance creation, volumes can be attached to a VM instance. If additional storage is required after VM instance creation, new volumes can be created and attached to the VM instance, or the boot volume size may be extended.

See the zCompute Volumes, Snapshots and Protection Groups overview video:

Create New Volumes

To create a new volume:

  1. Navigate to the Storage > Block Storage view.

  2. Click +.

  3. In the Create Volume window, enter volume name, description, volume type, size, and protection group.

  4. Click OK.

Adding Volumes

To attach an additional volume to a VM instance:

  1. Navigate to the Storage > Block Storage view.

  2. From the diplayed volume list, select the volume to attach to a VM instance.

  3. In the top toolbar, click Attach. The Attach icon is available only for unmapped volumes.

  4. In the Attach Volume window, select the VM instance to which the volume should be attached.

  5. Click OK.

  6. The VM instance must now be stopped and restarted. To stop the VM instance, navigate to Compute > Instances. Select the VM instance to be stopped and click Stop in the top toolbar.

  7. Once the VM instance is stopped, click Start.

Note

A maximum of 24 volumes can be attached to an instance.

Extend the size of the volume

The size of an existing volume can be extended after creation whether or not it is attached to a VM instance. This can be performed using either the GUI or CLI.

Using the GUI

  1. Navigate to the Storage > Block Storage view.

  2. From the displayed list, select the name of the volume to extend.

  3. In the More menu, click Extend.

  4. In the Extend Volume window, specify the new size of the volume in GB. Note: The size cannot be decreased.

  5. Click OK. The volume will be extended to its new size.

Using the CLI

  1. If the volume is not attached to a VM instance, it may be extended to a new size greater than the previous size by entering the following:

    volume extend volume_id size
    
  2. If the volume is attached to a VM instance, use the ‘vm resize’ command, as follows:

    vm resize vm_id [--volume-id VOLUME_ID] [--disk-size DISK_SIZE]
    

If the volume is attached to a VM instance, there is no need to stop and restart the VM instance after extension. Nevertheless, depending on the software application running on the VM instance, user action such as resizing partitions, logical volumes, and/or file systems may be necessary before the new capacity can be used.

Associating Security Groups with VM Instances

Security Groups can be associated with a VM instance after creation, in addition to the association included in the Create VM Instance wizard.

To associate a security group with a VM instance after creation:

  1. Navigate to the Compute > Instances view.

  2. From the displayed list, select a VM instance.

  3. Click More > Attach > Security Group.

  4. In the Attach Security Groups window, select the desired security group from the pull down list.

  5. Click OK. The VM instance is now associated with the selected security group.

Recovering Windows VM Instances

If storage or network drivers do not inject properly for a Windows-based VM instance which was imported from VMware or Hyper-V, the VM instance will not start properly (it will start in a blue screen). When this happens, the VM instance must first be recovered.

To recover a Windows VM Instance:

  1. Navigate to the Compute > Instances view.

  2. From the displayed list, select the VM instance to be recovered.

  3. Click More > Recovery Mode.

  4. Click OK in the VM Recovery confirmation window.

  5. The storage and network drivers will be installed on the VM instance.

  6. Click Start to restart the VM instance.