Instances: CloudStack

Description

Instances are virtual machines that have reservation of resources (cores, RAM, (root and data) volumes, network offering, storage offering, service offering).

Contents

Viewing Instances (by filters)

There are various filters using which you can sort and view instances. 

Perform the following steps to view instances:

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the "Filter by" drop down list and select an option to view the instances. The following options are provided:

    Field NameDescription
    AllLists all the instances. A domainadmin user can view all instances within the domain. A regular user can view instances associated to or created by the user.
    MineLists only the instances associated to or created by the currently logged in user. They could be in any state.
    RunningLists only the instances that are currently running. Note: You can Stop, Reboot, or Destroy a running instance.
    StoppedLists only the instances that are currently stopped. Note: You can Start or Destroy a stopped instance.
    DestroyedLists only the instances that are currently destroyed. Note: You can Restore or Expunge (permanently wipe) a destroyed instance.

     

    1. Based on your selection, the following information about instances is displayed:

      Field NameDescription
      NameDisplays the name of the instance. Note: You can click on individual instances to view additional information and perform various tasks on that instance.
      Display nameDisplays the display name of the instance. Note: This is an editable field.
      DomainDisplays the domain in which the instance is deployed.
      AccountDisplays the account to which the instance belongs
      StateDisplays the current state of the instance. The following states can display: Running, Stopped, Destroyed, Starting, Migrating, Stopping, Expunging and Error.
      QuickviewDisplays an overview of the instance, the tasks that can be performed on the instance, and a quick link to volumes, snapshots, affinity group, and hosts associated to the instance.

Creating, adding an Instance

