# Flavorless VMs with Hot-Plug

<code class="expression">space.vars.product\_name</code> supports creating flavorless VMs with hot plug capability that allows you to:

* Provision a VM with zero vCPUs and RAM in the VM flavor and define its resources when deploying the VM.
* Dynamically add or remove vCPU and RAM after a VM is powered on.

The flavorless VMs and hot-plug features provide admins more flexibility when sizing VMs, while maintaining the guardrails of standard flavors.

## Create a Hot-Plug Compatible Flavor

1. In the <code class="expression">space.vars.product\_name</code> UI, navigate to **Virtual Machines ▷ Flavors** and click **Create Flavor**.
2. **Name**: enter a descriptive name (for example, hotplug-small).
3. **Enable Hotplugging**: toggle **on**.
4. Set a **Disk** size.
5. *(Optional)* Add **Metadata** if you want PCD to place VMs on specific host aggregates.
6. Check the **Make Public** checkbox if you would like to make this flavor available to all tenants.
7. Click **Create Flavor**.

## Deploy a VM with a Hot Plug Flavor

1. Go to **Virtual Machines ▷ Virtual Machines** and click **Deploy New VM**.
2. **Step 1**
   * **Name**: enter a descriptive name for the VM.
   * **Boot VM From**: select the boot source for your VM
   * Next, choose the appropriate Image, Volume, or VM Snapshot to boot the VM from.
   * **Cluster**: select the cluster where you would like to deploy this VM.
3. **Step 2**
   * **Flavor Selection**: enable the **Hot-plug Compatible** toggle to filter the list.
   * Choose the hot-plug compatible flavor you created above.
   * In the **Hotplug RAM (MB)** and **Hotplug vCPUs** fields, enter the initial resources you need.
     1. **Hotplug RAM Maximum (MB)** and **Hotplug vCPUs Maximum** set the upper bound that the VM can grow to later.
4. **Step 3**
   * Assign the VM a network.
5. **Step 4**
   * Select the number of VMs to deploy, SSH key, cloud-init, and security group configuration, along with any metadata you might want to add to the VM.
   * Click Deploy Virtual Machine.

PCD deploys the VM with the requested resources even though the underlying flavor defines none.

## Resize a Running VM (Hot-plug)

1. Select a powered-on VM that was created with a hot-plug compatible flavor. Navigate to **▷** **Other** **Actions ▷ Hotplug**.
2. Enter the new **vCPU** and/or **RAM** value. These values must not exceed the \_\_maximums set at the time of creation.
3. Click **Hotplug VM**.

## Use Flavorless VM with CLI

To automate creation of flavorless VM using CLI, API or terraform provider, use the hot plug compatible flavor when creating the VM and use the following values for the metadata fields.

{% tabs %}
{% tab title="Bash" %}

```bash
{
    "HOTPLUG_MEMORY": "<specify memory in MB for the VM>",
    "HOTPLUG_MEMORY_MAX": "<provide a maximum for Memory in MB>",
    "HOTPLUG_CPU": "<specify number of VCPUs for the VM>",
    "HOTPLUG_CPU_MAX": "<provide a maximum for VCPUs>"
}
```

{% endtab %}
{% endtabs %}

## Limitations & Best Practices

* Hot-plug does **not** change the flavor itself; flavor metadata remains “0 CPU / 0 RAM”.
* Disk size **cannot** be resized via hot-plug.


---

# Agent Instructions: 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:

```
GET https://docs.platform9.com/private-cloud-director/2025.7/virtualized-clusters/deploying-workloads/flavorless-vms-with-hot-plug.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
