Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
Summary

As of now, CloudStack has limited support for GPUs. It supports only Xenserver and some workarounds are possible with KVM but it has a lot of limitations.This feature allows the operator to discover the GPU devices on the host and create a Compute Offering with GPU support based on the available GPU devices on the host.Once the operator has created the Compute offering, it can be used by users to launch Instances with GPU devices. 

Limitations 

  • CloudStack assumes that the operator has configured the GPU devices correctly on the host. The role of CloudStack is just to discover the devices on the host and assign/unassign them to the VM.
  • Admins will need to build custom templates with GPU tools/drivers installed to have their users effectively use VMs with GPUs.
  • Apart from this, the following VM operations for GPUs, are unsupported (as of now):
    • VM snapshot with memory for GPU enabled VM is not supported.
    • Live Migration of GPU enabled VM is not supported. However, cold VM migration would be possible by stoping the VM, optionally migrating its disks and starting it on another  compatible GPU-enabled host. We have added framework level support for live migration of VMs with vGPUs, but we are unable to verify due to unavailability of hardware.
    • Dynamic scaling of VMs with GPU attached

...

Only the response for the transformer hook is used. The response for the start and stop hooks is ignored.

...

API & Schema Changes

We have added the following new tables:

  • gpu_card - This table contains the metadata of the physical GPU Card
  • vgpu_profile - This table contains the metadata for vGPU profiles which are allowed to be created by the vendor for a GPU Card.
  • gpu_device - This table contains information about the discovered gpu devices on a host and links them with GPU card & vgpu profile

Updates to exisiting tables:

  • service_offering
    • vgpu_profile_id - The vGPU profile to be used for the guest VM
    • gpu_count - number of gpu devices to attach to the guest VM
    • gpu_display - Whether to use the gpu cards as display on the guest vm

We have added the following new APIs:

GPU Card

  • createGpuCard - Allow creation of a GPU Card to store metadata

  • updateGpuCard - Update GPU card information
  • listGpuCards - List GPU cards
  • deleteGpuCard - Remvove GPU Card

vGPU Profiles

  • createVgpuProfile - Creates a vGPU profile for a GPU Card

  • updateVgpuProfile - Update the metadata for vGPU profile
  • listVgpuProfiles - List vGPU profiles
  • deleteVgpuProfile - Deletes a vGPU profile

GPU Devices

  • createGpuDevice - Allow creating of a custom GPU devices on a host
  • updateGpuDevice - Update GPU Device details
  • listGpuDevices - List GPU Devices
  • unmanageGpuDevice - Disables a GPU devices to be used from CloudStack

  • discoverGpuDevices - Discover GPU Devices on a host

  • manageGpuDevice - Enables a GPU device to be used from CloudStack

  • deleteGpuDevice - Deletes the GPU Device from CloudStack. Discovering the GPU devices may add the deleted GPU device again to the list.

Configuration Settings

The configuration settings changes below, are incorporated.

Configuration

Description

Default Value

Scope

gpu.detach.on.stop

Whether to detach GPU devices from VM on stop or keep them allocated

false

Domain

max.account.gpus

The default maximum number of GPU devices that can be used for an account

20

Global

max.domain.gpus

The default maximum number of GPU devices that can be used for a domain

20

Global

max.project.gpus

The default maximum number of GPU devices that can be used for a project

20

Global

Usage Instructions

As part of the GPU integration, we need to configure the GPU on the host and install or upgrade the CloudStack packages with GPU support.

...