Skip to main content

More Info:

Ensure that vTPM feature is enabled for your Vertex AI notebook instances

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS GCP

Triage and Remediation

Remediation

Using Console

Below are the console steps to ensure vTPM is enabled for Vertex AI notebook instances. vTPM is a Shielded VM feature; for many notebook types this is only settable at creation time, so you may need to recreate the instance.

1. Check whether vTPM is already enabled

  1. Go to Vertex AI Workbench
    • In the Google Cloud console, open:
      Navigation menu → Vertex AI → Workbench
  2. Identify your notebook:
    • You’ll see User-managed notebooks and/or Managed notebooks tabs.
  3. Open the instance details:
    • Click the notebook name → in the details pane, look for Shielded VM or Security info.
    • If the instance indicates vTPM (or “Shielded VM with vTPM / integrity monitoring”) is enabled, no further action is needed.
    • If not visible or disabled, plan to recreate the notebook with vTPM on.
For existing Workbench instances, Shielded VM/vTPM settings generally cannot be changed in place. You must create a new notebook instance with vTPM enabled.

2. Create a new Vertex AI notebook with vTPM enabled

A. Managed notebooks

  1. In the console, go to
    Navigation menu → Vertex AI → Workbench → Managed notebooks.
  2. Click New notebook (or Create notebook) and choose the image/type you need.
  3. In the creation page, expand Environment, then Advanced options or Security (the naming can differ slightly):
    • Look for Shielded VM options.
  4. Enable:
    • Turn on vTPM (or Virtual Trusted Platform Module (vTPM)).
    • Optionally also enable Integrity monitoring (recommended).
  5. Configure other settings (machine type, region, disk, etc.).
  6. Click Create.
Once created, the managed notebook VM will have vTPM enabled.

B. User-managed notebooks

  1. In the console, go to
    Navigation menu → Vertex AI → Workbench → User-managed notebooks.
  2. Click New notebook → select the image/framework and region/zone.
  3. On the creation page, expand Machine configuration or Security / Shielded VM section:
    • Check the box for Enable Shielded VM options if present.
    • Enable vTPM (sometimes presented as “Turn on vTPM”).
    • Optionally enable Integrity monitoring.
  4. Finish configuring instance details and click Create.

3. Migrate data / notebooks from old instance (if needed)

  1. Start both the old and new notebook instances.
  2. From JupyterLab (or SSH), copy:
    • Notebook files (.ipynb), scripts, and data from the old instance to:
      • A Cloud Storage bucket, or
      • Directly to the new instance using gsutil, scp, or Jupyter file upload.
  3. Once migration is confirmed, you can delete the old notebook instance.

These steps ensure that your Vertex AI Workbench notebook instances are created with vTPM enabled via the GCP console.
In Vertex AI Workbench, vTPM is controlled by the Shielded VM settings of the notebook instance. You cannot toggle vTPM on/off for an existing notebook; you must create (or recreate) the instance with vTPM enabled.Below are CLI steps for both User‑managed and Managed notebooks.

1. Identify notebook instances missing vTPM

List all Workbench instances in a region:
To inspect a specific instance’s Shielded VM config:
If enableVtpm: true is not present, vTPM is not enabled.

2. Recreate a User‑managed notebook with vTPM enabled

  1. Stop and delete the old instance (do not delete attached disks you need):
  1. Recreate a new instance with Shielded VM + vTPM:
Key flag: --shielded-vtpm (enables vTPM).If you have an existing persistent disk you want to attach, use the relevant --boot-disk-* flags when creating the instance (or recreate using the same config as the previous instance).

3. Recreate a Managed notebook with vTPM enabled

Managed notebooks are also backed by Shielded VMs; you must create them with vTPM:
Migrate your notebooks/code from the old managed instance to the new one, then delete the old instance.
If you share the output of gcloud notebooks instances describe for one of your current instances, I can give an exact gcloud notebooks instances create command matching its configuration but with vTPM enabled.
Below are concrete steps and a Python example to enable vTPM (Shielded VM) on Vertex AI Workbench (Vertex AI Notebooks) instances.Assumptions:
  • You’re using Vertex AI Workbench user-managed or managed notebooks (Notebooks API).
  • You have roles/notebooks.admin (or equivalent) and appropriate project permissions.
  • gcloud auth application-default login has been run or you’re running in a GCP environment with a service account.

1. Install and import the Notebooks client library


2. Helper: wait for long‑running operations


3. Stop the instance (must be TERMINATED to change Shielded settings)


4. Patch the instance to enable vTPM

For Vertex AI Workbench (Notebooks API), the Shielded VM config is under gce_setup.shielded_instance_config for Workbench instances, or vm_image/container_image for older ones. The common field in the Notebooks API is:
  • gce_setup.shielded_instance_config.enable_vtpm
If you get an error that gce_setup doesn’t exist (older notebook type), the path may instead be:
and you construct:
Use the one that matches your instance type (see the error message / object fields from client.get_instance).

5. Start the instance again


6. Full remediation script (single instance)


7. Verification (optional, via Python)

This pattern can be wrapped in a loop to remediate multiple instances.
Substitute:
  • VERTEX_NOTEBOOK_INSTANCE_NAME with your Vertex AI Workbench instance name.
  • REGION, PROJECT_ID, MACHINE_TYPE, BOOT_DISK_TYPE, BOOT_DISK_SIZE_GB, NETWORK_SELF_LINK_OR_NAME, SUBNETWORK_SELF_LINK_OR_NAME, and SERVICE_ACCOUNT_EMAIL with your values.
Changing shielded_instance_config.enable_vtpm from false to true may force replacement of the underlying VM, causing a brief outage when Terraform recreates the instance.For verification, terraform plan should show enable_vtpm changing from false (or being added) to true in the shielded_instance_config of google_workbench_instance.vertex_ai_notebook (and, if the provider marks it ForceNew, a planned -/+ replacement of the resource).