How to choose OS versions for your Cloud TPU on Google Cloud

Hey everyone,

When spinning up a TPU VM on Compute Engine, one of the first decisions you’ll make is whether to use a Google-managed public OS image or bring your own custom image.

Here is a quick breakdown of how both options work, supported versions, and the shared responsibility model if you decide to go custom.


1. Google-Managed OS Images

By default, every Google Cloud project has access to these public images. They come pre-configured with the TPU runtime, necessary drivers, and agents tuned for optimal TPU performance.

These images are based on Ubuntu. Here are the current managed OS images by TPU generation:

TPU Version OS Version Kernel Version Image Project Image Family
TPU7x (Ironwood) Ubuntu 24.04 LTS 6.8 ubuntu-os-accelerator-images ubuntu-accel-2404-amd64-tpu-tpu7x
v6e (Trillium), v5p Ubuntu 22.04 LTS 6.8 ubuntu-os-accelerator-images ubuntu-accel-2204-amd64-tpu-v5e-v5p-v6e

2. Custom OS Images

If managed images don’t fit your workflow, Compute Engine also supports custom OS images on TPU VMs.

Why consider a custom image?

  • Faster startup: Pre-bake custom software, libraries, and checkpoints to cut boot/initialization time.

  • Alternative OS: Run an OS distribution or release not supported out of the box.

  • Hardening & compliance: Implement custom kernel patches, corporate security tooling, or compliance configurations.


3. Shared Responsibility Model for Custom Images

Keep in mind that opting for a custom image shifts several operational duties to your team:

Feature Google’s Responsibility Your Responsibility
TPU Agents & Drivers Publish driver updates & release agents Install, configure, and maintain them
Compatibility Testing N/A Perform validation & performance testing
OS Maintenance N/A Handle OS updates, patches, and licensing

:light_bulb: Next Steps: If you plan on building your own Ubuntu-based image, check out our next post on how to use a custom OS image.

1 Like