Managing Apache CloudStack Service Offerings

Description

There are two types of service offerings:

  • Compute Offering
  • Disk Offering

They define the compute/disk offering formats which can be used to create multiple instances. They determine the properties of the instance.


Contents

Viewing a Service Offering (by filter)

Perform the following steps to view a service offering:

  1. On the left panel, click Service Offerings.
    The Service Offerings page displays.
  2. Click the Select view drop-down list and select an option to view the service offering. The following options are provided:


    Field NameDescription
    Compute OfferingsDefines the specifications of a virtual machine created from the compute offering. Important features include defining the amount of RAM and CPU cores. You can add a compute offering from this page. Note: Leaseweb provides some pre-defined compute offerings out-of-the-box.
    Disk OfferingsDefines the specifications of a disk from which you can create a data volume. You can add disk offering from this page. Note: Leaseweb provides some pre-defined disk offerings out-of-the-box.
  3. Based on your selection, the following information is displayed:

    Compute Offering:

    Field NameDescription
    NameDisplays the name of the compute offering. Note: You can click on individual compute offerings to view additional information and perform various tasks.
    DomainDisplays the domain in which the compute offering is available.
    DescriptionDisplays a brief description of the compute offering (that was entered during the time of creation).
    Order

    Use the following icons to arrange the displays of compute offerings:

    Click this to move the compute offering to the top of the list.
    Click this to move the compute offering to the bottom of the list.
    Click this to move the compute offering a row above.
    Click this to move the compute offering a row below.
    Click this to drag and drop the compute offering to any position on the list.
    QuickviewDisplays an overview of the compute offerings and the tasks that can be performed on them.

    Disk Offering:

    Field NameDescription
    NameDisplays the name of the disk offering. Note: You can click on individual disk offerings to view additional information and perform various tasks.
    DescriptionDisplays a brief description of the disk offering (that was entered during the time of creation).
    Custom Disk SizeDisplays whether the disk offering allows you to customize the size of the disk. If it displays Yes, then during instance creation using this disk offering, you will get a slider using which you can adjust the disk size.
    Disk SizeDisplays the size of the disk for the disk offering.
    Order

    Use the following icons to arrange the display of disk offerings:

    Click this to move the disk offering to the top of the list.
    Click this to move the disk offering to the bottom of the list.
    Click this to move the disk offering a row above.
    Click this to move the disk offering a row below.
    Click this to drag and drop the disk offering to any position on the list.
    QuickviewDisplays an overview of the disk offerings and the tasks that can be performed on them.

Adding a Compute Offering

Perform the following steps to add a compute offering:

  1. On the left panel, click Service Offerings.
    The Service Offerings page displays.

  2. Click the Select view drop-down list and select Compute Offerings.
    The Compute Offerings page displays. 


  3. Click the +Add compute offering button.
    The Add compute offering dialog box displays.
     

  4. Enter the following information and click OK


    Field NameDescription
    NameEnter a name using which you can identify the compute offering.
    DescriptionEnter a description for the compute offering. This description will help you to identify the compute offering when you need to select one for creating an instance.
    Storage Type"Shared" is the only option. This ensures that the volume resides on the shared storage that is external to the hypervisor. If the hypervisor your instance is running on dies, it will not affect the data on the storage.
    Provisioning TypeThe "thin" provisioning  is the only option .Creating volume using  thin provisioning yields better storage capacity utilization efficiency.
    CustomIf the Custom field is checked,the end-user must fill in the desired values for number of CPU and RAM Memory when using a custom compute offering so below three input fields are hidden in the dialog box.
    CPU CoresEnter the number of CPU cores you want to assign to the compute offering. Once this compute offering is attached to an instance, the instance will have the assigned number of CPU cores available for processing.
    Memory (in MB)Enter the amount of RAM you want to assign to the compute offering (in MB).
    Network Rate (MB/s)Enter the limit for the network speed (in Mbps) of the compute offering.
    QoS Type

    Select a quality of service:

    Emptyno quality of service
    hypervisorrate limiting enforced on the hypervisor side
    storageguaranteed minimum and maximum IOPS enforced on the storage

    Note: Currently, Leaseweb does not support this functionality. So choices made here will have no effect.

    Offer HASelect this to enable high availability. Note: This ensures that if the hypervisor on which your instance is deployed dies, your instance will start on another hypervisor.
    VolatileSelect this check box to reset root disks of instances upon reboot. This is useful for secure environments that need a fresh start on every boot and for desktops that should not retain state. Note: On reboot, all data will be lost.
    GPUField to assign a physical GPU card to guest VM for graphics. Currently, Leaseweb does not support this functionality. So choices made here will have no effect.
    DomainYou can only select the name of your domain (resource pool).

