Modifying the Behavior of an fGPU

You can specify whether a flexible GPU (fGPU) is automatically released from your account when the virtual machine (VM) it is attached to is terminated.

Modifying the Behavior of an fGPU Using Cockpit v2

  1. In the Flexible GPUs dashboard, check the box of the fGPU you want to modify the behavior.
    The fGPU is selected.

  2. Click IconEdit Update.
    The UPDATE FLEXIBLE FGPU dialog box appears.

  3. 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.

  4. Click Update.
    The behavior of the fGPU is modified.

Modifying the Behavior of an fGPU Using OSC CLI

The UpdateFlexibleGpu command modifies a flexible GPU (fGPU) behavior.

Request sample
$ osc-cli api UpdateFlexibleGpu --profile "default" \
    --FlexibleGpuId "fgpu-12345678" \
    --DeleteOnVmDeletion False

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.

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

The UpdateFlexibleGpu 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": {
    "DeleteOnVmDeletion": false,
    "FlexibleGpuId": "fgpu-12345678",
    "Generation": "v5",
    "ModelName": "nvidia-p100",
    "State": "allocated",
    "SubregionName": "eu-west-2a"
  }
}

Modifying the Behavior of an fGPU Using oapi-cli

The UpdateFlexibleGpu command modifies a flexible GPU (fGPU) behavior.

Request sample
$ oapi-cli --profile "default" UpdateFlexibleGpu \
    --FlexibleGpuId "fgpu-12345678" \
    --DeleteOnVmDeletion False

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.

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

The UpdateFlexibleGpu 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": {
    "DeleteOnVmDeletion": false,
    "FlexibleGpuId": "fgpu-12345678",
    "Generation": "v5",
    "ModelName": "nvidia-p100",
    "State": "allocated",
    "SubregionName": "eu-west-2a"
  }
}

Related Pages

Corresponding API Method