Perform the following steps to add an instance:

  1. On the left panel, click Instances.
    The Instances page displays.
     
  2. Click + Add Instance. 
    The Add Instance wizard is launched.
     
  3. The zone is pre-selected and based on the location your Private Cloud is deployed (NL/US/DE).
    Select either a default template (pre-configured instance image) or an ISO to start an installation, and click Next. 
    To understand these options and accordingly select a value, these options are explained below. 

    Field NameDescription
    Select a zoneCurrently, LeaseWeb provides only 1 zone for each Private Cloud (domain).
    Select ISO or template
    TemplateProvides pre-configured, bootable operating systems for the instance. You can create templates yourself and some are provided out-of-the-box. You can view templates and select one in the next screen. The Featured tab contains prefab templates by LeaseWeb, the My Templates tabs contains templates made by the account which is logged in or which are made public by anyone in you Private Cloud (domain).
    ISOAllows you to attach an ISO (virtual DVD/CD) and, boot and install your instance from that CD. Any ISO can be chosen, also non bootable but for the purpose of creating an instance attaching a non bootable ISO makes no sense.
  4. Select a template/ISO for your virtual instance, and click Next.

    To understand them and accordingly select a template/ISO, the field names are explained below.

    Field NameDescription
    FeaturedLists all the templates that are provided out-of-the-box by LeaseWeb. You can select which template you want to use for the instance.
    CommunityLists all the templates configured and made publicly available by any user on the CloudStack platform for a particular zone.(we disabled this option because publicly available templates should not be created by customers but by LeaseWeb)
    My templatesLists all the templates that you as a user have created or that other domain accounts/users have made and opted to set the 'public' option
  5. Select a compute offering (pre-configured set of resources) to associate it with the instance, and click Next.

    The options display the pre-defined set of compute offerings provided out-of-the-box by LeaseWeb, and also the ones configured by you.

    Tip: Create a Compute Offering if you want a new compute offering for the instance.

    Compute offerings determine the number of allocated CPU cores, memory allocation, high availability, and so forth.

     

  6. If needed, select a disk offering to associate it with the instance, and click Next. 

    If you chose a template in step 1 then this template contains a certain amount of disk space for your root volume.
    If you chose an ISO in step 1 of the instance configurator then you MUST select a Data Disk Offering. The installation will use this Data Disk to install to.
    For instances created from a template this option allows you to add an additional virtual disk device to your instance with certain capacity. 

    Tip: Create a Disk Offering if you want a different disk offering for the instance.

    The options display the pre-defined set of disk offerings provided out-of-the-box by LeaseWeb, and also the ones configured by you. Disk offering determines the disk size, and so forth. The Custom radio button allows you to set your own disk size with a maximum of 5120GB and a minimum of 1 GB.

     

  7. Select the affinity group to which you want this instance to belong, and click Next.

    Affinity Groups are profiles define deployment behavior of associated instances. Currently we provide 'anti-affinity' policy which ensures that instances assigned to that anti-affinity profile are not deployed on the same host (physical server).
    This ensures that if a specific host goes down at least some instances assigned to that profile keep running.

    Tip: Create an Affinity Group if you want a different affinity group for the instance.

     

  8. Select or add a network to your instance, and click Next.

    To understand them and accordingly select a network, the field names are explained below.

    Field NameDescription
    VPCFor Virtual Private Cloud, by default, all networks within your infrastructure are displayed regardless if they belong to a VPC or if so regardless of which VPC they belong to.
    Networks

    Lists all the existing networks (based on your VPC selection of course). This section displays networks configured by you and (if acquired) the network(s) pre-configured by LeaseWeb (shared network offerings).
    Note: LeaseWeb can provides a public network that is directly connected to the Internet (shared network).
    You can select to attach multiple networks to one instance. Each added network will create a Virtual NIC on your instance. These NICs/networks will be listed under the NICs tab for you instance.
    One network must be the instance default network. You cannot detach a network from an instance if it is set as the default network . 

    Add NetworkAllows you to add a new isolated (private) network for your cloud infrastructure. Note: To add a network, select the "New" check box, enter a name, and select a network offering.
    Currently we offer two isolated (private) network offerings which are identical in properties apart from the Virtual Router. In one offering the virtual router is single per network in the dual virtual router setup there are two virtual routers (master and backup) for each network.
    To make this new network your default network, select the "Default" radio button.
    Note: in order to be able to create a new isolated network and associate it with the instance you need to have a free public IPv4 address available in the IP pool which is assigned to the isolated network type or network creation (and therefor instance creation) will fail.

     

     

     

  9. SSH key pair preparation of you instance


    If you created SSH key pairs under the Account section they will show up here. You can associate an ssh keypair with your instance allowing for easy login after instance creation. Provided the instance has the proper script inserted:
    https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Installation_Guide/using-sshkeys.html
     

  10. Enter a name to identify your instance, verify that the information you selected/entered in the wizard is correct, and click Launch VM.
    Upon launch the instance will be created and started automatically.

    The name you enter here will display as both Name and Display Name for the instance. If you do not enter a value, CloudStack will generate a unique name for the instance, and the Display Name field will be blank. 

    To update any information from this screen, click the "Edit" link. The relevant screen in the wizard will display.

  11. The newly created instance is added to the list in the Instances page. 
    The password for the newly created instance will be displayed in a dialog box.

    You need this password to gain access to the instance either through SSH or by logging in through Remote Desktop. It is recommended to save the password. It will not be displayed again. If you forget the password, you must Reset the Password.

    Notes

    -To have the ability to reset the instance password, the template that you select to create the instance must have the "cloud-set-guest-password" script file and the Password Enabled check box must be selected for the specific template upon template creation. 
    -If you are configuring the template yourself, you can find information on downloading the "cloud-set-guest-password" script file from the CloudStack Admin Guide
    -The templates that are provided by LeaseWeb are already 'password reset' functionality enabled.

Once an instance is created, depending on the state of the instance, you can perform the following tasks on them:
 

  • If the instance is in a "Running" state, you can Stop, Reboot, Destroy (with expunge), Attach ISO, Reset password, and Access console.
  • If the instance is in a "Stopped" state, you can Start, Destroy (with expunge), Change affinity, Edit, Attach ISO, Reset password, Change compute offering, Reset SSH key pair, Assign instance to other account. Some of these options depend on either being the owner of an instance or being a domainadmin or a regular user.
     
  • If the instance is in a "Destroyed" state, you can Recover or Expunge.


Stopping an Instance

To temporarily power off your instance, you can stop your instance. When you stop an instance, the resources of the instance are still reserved.