Adding a Disk Offering

Perform the following steps to add a disk offering:

  1. On the left panel, click Service Offerings.
    The Service Offerings page displays.

  2. Click the Select view drop-down list and select Disk Offerings.
    The Disk Offerings page displays.
     

  3. Click the +Add Disk Offering button.
    The Add Disk Offering dialog box displays.
     

  4. Enter the following information and click OK


    Field NameDescription
    NameEnter a name using which you can identify the disk offering.
    DescriptionEnter a description for the disk offering. This description will help you to identify the disk offering when you need to select one for creating an instance.
    Storage TypeSelect the shared option. This ensures that the volume resides on the shared storage that is external to the hypervisor. If the hypervisor dies, it will not affect the data on the storage. Note: Do not select the local option. Currently, Leaseweb does not support this functionality. You can successfully create a disk offering by selecting the "local" option. However, you will not be able to create an instance by attaching this disk offering to it.
    Provisioning TypeThe "thin" provisioning  is the only option .Creating volume using  thin provisioning yields better storage capacity utilization efficiency.
    Custom Disk SizeSelect this check box to enable the slider (during configuring an instance) for setting the disk size. Note: If you select this, the Disk Size field will not display, else user can set own disk size
    Disk SizeEnter the size of the disk for the disk offering. Note: Ensure that it is within the limit of resources in your resource pool.
    QoS Type

    Select a quality of service:

    Emptyno quality of service
    hypervisorrate limiting enforced on the hypervisor side
    storageguaranteed minimum and maximum IOPS enforced on the storage

    Note: Currently, Leaseweb does not support this functionality. So choices made here will have no effect.

    Write-cache typeSelect the write caching mode to use for disks to be created for improving write performance. The possible values are No disk cache , Write-back disk cache and write through disk cache
    DomainSelect the name of your domain (resource pool).


Managing disk space using multiple disks and LVM or Disk Management

Data disks within our storage platform have a limited size of up to 1 terabyte (TB) per disk. Occasionally you will get to a point where more disk space for your database or web application is needed to keep operating. Using the Logical Volume Manager in Linux or Disk Management for Windows, you can increase the capacity by using logical volumes from multiple disks.

Linux

Creating volumes from a volume group with LVM

We will give you an example of how to create a logical volume of around 199 gigabytes that is recognized by the Linux OS, using two 100 gigabyte data disks from CloudStack and a CentOS or Ubuntu VM.

 Please see the following link on how to create data disks in the CloudStack dashboard.

https://kb.leaseweb.com/products/apache-cloudstack-private-cloud/managing-apache-cloudstack-storage

 After attaching the data disks to your VM in CloudStack, it takes some seconds for the VM to display the new disks as block devices.

To list all block devices on the VM, use the following command in a terminal:

 $ sudo lsblk

You see the 2 new devices show up as: vdb and vdc.

Now we will install Logical Volume Manager on the Virtual Machine:

For RHEL/ CentOS

$ sudo yum install lvm2

Type y and press Enter.


 For Debian/ Ubuntu

$ sudo apt-get install lvm2

Type y and press Enter.

LVM has been installed and we can continue adding the two data disks (vdb and vdc), seen by LVM as physical volumes.

 $ sudo pvcreate /dev/vdb /dev/vdc

Now we create a volume group within this case the name ‘group1’ from the added data disks in LVM:

$ sudo vgcreate group1 /dev/vdb /dev/vdc

 
From the volume group ‘group1’ we can start creating logical volumes. We will create a volume of 199 gigabytes named volume1:

