Allocating or Releasing an fGPU

You can allocate a flexible GPU (fGPU) to your account, and release it at any time.

Allocating an fGPU enables you to attach it to a virtual machine (VM). For more information, see Attaching or Detaching an fGPU.

Allocating or Releasing an fGPU Using Cockpit v2

Allocating an fGPU

  1. In the Flexible GPUs dashboard, click IconAddFull Allocate Flexible GPU.
    The ALLOCATE FLEXIBLE GPU dialog box appears.

  2. In the Flexible GPU model list, select the model of fGPU you want to allocate.

  3. In the Subregion list, select the Subregion for the fGPU.

  4. Check or uncheck the Release fGPU on VM deletion box:

    • If the box is checked, the fGPU is automatically released from your account when the VM it is linked to is terminated.

    • If the box is unchecked, the fGPU is unlinked and stays allocated to your account when the VM it is linked to is terminated.

  5. Click Allocate.
    The fGPU is allocated to your account.

Releasing an fGPU

Releasing an fGPU Linked to No VM

  1. In the Flexible GPUs dashboard, check the box of the fGPU you want to release from your account.
    The fGPU is selected.

  2. Click IconTerminate Release.
    A confirmation dialog box appears.

  3. Click Release.
    The fGPU is released from your account.

Releasing an fGPU Linked to a VM

  1. In the Flexible GPUs dashboard, check the box of the fGPU you want to release from your account.
    The fGPU is selected.

  2. Click IconTerminate Release.
    A confirmation dialog box appears.

  3. In the confirmation dialog box, type "RELEASE" in the text field and click Release.

    If the VM is still running, it will be stopped.

    The fGPU is released from your account.

Allocating or Releasing an fGPU Using OSC CLI

Allocating an fGPU

The CreateFlexibleGpu command allocates a flexible GPU (fGPU) to your account.
You can then attach this fGPU to a virtual machine (VM).

For more information, see About Flexible GPUs.

Request sample
$ osc-cli api CreateFlexibleGpu --profile "default" \
    --ModelName "nvidia-p100" \
    --Generation "v5" \
    --SubregionName "eu-west-2a" \
    --DeleteOnVmDeletion True

This command contains the following attributes that you need to specify:

  • DeleteOnVmDeletion: (optional) If true, the fGPU is deleted when the VM is terminated.

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • Generation: (optional) The processor generation that the fGPU must be compatible with. If not specified, the oldest possible processor generation is selected (as provided by ReadFlexibleGpuCatalog for the specified model of fGPU).

  • ModelName: The model of fGPU you want to allocate. For more information, see About Flexible GPUs.

  • SubregionName: The Subregion in which you want to create the fGPU.

The CreateFlexibleGpu command returns the following elements:

  • FlexibleGpu: Information about the flexible GPU (fGPU).

    • DeleteOnVmDeletion: If true, the fGPU is deleted when the VM is terminated.

    • FlexibleGpuId: The ID of the fGPU.

    • Generation: The compatible processor generation.

    • ModelName: The model of fGPU. For more information, see About Flexible GPUs.

    • State: The state of the fGPU (allocated | attaching | attached | detaching).

    • SubregionName: The Subregion where the fGPU is located.

    • VmId: The ID of the VM the fGPU is attached to, if any.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "FlexibleGpu": {
    "SubregionName": "eu-west-2a",
    "DeleteOnVmDeletion": true,
    "Generation": "v5",
    "ModelName": "nvidia-p100",
    "State": "allocated",
    "FlexibleGpuId": "fgpu-12345678"
  }
}

Releasing an fGPU

The DeleteFlexibleGpu command releases a flexible GPU (fGPU) from your account.
The fGPU becomes free to be used by someone else.

Request sample
$ osc-cli api DeleteFlexibleGpu --profile "default" \
    --FlexibleGpuId "fgpu-12345678"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • FlexibleGpuId: The ID of the fGPU you want to delete.

The DeleteFlexibleGpu command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Allocating or Releasing an fGPU Using oapi-cli

Allocating an fGPU

The CreateFlexibleGpu command allocates a flexible GPU (fGPU) to your account.
You can then attach this fGPU to a virtual machine (VM).

For more information, see About Flexible GPUs.

Request sample
$ oapi-cli --profile "default" CreateFlexibleGpu \
    --ModelName "nvidia-p100" \
    --Generation "v5" \
    --SubregionName "eu-west-2a" \
    --DeleteOnVmDeletion True

This command contains the following attributes that you need to specify:

  • DeleteOnVmDeletion: (optional) If true, the fGPU is deleted when the VM is terminated.

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • Generation: (optional) The processor generation that the fGPU must be compatible with. If not specified, the oldest possible processor generation is selected (as provided by ReadFlexibleGpuCatalog for the specified model of fGPU).

  • ModelName: The model of fGPU you want to allocate. For more information, see About Flexible GPUs.

  • SubregionName: The Subregion in which you want to create the fGPU.

The CreateFlexibleGpu command returns the following elements:

  • FlexibleGpu: Information about the flexible GPU (fGPU).

    • DeleteOnVmDeletion: If true, the fGPU is deleted when the VM is terminated.

    • FlexibleGpuId: The ID of the fGPU.

    • Generation: The compatible processor generation.

    • ModelName: The model of fGPU. For more information, see About Flexible GPUs.

    • State: The state of the fGPU (allocated | attaching | attached | detaching).

    • SubregionName: The Subregion where the fGPU is located.

    • VmId: The ID of the VM the fGPU is attached to, if any.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "FlexibleGpu": {
    "SubregionName": "eu-west-2a",
    "DeleteOnVmDeletion": true,
    "Generation": "v5",
    "ModelName": "nvidia-p100",
    "State": "allocated",
    "FlexibleGpuId": "fgpu-12345678"
  }
}

Releasing an fGPU

The DeleteFlexibleGpu command releases a flexible GPU (fGPU) from your account.
The fGPU becomes free to be used by someone else.

Request sample
$ oapi-cli --profile "default" DeleteFlexibleGpu \
    --FlexibleGpuId "fgpu-12345678"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • FlexibleGpuId: The ID of the fGPU you want to delete.

The DeleteFlexibleGpu command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Related Pages

Corresponding API Methods