> For the complete documentation index, see [llms.txt](https://docs.platform9.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform9.com/private-cloud-director/gpu/gpu-support-pcd/create-gpu-enabled-flavors.md).

# Create GPU Enabled Flavors

After configuring passthrough GPU or vGPU hosts, create GPU enabled flavors and deploy virtual machines with dedicated GPU access.

#### Step 1: Create GPU flavors

Create VM flavors that include either passthrough GPU or vGPU specifications. Users select these flavors when deploying VMs that need exclusive GPU access.

1. Navigate to **Virtual Machines** > **Flavors** in the product\_acronym console.
2. Select **Create Flavor**.
3. Enter a **Name** for your flavor (for example, "gpu-passthrough-l4-large").
4. Configure the basic resources:

* **vCPUs**: Number of virtual CPUs
* **RAM**: Amount of memory in MB
* **Disk**: Storage size in GB

5. Toggle **Enable GPU** to **On**.
6. You can select either:

* **GPU Mode**: **Passthrough**.
* **GPU Mode: vGPU**.

7. If you choose **GPU Mode**: **Passthrough:**

* Select the **GPU Model** that matches your host configuration.
* Set **Number of GPUs** to 1 or more. For passthrough mode, each VM gets exclusive access to the specified number of physical GPUs.

8. If you choose **GPU Mode: vGPU**

* Select the **Host OS Version** that matches the hosts in your target cluster: **Ubuntu 22**, **Ubuntu 24**, or **Rocky**.
* Set the **SR-IOV** toggle to match how vGPU is configured on those hosts.
* Select a **vGPU Trait** or a **Resource Class**, depending on the host OS and SR-IOV combination. See vGPU flavor selectors.
* Set **Number of vGPUs**. To assign more than one vGPU to a single VM, see Assign multiple vGPUs to a VM — on some host OS and SR-IOV combinations this field alone is not sufficient.

9. Select **Create Flavor**.

Your GPU flavor is now available for VM deployment.

### vGPU flavor selectors

For vGPU flavors, the selector field shown in the **Create Flavor** dialog depends on the **Host OS Version** and the **SR-IOV** toggle.

| Host OS Version | SR-IOV | Selector field            | Notes                                                       |
| --------------- | ------ | ------------------------- | ----------------------------------------------------------- |
| Ubuntu 22       | On     | **vGPU Trait** (optional) | Select a trait to pin the flavor to a specific vGPU profile |
| Ubuntu 22       | Off    | **Resource Class**        | `CUSTOM_NVIDIA_*` value                                     |
| Ubuntu 24       | On     | **Resource Class**        | `CUSTOM_NVIDIA_*` value                                     |
| Ubuntu 24       | Off    | —                         | Not a valid combination. vGPU on Ubuntu 24 requires SR-IOV  |
| Rocky           | On     | **Resource Class**        | `CUSTOM_NVIDIA_*` value                                     |
| Rocky           | Off    | **Resource Class**        | `CUSTOM_NVIDIA_*` value                                     |

{% hint style="info" %}
**NOTE**

vGPU on Ubuntu 24 hosts uses `type-vf` (SR-IOV virtual function passthrough), which requires SR-IOV. Leave the **SR-IOV** toggle on when you select **Ubuntu 24**.
{% endhint %}

#### vGPU Trait

On Ubuntu 22 hosts with SR-IOV enabled, the dialog shows a **vGPU Trait (Optional)** dropdown.

The trait is optional. Leave it unset and the flavor matches any vGPU profile available on the hosts in the cluster. Select a trait to pin the flavor to a **specific vGPU profile** — use this when the cluster contains hosts configured with different vGPU profiles and the workload requires a particular one.

The dropdown is populated from the vGPU profiles that hosts in your environment are currently reporting. If it shows **No vGPU Trait (Optional) available**, no host is reporting vGPU profile inventory. Confirm that:

* At least one host is authorized into a GPU-enabled cluster with GPU mode set to **vGPU**.
* A vGPU profile is configured on that host under **Infrastructure > GPU Hosts**.
* The host is reporting vGPU inventory. See vGPU Inventory Troubleshooting and Multiple vGPU per VM.

#### Resource Class

For all other supported combinations, the dialog shows a **Resource Class** dropdown.

Resource class names follow the format `CUSTOM_NVIDIA_<vgpu-type-id>`, where the ID is the NVIDIA vGPU type configured on the host — for example, `CUSTOM_NVIDIA_914`. Each value corresponds to a vGPU profile reported by the hosts in your environment.

Select the resource class matching the vGPU profile configured on the hosts in your target cluster. Always select from the dropdown rather than constructing the name by hand, so the value matches reported inventory exactly. As with traits, an empty dropdown means no host is reporting a vGPU profile.

### Assign multiple vGPUs to a VM

How you request more than one vGPU for a single VM depends on the **Host OS Version** and **SR-IOV** combination.

| Host OS Version | SR-IOV | How to request multiple vGPUs                       |
| --------------- | ------ | --------------------------------------------------- |
| Ubuntu 24       | On     | Set **Number of vGPUs** in the Create Flavor dialog |
| Rocky           | On     | Set **Number of vGPUs** in the Create Flavor dialog |
| Ubuntu 22       | On     | Add flavor metadata manually — see below            |
| Ubuntu 22       | Off    | Add flavor metadata manually — see below            |
| Rocky           | Off    | Add flavor metadata manually — see below            |

#### Using the Number of vGPUs field

On Ubuntu 24 and Rocky hosts with SR-IOV enabled, set **Number of vGPUs** to the required count when you create the flavor. No further configuration is needed.

#### Adding flavor metadata manually

On Ubuntu 22 hosts (with or without SR-IOV) and on Rocky hosts without SR-IOV, the **Number of vGPUs** field does not produce a working multi-vGPU flavor. Each vGPU must be requested as a separate numbered resource group in the flavor's metadata.

1. Create the vGPU flavor as described in Step 1, leaving **Number of vGPUs** at `1`.
2. Navigate to **Virtual Machines > Flavors** in the <code class="expression">space.vars.product\_acronym</code> console.
3. Select your flavor and edit its metadata.
4. Add one `resourcesN:` entry per vGPU, plus the group policy. For a VM with two vGPUs using vGPU type `914`:

| Key                            | Value     |
| ------------------------------ | --------- |
| `resources1:CUSTOM_NVIDIA_914` | `1`       |
| `resources2:CUSTOM_NVIDIA_914` | `1`       |
| `group_policy`                 | `isolate` |

5. Save the flavor.

Increment the group number for each additional vGPU — a four-vGPU flavor uses `resources1:` through `resources4:`. Substitute the vGPU type ID configured on your hosts for `914`.

{% hint style="warning" %}
**`group_policy=isolate` is required.** It forces each numbered resource group to be satisfied by a different resource provider, so the VM receives its vGPUs from separate virtual functions. Without it, the request can be satisfied from a single provider and the VM does not receive the expected number of vGPUs.
{% endhint %}

{% hint style="info" %}
**NOTE**

The host must have enough free vGPU capacity to satisfy every group. A two-vGPU flavor requires two available vGPU slices of the specified type on a single host. Check available capacity under **Infrastructure > GPU Hosts.**
{% endhint %}

#### Step 2: Deploy VMs with passthrough or vGPU support

Deploy virtual machines with exclusive GPU access using passthrough or vGPU flavors.

1. Navigate to **Virtual Machines** in the <code class="expression">space.vars.product\_acronym</code> console.
2. Select **Create VM** and then on **Name** enter a name for your VM.
3. Select **Boot VM From** the list.
4. Select a **GPU-enabled cluster** with GPU mode from the cluster dropdown.
5. Select **GPU flavor** from the flavor dropdown.
6. Configure the VM settings:

* **Network**: Configure network settings as needed.
* **VM Spec**: Configure additional specifications for your VM.

6. Select **Deploy VM**.

You may be required to wait for the VM to deploy. The system validates that the selected GPU flavor has available capacity on the host. After the VM is successfully deployed, your VM is now running with shared GPU access.

{% hint style="info" %}
**NOTE**

For vGPU choose an image with GPU **GRID GUEST** drivers pre-installed, or plan to install drivers after VM creation to utilize GPU acceleration for your workloads.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.platform9.com/private-cloud-director/gpu/gpu-support-pcd/create-gpu-enabled-flavors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
