Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
In diesem Dokument wird beschrieben, wie Sie die Optionen für Shielded VM in einer VM-Instanz aktivieren und deaktivieren. Informationen zu den Images, die Shielded VM-Features unterstützen, finden Sie unter Sicherheits-Features für Betriebssystem-Images.
Übersicht
Auf einer Shielded VM-Instanz werden die Optionen Virtual Trusted Platform Module (vTPM) und Integritätsmonitoring durch Compute Engine standardmäßig aktiviert. Wenn Sie das vTPM deaktivieren, deaktiviert Compute Engine die Integritätsmonitoring, da dieses auf Daten basiert, die vom Measured Boot erfasst werden.
Compute Engine aktiviert Secure Boot nicht standardmäßig, da nicht signierte Treiber und andere Software möglicherweise nicht kompatibel sind.
Secure Boot sorgt dafür, dass das System nur authentische Software ausführt, indem die Signatur aller Startkomponenten prüft und der Startvorgang angehalten wird, wenn die Signaturprüfung fehlschlägt. Dadurch wird verhindert, dass Formen von Kernel-Malware wie Rootkits oder Bootkits bei VM-Neustarts beibehalten werden. Google empfiehlt, Secure Boot zu aktivieren, wenn Sie dafür sorgen können, dass der Start einer repräsentativen Test-VM nicht verhindert wird, und sich diese für Ihre Arbeitslast eignet.
Beschränkungen
Obwohl Compute Engine-VM-Instanzen Secure Boot unterstützen, kann ein Image, das auf eine Compute Engine-VM geladen wird, möglicherweise nicht verwendet werden. Obwohl die meisten Linux-Distributionen Secure Boot auf aktuellen x86-Images unterstützen, wird es nicht immer auf ARM64 standardmäßig unterstützt.
Viele Linux-Images sind so konfiguriert, dass sie nicht signierte Builds von veralteten Kernel-Modulen nicht laden, wenn Secure Boot aktiviert ist. Das betrifft am häufigsten GPU-Treiber, aber manchmal auch Sicherheitsüberwachungstools, die Kernelmodule erfordern.
Erforderliche Berechtigungen für diese Aufgabe
Zum Ausführen dieser Aufgabe benötigen Sie die folgende Berechtigung:
compute.instances.updateShieldedInstanceConfig für die VM-Instanz
Shielded VM-Optionen in einer VM-Instanz ändern
Shielded VM-Optionen können Sie so ändern:
Console
Rufen Sie in der Google Cloud Console die Seite VM-Instanzen auf:
Klicken Sie auf den Instanznamen, um die Seite VM-Instanzdetails zu öffnen.
Klicken Sie auf stopBeenden, um die VM zu beenden. Wenn die Option Beenden nicht angezeigt wird, klicken Sie auf more_vertWeitere Aktionen >stopBeenden.
Wenn die Instanz nicht mehr ausgeführt wird, klicken Sie auf Bearbeiten.
Ändern Sie im Abschnitt Shielded VM die Shielded VM-Optionen:
Aktivieren Sie die Option Secure Boot aktivieren.
Compute Engine aktiviert Secure Boot nicht standardmäßig, da nicht signierte Treiber und andere Software möglicherweise nicht kompatibel sind. Google empfiehlt, Secure Boot möglichst zu aktivieren.
Deaktivieren Sie die Option vTPM aktivieren, um das vTPM (Virtual Trusted Platform Module) zu deaktivieren. Compute Engine aktiviert das vTPM (Virtual Trusted Platform Module) standardmäßig.
Deaktivieren Sie die Option Integritätsmonitoring aktivieren, um das Integritätsmonitoring zu deaktivieren. Compute Engine aktiviert das Integritätsmonitoring standardmäßig.
Klicken Sie auf Speichern.
Klicken Sie nun auf Starten, um die Instanz zu starten.
gcloud
Beenden Sie die Instanz:
gcloud compute instances stop VM_NAME
Ersetzen Sie VM_NAME durch den Namen der VM, die beendet werden soll.
Ersetzen Sie VM_NAME durch den Namen der VM, auf der Sie die Shielded VM-Optionen aktualisieren möchten.
shielded-secure-boot: Compute Engine aktiviert Secure Boot nicht standardmäßig, da nicht signierte Treiber und andere Software möglicherweise nicht kompatibel sind. Google empfiehlt, Secure Boot möglichst zu aktivieren.
Aktivieren Sie „Secure Boot“ mithilfe des Flags --shielded-secure-boot (empfohlen).
Deaktivieren Sie „Secure Boot“ mithilfe von --no-shielded-secure-boot.
shielded-vtpm: Das Virtual Trusted Platform Module (vTPM) ist standardmäßig aktiviert.
+ Aktivieren Sie mit --shielded-vtpm (Standard).
+ Deaktivieren Sie mit dem Flag --no-shielded-vtpm.
shielded-integrity-monitoring: Das Integritätsmonitoring ist standardmäßig aktiviert.
+ Aktivieren Sie mit --shielded-integrity-monitoring (Standard).
+ Deaktivieren Sie mit dem Flag --no-shielded-integrity-monitoring.
Starten Sie die Instanz:
gcloud compute instances start VM_NAME
Ersetzen Sie VM_NAME durch den Namen der VM, die gestartet werden soll.
REST
Beenden Sie die Instanz:
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/VM_NAME/stop
Ersetzen Sie Folgendes:
PROJECT_ID: Projekt mit der VM, die beendet werden soll.
PROJECT_ID: Projekt mit der VM, für die Shielded VM-Optionen aktiviert oder deaktiviert werden sollen.
ZONE: Zone, die die VM enthält, für die Shielded VM-Optionen aktiviert oder deaktiviert werden sollen.
VM_NAME: VM, für die Shielded VM-Optionen aktiviert oder deaktiviert werden sollen.
enableSecureBoot: Compute Engine aktiviert Secure Boot nicht standardmäßig, da nicht signierte Treiber und andere Software möglicherweise nicht kompatibel sind. Google empfiehlt, Secure Boot möglichst zu aktivieren.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-19 (UTC)."],[[["\u003cp\u003eShielded VM instances have vTPM and integrity monitoring enabled by default, while Secure Boot is not enabled due to potential compatibility issues with unsigned drivers.\u003c/p\u003e\n"],["\u003cp\u003eDisabling the vTPM will also disable integrity monitoring, as integrity monitoring relies on data from Measured Boot, which is associated with vTPM.\u003c/p\u003e\n"],["\u003cp\u003eSecure Boot helps ensure that only authentic software runs by verifying the signatures of all boot components, thus preventing kernel malware.\u003c/p\u003e\n"],["\u003cp\u003eTo modify Shielded VM options, the VM instance must be stopped, the options can then be toggled on the VM instance details page, by using gcloud, or by using API, after which the instance must be restarted.\u003c/p\u003e\n"],["\u003cp\u003ePermissions are required to update these options, requiring \u003ccode\u003ecompute.instances.updateShieldedInstanceConfig\u003c/code\u003e permissions on the VM instance.\u003c/p\u003e\n"]]],[],null,["# Modifying Shielded VM options on a VM instance\n\nThis document describes how to enable and disable the\n[Shielded VM](/compute/shielded-vm/docs/shielded-vm) options on a\nVM instance. To see which images support Shielded VM features,\nsee [OS image security features](/compute/docs/images/os-details#security-features).\n\nOverview\n--------\n\nOn a Shielded VM instance, Compute Engine enables the [virtual\nTrusted Platform Module (vTPM)](/compute/shielded-vm/docs/shielded-vm#vtpm) and\n[integrity monitoring](/compute/shielded-vm/docs/shielded-vm#integrity-monitoring)\noptions by default. If you disable the vTPM, Compute Engine\ndisables integrity monitoring because integrity monitoring relies on data\ngathered by [Measured Boot](/compute/shielded-vm/docs/shielded-vm#measured-boot).\n\nCompute Engine does not enable\n[Secure Boot](/compute/shielded-vm/docs/shielded-vm#secure-boot) by default\nbecause unsigned drivers and other low-level software might not be compatible.\nSecure Boot helps ensure that the system only runs authentic software by\nverifying the signature of all boot components and stopping the boot process\nif signature verification fails. This helps prevent forms of kernel malware,\nsuch as rootkits or bootkits from persisting across VM reboots. Google\nrecommends enabling Secure Boot if you can ensure that it doesn't prevent a\nrepresentative test VM from booting and if it is appropriate for your workload.\n\n### Limitations\n\nEven though Compute Engine VM instances support Secure Boot, an image\nloaded on a Compute Engine VM might not. Notably, although most Linux\ndistributions support Secure Boot on recent x86 images, it isn't always\nsupported by default on ARM64.\nMany Linux images are configured to refuse to load unsigned builds of out-of-tree kernel modules when Secure Boot is enabled. This most commonly affects GPU drivers, but also sometimes affects security monitoring tools that require kernel modules.\n\n#### Permissions required for this task\n\nTo perform this task, you must have the following [permissions](/iam/docs/overview#permissions):\n\n- `compute.instances.updateShieldedInstanceConfig` on the VM instance\n\nModifying Shielded VM options on a VM instance\n----------------------------------------------\n\nUse the following procedure to modify Shielded VM options: \n\n### Console\n\n1. In the Google Cloud console, go to the **VM instances** page.\n\n [Go to **VM instances**](https://console.cloud.google.com/compute/instances)\n2. Click the instance name to open the **VM instance details** page.\n\n3. Click stop **Stop**\n to stop the VM. If there is no **Stop** option, click\n more_vert **More actions \\\u003e** stop **Stop**.\n\n4. After the instance stops, click **Edit**.\n\n5. In the **Shielded VM** section, modify the Shielded VM options:\n\n - Toggle **Turn on Secure Boot** to enable Secure Boot.\n Compute Engine does not enable\n [Secure Boot](/compute/shielded-vm/docs/shielded-vm#secure-boot)\n by default because unsigned drivers and other low-level software\n might not be compatible. If possible, Google recommends enabling\n Secure Boot.\n\n - Toggle **Turn on vTPM** to disable the virtual trusted platform module\n (vTPM). By default, Compute Engine enables the [Virtual Trusted\n Platform Module (vTPM)](/compute/shielded-vm/docs/shielded-vm#vtpm).\n\n - Toggle **Turn on Integrity Monitoring** to disable integrity\n monitoring. By default, Compute Engine enables [integrity\n monitoring](/compute/shielded-vm/docs/shielded-vm#integrity-monitoring).\n\n6. Click **Save**.\n\n7. Click **Start** to start the instance.\n\n### gcloud\n\n1. Stop the instance:\n\n ```\n gcloud compute instances stop VM_NAME\n ```\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM to stop.\n2. Update the Shielded VM options:\n\n ```\n gcloud compute instances update VM_NAME \\\n [--[no-]shielded-secure-boot] \\\n [--[no-]shielded-vtpm] \\\n [--[no-]shielded-integrity-monitoring]\n ```\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM on which\n to update the Shielded VM options.\n\n `shielded-secure-boot`: Compute Engine does not\n enable [Secure Boot](/compute/shielded-vm/docs/shielded-vm#secure-boot)\n by default because unsigned drivers and other low-level software might\n not be compatible. If possible, Google recommends enabling Secure Boot.\n - Enable Secure Boot by using the `--shielded-secure-boot` flag (recommended).\n - Disable Secure Boot by using `--no-shielded-secure-boot`.\n\n `shielded-vtpm`: the\n [virtual trusted platform module (vTPM)](/compute/shielded-vm/docs/shielded-vm#vtpm)\n is enabled by default.\n + Enable by using `--shielded-vtpm` (default)\n + Disable by using the `--no-shielded-vtpm` flag\n\n `shielded-integrity-monitoring`:\n [integrity monitoring](/compute/shielded-vm/docs/shielded-vm#integrity-monitoring)\n is enabled by default.\n + Enable by using `--shielded-integrity-monitoring` (default)\n + Disable by using the `--no-shielded-integrity-monitoring` flag.\n3. Start the instance:\n\n ```\n gcloud compute instances start VM_NAME\n ```\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM to start.\n\n### REST\n\n1. Stop the instance:\n\n ```\n POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/VM_NAME/stop\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: project containing the VM to stop\n - \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: zone containing the VM to stop\n - \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e: the VM to stop\n2. Use\n [`instances.updateShieldedInstanceConfig`](/compute/docs/reference/rest/v1/instances/updateShieldedInstanceConfig)\n to enable or disable Shielded VM options on the instance:\n\n ```\n PATCH https://compute.googleapis.com/compute/projects/PROJECT_ID/zones/ZONE/instances/VM_NAME/updateShieldedInstanceConfig\n\n {\n \"enableSecureBoot\": {true|false},\n \"enableVtpm\": {true|false},\n \"enableIntegrityMonitoring\": {true|false}\n }\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project containing the VM to enable or disable Shielded VM options on.\n - \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: the zone containing the VM to enable or disable Shielded VM options on.\n - \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e: the VM to enable or disable Shielded VM options on.\n\n `enableSecureBoot`: Compute Engine does not enable\n [Secure Boot](/compute/shielded-vm/docs/shielded-vm#secure-boot) by\n default because unsigned drivers and other low-level software might\n not be compatible. If possible, Google recommends enabling Secure Boot.\n\n `enableVtpm`: Compute Engine enables the\n [Virtual Trusted Platform Module (vTPM)](/compute/shielded-vm/docs/shielded-vm#vtpm)\n by default.\n\n `enableIntegrityMonitoring`: Compute Engine enables\n [integrity monitoring](/compute/shielded-vm/docs/shielded-vm#integrity-monitoring)\n by default.\n3. Start the instance:\n\n ```\n POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/VM_NAME/start\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: project containing the VM to start\n - \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: zone containing the VM to start\n - \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e: VM to start\n\nWhat's next\n-----------\n\n- [Read more](/compute/shielded-vm/docs/shielded-vm) about the security features offered by Shielded VM.\n- Learn more about [monitoring integrity on a Shielded VM\n instance](/compute/shielded-vm/docs/integrity-monitoring)."]]