$ sudo lvcreate --size 199G --name volume1 group1

The only thing left to do is setting up a filesystem for the OS to read and write on and mount the volume to a directory. In this example we create an EXT4 filesystem and mount the volume to /mnt/appdata

$ sudo mkfs.ext4 /dev/group1/volume1

The volume has been formatted in EXT4 format.

To use the volume, we have to mount the volume to a mountpoint.
In this example, we mount volume1 to /mnt/appdata.

$ sudo mount /dev/group1/volume1 /mnt/appdata

$ df -h

Managing LVM

Use these tools to manage disks in LVM:

-          $ lvscan
list all logical volumes

-          $ vgscan
list all volume groups

-          $ vgextend [path to device]
Extend the volume group with an additional physical volume

-          $ vgdisplay
Display total amount of disk space in volume group

For more tools see: https://linux.die.net/man/8/lvm 

Managing the disk space is done using tools in LVM. But keep in mind that your data is written to multiple disks, increasing the complexity of managing your infrastructure.

Next to that, adding an additional volume does not change the size of the root disk. You will have to move your database and/ or application data directory, to write to the new volume/ file path instead.

Migrating the entire OS to a new root disk on an active machine is very tricky and that is not advisable. In any case be sure to make and keep backups of your data to always be save when any form of data corruption or loss present itself.


Microsoft Windows

Create volumes with multiple disks in Windows

In Windows you get the ability to easily setup striped or mirrored volumes using Disk Management utility. With a striped volume setup, data is written in stripes on two or more disks which increases performance. A mirrored volume lets you create a setup where the same data is written to two or more disks. This creates a live copy of your data on multiple disks.

In this example we will create a volume of 200 gigabytes using two 100 gigabyte disks created in CloudStack.

Please see the following link on how to create data disks in the CloudStack dashboard: https://kb.leaseweb.com/products/apache-cloudstack-private-cloud/managing-apache-cloudstack-storage

After logging in on the Windows machine via the console or Remote Desktop, you need to start the program Computer Management and go to Disk Management.
The added disks are visible here, but still Offline and not yet initialized.

  1. Right-click on a disk and click Online to bring the disk online.


  2. Now initialize the disk by clicking on Initialize and Ok.


  3. Do the same for your second disk.
  4. Now right-click on the unallocated space of one of the two disks and click New Striped Volume
  5. The wizard starts, click Next.
  6. Add the second available disk to the Selected overview by selecting the disk under Available and clicking Add >. Now click Next.


  7. Assign a drive letter as desired and click Next.


  8. Format the volume according to your need (NTFS is most of the times the way to go) and click Next.


  9. Now you will see an overview of the setup, click Finish.
  10. The disks will now format and setup as a single volume of 200 gigabytes disk space.


Editing a Compute/Disk Offering

You cannot edit the out-of-the-box compute and disk offerings provided by Leaseweb.

Perform the following steps to edit a compute or disk offering: 

  1. On the left panel, click Service Offerings.
    The Service Offerings page displays.

  2. Click the Select view drop-down list and select Compute Offerings (or Disk Offerings—depending on what you want to edit).
    The Compute Offerings (or Disk Offerings) page displays. 

  3. Click the compute offering (or disk offering) that you want to edit.
    The Details tab displays.
     

  4. Click the Edit icon.
    The editable fields allow you to enter/select new values.

  5. Update the values and click Apply.
    The updated values display.

    The editable fields are Name and Description.

Deleting a Compute/Disk Offering

You cannot delete the out-of-the-box compute and disk offerings provided by Leaseweb.

Perform the following steps to delete a compute or disk offering: 

  1. On the left panel, click Service Offerings.
    The Service Offerings page displays.

  2. Click the Select view drop-down list and select Compute Offerings (or Disk Offerings—depending on what you want to delete).
    The Compute Offerings (or Disk Offerings) page displays. 

  3. Click the compute offering (or disk offering) that you want to delete.
    The Details tab displays.
     

  4. Click the Delete Service Offering icon.
    A Confirmation dialog box displays.

  5. Click Yes to delete the compute offering (or disk offering).
    The offering gets deleted from the list of offerings that display under the Service Offerings list.