Perform the following steps to stop a running instance: 

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance name that you want to stop.
    The Details tab displays.
  3. Click the Stop Instance icon.
    The Stop Instance dialog box displays.

    Select the Force Stop check box if your instance is unresponsive and you need to change the state. This will force your instance to stop immediately. It is a non-graceful shutdown and all processing data will be lost.

  4. Click OK to confirm.  
    The status of the instance is changed to Stopped.

Windows Instances with VirtIO

Creating a new Windows Instance

If you are installing Windows on our Cloudstack Private Cloud it is recommended to include the VirtIO drivers during installation.
To do this you should mount the VirtIO driver ISO that we offer to your instance, or download the latest version from https://fedoraproject.org/wiki/Windows_Virtio_Drivers.

  1. Set the OS Type of your Windows ISO to Windows PV.
    When registering an ISO.


    On an already registered ISO.
  2. During installation it can’t find the disks due to missing drivers
  3. Now unmount the Windows ISO and mount the VirtIO ISO.


  4. Load the missing drivers from the VirtIO ISO.
  5. Swap back to the Windows ISO and continue the installation.

Updating an existing Windows Instance

If you already had a Windows installation it is recommended to install the VirtIO drivers.

To install the virtIO drivers follow the steps below.

  1. Mount the virtIO ISO to the instance.
  2. Create an additional disk of for example 5 GB, this disk will have virtIO by default.
  3. Attach the disk to the instance (select from drop down).
  4. Install all missing drivers for the unknown hardware in the device manager.
  5. Turn the instance off and change the OS Type to Windows PV.
     
  6. Turn the instance on and this should boot without issues.
  7. Now you can also install the drivers for the network card which now should also show as unknown hardware.

Rebooting an Instance

Perform the following steps to reboot an instance: 

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance name that you want to reboot.
    The Details tab displays.
     
  3. Click the Reboot Instance icon.
    A Confirmation dialog box appears. 
  4. Click YES to confirm.
    The instance is rebooted. 

Destroying an Instance

To totally remove an instance and free the resources allocated to it, you must destroy and expunge it.
It is important to understand the two step process which will lead to total removal:

By default once you destroy an instance, it will be set to destroyed state and will be retained for 3 days(72 hours exactly). You can revive the instance within this time by performing a 'restore' action. After 3 days, the instance is automatically expunged. The expunge process wipes the disk and reallocates the reserved resources for this instance.
If you are sure you want to get rid of an instance straight away you can opt for expunging it at destruction by selecting this option on destroy. 

Perform the following steps to destroy an instance: 

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance that you want to destroy.
    The Details tab displays.
     
  3. Click the Destroy Instance icon.
    A Confirmation dialog box displays. If immediate removal is necessary select the 'expunge' tick box.
    NB!: if you select expunge you will NOT be able to recover the instance or its data. (LeaseWeb cannot restore an expunged instance either! So think twice)
     
  4. Click YES to destroy the instance.
    The status of the instance is changed to Destroyed. 

    A instance in destroyed state can be restored by clicking the Restore Instance icon.
     

    Once restored, the status of the instance is displayed as Stopped. To run the instance again, click the Start Instance icon.

Resetting a Virtual Machine

This functionality is used to revert the instance settings back to the original deployment. Any configuration and data on the root volume will be lost. This task will discard the root disk attached to the instance. The additional disks will not be affected.

To reset an instance, the status of the instance should be either Running or Stopped.

Perform the following steps to reset an instance: 

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance name that you want to reset.
    The Details tab displays.
     
  3. Click the Reset VM icon.
    A Confirmation dialog box displays.
  4. Click YES to reset the the instance.

  5. The new password for the instance is displayed.

    You need this password to gain access to the instance either through SSH or by logging in to the Console. It is recommended to save the password. It will not be displayed again. If you forget the password, you must reset the password.

Attaching an ISO to an Instance

You can attach an ISO, i.e. a Live CD, to an instance to perform various rescue operations. You can access an attached ISO from the Console.

