Enable or disable VM Runtime on Google Distributed Cloud

On Google Distributed Cloud connected, you can enable or disable VM Runtime on GDC.

VM Runtime on GDC is enabled by default on Distributed Cloud connected clusters versions 1.9.0 and higher. If you don't need to run virtual machine (VM) workloads, you can disable VM Runtime on GDC to free up resources on your nodes. You can also re-enable it if it was previously disabled.

Before you begin

To enable or disable VM Runtime on GDC, you need the following:

  • A Distributed Cloud connected cluster.
  • The Identity and Access Management permissions roles/edgecontainer.admin on the target project.

To use the API and to follow the verification instructions, you also need:

Disable VM Runtime on GDC

You can disable VM Runtime on GDC using the Google Cloud console or the API.

Console

  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

  2. Select the cluster that you want to modify.

  3. Click Edit.

  4. In the System Add-ons or VM Service section, disable the VM Runtime toggle.

  5. Click Save or Update.

API

To disable VM Runtime on GDC, make a PATCH request to the projects.locations.clusters method.

Specify the updateMask query parameter as systemAddonsConfig.vmServiceConfig.vmmEnabled.

PATCH https://edgecontainer.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID?updateMask=systemAddonsConfig.vmServiceConfig.vmmEnabled
Content-Type: application/json

{
      "systemAddonsConfig": {
        "vmServiceConfig": {
          "vmmEnabled": false
        }
      }
}

Replace the following:

  • PROJECT_ID: the ID of the target project
  • REGION: the Google Cloud region where your cluster is located
  • CLUSTER_ID: the ID of your cluster

Enable VM Runtime on GDC

VM Runtime on GDC is enabled by default for Distributed Cloud connected clusters. If you previously disabled VM Runtime on GDC, you can use the following instructions to re-enable it.

Console

  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

  2. Select the cluster that you want to modify.

  3. Click Edit.

  4. In the System Add-ons or VM Service section, enable the VM Runtime toggle.

  5. Click Save or Update.

API

To enable VM Runtime on GDC, make a PATCH request to the projects.locations.clusters method.

Specify the updateMask query parameter as systemAddonsConfig.vmServiceConfig.vmmEnabled.

PATCH https://edgecontainer.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID?updateMask=systemAddonsConfig.vmServiceConfig.vmmEnabled
Content-Type: application/json

{
      "systemAddonsConfig": {
        "vmServiceConfig": {
          "vmmEnabled": true
        }
      }
}

Replace the following:

  • PROJECT_ID: the ID of the target project
  • REGION: the Google Cloud region where your cluster is located
  • CLUSTER_ID: the ID of your cluster

Check the VM Runtime on GDC status

You can check the status of VM Runtime on GDC on your cluster.

  1. To obtain credentials for your cluster, run the gcloud edge-cloud container clusters get-credentials command.

    gcloud edge-cloud container clusters get-credentials CLUSTER_ID \
        --project=PROJECT_ID \
        --location=REGION
    

    Replace the following:

    • CLUSTER_ID: the ID of your cluster
    • PROJECT_ID: the ID of the target project
    • REGION: the Google Cloud region where your cluster is located
  2. To describe the VMRuntime custom resource, run the kubectl describe command:

    kubectl describe vmruntime vmruntime
    
    • If VM Runtime on GDC is enabled, the command returns details about the resource, and VMRuntime.Status.Ready shows as true.

    • If VM Runtime on GDC is disabled, the VMRuntime resource might not be found, or its status indicates that it's not ready.