Description
Supported Shielded VM images enable vTPM and integrity monitoring by default. Monitoring compares vTPM boot measurements with a baseline. Secure Boot checks that boot components have trusted signatures.
Potential impact
Disabling monitoring can hide changes to the boot sequence. Enabling Secure Boot with unsigned kernels or drivers can prevent the VM from starting.
Remediation
Enable enable_vtpm and enable_integrity_monitoring. Test image and driver compatibility before enabling enable_secure_boot. For an existing VM, plan downtime and recovery and change the settings while it is stopped. Restart it, check that it boots and review the integrity reports in Cloud Logging.
Examples
Both excerpts enable Secure Boot and vTPM on the same VM. Only enable_integrity_monitoring changes. Supply a compatible boot disk and network interface.
Before
resource "google_compute_instance" "vm" {
name = "primary-application-server"
machine_type = "e2-medium"
zone = "us-central1-a"
shielded_instance_config {
enable_secure_boot = true
enable_vtpm = true
enable_integrity_monitoring = false
}
}
After
resource "google_compute_instance" "vm" {
name = "primary-application-server"
machine_type = "e2-medium"
zone = "us-central1-a"
shielded_instance_config {
enable_secure_boot = true
enable_vtpm = true
enable_integrity_monitoring = true
}
}