Perform the following steps to attach an ISO to an instance: 

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance name to which you want to attach an ISO.
    The Details tab displays.
     
  3. Click the Attach ISO icon.
    The Attach ISO dialog box displays.
     
  4. Select an ISO from the ISO drop-down list, and click OK.
    The ISO gets attached to the instance.

    To detach an ISO, click the Detach ISO icon. In the Confirmation dialog box, click YES.

Resetting Password for an Instance

If you have forgotten the password for an instance, you can reset it. 

To reset the root password for an instance, you must stop the instance. The template of your instance must have the "cloud-set-guest-password" script file, and the Password Enabled check box must be selected during creation of the template. The default templates that LeaseWeb provides include this script file and are prepared for reset password functionality.

If you are configuring the template yourself, you can find information on downloading the "cloud-set-guest-password" script file from the CloudStack Admin Guide. 

Perform the following steps to reset the password for an instance: 

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance for which you want to reset the password.
    The Details tab displays.
     
  3. Click the Reset Password icon.
    A confirmation dialog box displays.
  4. Click YES to reset the password.
    The new password is displayed. 

    You need this password to gain access to the instance either through SSH or by logging in to the Console. It is recommended to save the password. It will not be displayed again. If you forget the password, you need to reset it again.

Editing an Instance

To edit an instance, you must stop the instance.

Perform the following steps to edit an instance: 

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance that you want to edit.
    The Details tab displays.
     
  3. Click the Edit icon.
    The editable fields allow you to enter/select new values.
  4. Update the values and click Apply.
    The updated values display.

    Some of the editable fields are Display Name, OS Type, Dynamically Scalable, and Group.

Changing Service Offering for an Instance

You can select a different compute offering for the instance.

To change the compute offering, you must stop the instance.

Perform the following steps to change the compute offering for an instance:

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance name for which you want to change the compute offering.
    The Details tab displays.
     
  3. Click the Change service offering icon.
    The Change service offering dialog box displays.
     
  4. Select a compute offering from the drop-down list and click OK.
    The selected offering is applied to the instance.

Assigning an Instance to another Account

If you are a domainadmin, you can allocate instances to another account.   

On the left panel, click Instances.Perform the following steps to assign an instance to another account:

  1. The Instances page displays.
  2. Click the instance name that you want to assign to another account.
    The Details tab displays.
     
  3. Click the Assign Instance to Another Account icon.
    The Assign Instance to Another Account dialog box displays.
  4. Select a Domain, select the name of the account to which you want to assign the instance, and click OK.
     

Viewing the Console

There are multiple use cases when you need to access the Console. Some of them are:

  • When your instance is not reachable via a public IP address, so you cannot SSH or RDP to it directly. 
  • When your instance is inaccessible due to network configuration or firewall issues.
  • When you have an ISO attached and you need to access the Live CD.

Perform the following steps to to view/access the Console:

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance name for which you need to access the Console.
    The Details tab displays.
     
  3. Click the View console icon.
    The Console view displays.
     
  4. Hit enter to activate the screen and enter credentials to gain access to the Console.

    The menu bar of the Console contains the following options:

    Ctrl-Alt-DelLinux: It will reboot the instance. Windows: It will display the login screen.
    Ctrl-EscFunctional only for Windows.
    KeyboardFunctional only for Windows. It changes the keyboard layout.

Adding Network to the Virtual Machine

You can add multiple NIC`s/networks to your instance. Each network an instance is attached to will get its own virtual NIC.

Perform the following steps to add a network to an instance:

  1. On the left panel, click Instances.
    The Instances page displays.
  2. Click the instance name to which you want to add a network.
    The Details tab displays.
  3. Click the NICs tab, and click + Add network to VM.
     
  4. In the Add network to VM dialog box, select a network and click OK.
     
  5. The network is added to the list in the NICs tab. 
     

    From the NICs tab, you can remove a network, or set a network as the default network of the instance.
    Note: The network that you set as default cannot be removed.

    Depending on your operating system, the network interface which is created upon adding a new network will be automatically detected or not. If the operating system does not support hot plugin, you may have to reboot and/or configure the network interface manually.

 


Keywords
You can click on any of the keywords below this article to see all related articles for that keyword