Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Linux
Windows
Mit der Bulk-Erstellung von VM-Instanzen können Sie eine große Anzahl von identischen und voneinander unabhängigen VMs erstellen. Wenn Sie VMs im Bulk erstellen, haben Sie folgende Möglichkeiten:
API-Ratenbegrenzungen möglichst wenig in Anspruch nehmen: Anfragen zum Erstellen von VMs im Bulk unterliegen den API-Ratenbegrenzungen, als würden Sie eine einzelne VM erstellen.
VM-Erstellung auf mehrere Zonen in einer Region verteilen:
Bei regionalen Anfragen bestimmt Compute Engine die Zone, auf der die VMs basierend auf den Zonen mit verfügbarer Hardware erstellt werden sollen. Dabei werden die verfügbare Kapazität in den einzelnen Zonen sowie alle Ihre Reservierungen berücksichtigt.
Compute Engine verwaltet VMs, die Sie im Bulk erstellen, nicht. Verwenden Sie verwaltete Instanzgruppen, um eine Gruppe verwalteter VMs zu erstellen.
VMs im Bulk oder API-Batchanfragen erstellen
Das Erstellen von VMs im Bulk unterscheidet sich vom Batching von API-Anfragen mit der Methode instances.insert. In der folgenden Tabelle werden diese beiden Möglichkeiten zum Erstellen mehrerer VMs verglichen:
Funktionen
API-Batchanfragen
VMs im Bulk erstellen
Zonenauswahl
Automatische Auswahl anhand von Überlegungen wie Ressourcenverfügbarkeit und Kontingent
Manuell
Automatisch bei Verwendung des regionalen Endpunkts
Vorabvalidierung
Anfrage schlägt sofort fehl, wenn sie nicht möglich ist
Nein
Mit Kapazität und Kontingent
Generierung des VM-Namens
Basierend auf einem angegebenen Namensmuster automatisch generiert
Manuell
Optional automatisch generiert
Automatisches Rollback
Anfrage wird automatisch zurückgesetzt, falls die Zielanzahl von VMs nicht von Compute Engine erstellt werden kann
Nein
Optional aktiviert
API-Ratenbegrenzung
Auswirkungen von Anfragen auf die API-Ratenbegrenzung
Eine Anfrage für jede VM
Eine Anfrage für jeden Bulk-Vorgang
Beschränkungen
Die folgende Liste beschreibt die Einschränkungen, die beim Erstellen von VMs im Bulk gelten:
Vom Kunden bereitgestellte Verschlüsselungsschlüssel: Sie können keine VMs mit Laufwerken erstellen, die durch vom Kunden bereitgestellte Verschlüsselungsschlüssel (CSEK) geschützt sind.
Für die Laufwerke müssen die standardmäßigen oder vom Kunden verwalteten Verschlüsselungsschlüssel von Google verwendet werden.
Bootlaufwerke aus Snapshots Sie können keinen Snapshot verwenden, um die Bootlaufwerke für die VMs zu erstellen. Verwenden Sie stattdessen ein benutzerdefiniertes Image, wenn Sie VMs im Bulk erstellen.
Globales DNS. Wenn Sie globales DNS verwenden, kann es zu Namenskonflikten kommen, da der voll qualifizierte Domainname (FQDN) die Zone nicht enthält. Das können Sie mit zonalem DNS vermeiden. Wenn Sie nicht zu zonalem DNS wechseln können, vermeiden Sie die Verwendung desselben Namensmusters in verschiedenen Regionen. Weitere Informationen finden Sie unter Typen von internen DNS-Namen.
Maschinen-Images Sie können keine VMs aus Maschinen-Images erstellen.
Anzahl der VMs Sie können für jeden Aufruf bis zu 5.000 VMs erstellen. Außerdem können Sie maximal 8.000 Instanzen gleichzeitig erstellen. Dieses Limit für gleichzeitige Vorgänge wird zwischen instances.insert und instances.bulkInsert aufgeteilt.
VM-Attribute. Alle VM-Attribute mit Ausnahme der Namen und der benutzerdefinierten Hostnamen müssen identisch sein. Sie können keine VM-Attribute verwenden, die sich zwischen VMs überschneiden. Dazu gehören unter anderem benutzerdefinierte Hostnamen, statische externe IP-Adressen und statische interne IP-Adressen.
Audit-Logs
Compute Engine protokolliert Informationen zur VM-Erstellung im Bulk im Audit-Log für Administratoraktivitäten, wenn Sie den API-Aufruf ausführen und der API-Aufruf abgeschlossen wird.
Compute Engine erstellt auch separate Audit-Logs für jede VM. Sie finden das Audit-Log für eine einzelne VM, indem Sie den Wert von protoPayload.resourceName mit dem durch das Benennungsmuster generierten VM-Namen abgleichen, den Sie mit der Anfrage angeben.
Preise
Für die Verwendung der VM-Erstellung im Bulk fallen keine zusätzlichen Gebühren an. Die Abrechnung beginnt wie beim Erstellen einzelner VMs, wenn Sie die VMs erstellen.
VMs, die von Compute Engine nicht erstellt werden können, werden Ihnen nicht in Rechnung gestellt.
[[["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-18 (UTC)."],[[["\u003cp\u003eBulk VM creation allows for the creation of numerous identical and independent virtual machines with a single API request, effectively minimizing API rate limit consumption.\u003c/p\u003e\n"],["\u003cp\u003eWhen creating VMs in bulk, Compute Engine can automatically distribute the VMs across multiple zones within a region, optimizing for resource availability and honoring any existing reservations.\u003c/p\u003e\n"],["\u003cp\u003eUnlike batching API requests, bulk VM creation offers automatic zone selection, upfront validation of requests, optional automatic VM name generation, and the possibility of automatic rollback if VM creation fails.\u003c/p\u003e\n"],["\u003cp\u003eThere are limitations to bulk VM creation, such as not supporting customer-supplied encryption keys, boot disks from snapshots, machine images, sole-tenant nodes, and requiring most VM properties to be identical.\u003c/p\u003e\n"],["\u003cp\u003eUsing bulk VM creation does not incur additional charges, and billing only starts upon successful VM creation; additionally, audit logs are provided for both the bulk operation and individual VMs.\u003c/p\u003e\n"]]],[],null,["# About bulk creation of VMs\n\nLinux Windows\n\n*** ** * ** ***\n\nBulk creation of virtual machine (VM) instances lets you create a large number\nof VMs that are identical and independent from each other. When you create VMs\nin bulk, you can do the following:\n\n- **Minimize consumption of API rate limits.** Requests for creating VMs in bulk\n consume [API rate limits](/compute/docs/api-rate-limits) as if you were\n creating a single VM.\n\n- **Distribute VM creation across multiple zones in a region.**\n For regional requests, Compute Engine determines the zone to create\n the VMs in based on the zones that have available hardware, taking into\n consideration the available capacity in each zone, as well as any of your\n [reservations](/compute/docs/instances/choose-reservation-type).\n\nCompute Engine doesn't manage VMs that you create in bulk. To create a\ngroup of managed VMs, use [managed instance groups](/compute/docs/instance-groups).\n\nCreating VMs in bulk versus batching API requests\n-------------------------------------------------\n\nCreating VMs in bulk is different from [batching API\nrequests](/compute/docs/api/how-tos/batch) with the [`instances.insert`\nmethod](/compute/docs/reference/rest/v1/instances/insert). The following table\ncompares these two ways of creating multiple VMs:\n\nLimitations\n-----------\n\nThe following list describes the limitations that apply when creating VMs in\nbulk:\n\n- **Customer supplied encryption keys.** You can't create VMs that have disks\n that are protected by [customer-supplied encryption keys (CSEK)](/compute/docs/disks/customer-supplied-encryption).\n The disks must use Google-default or customer-managed encryption keys.\n\n- **Boot disks from snapshots.** You can't use a snapshot to create the boot disks\n for the VMs. Instead, use [a custom image](/compute/docs/images/create-custom#create_image)\n when you create VMs in bulk.\n\n- **Global DNS.** If you are using global DNS, there might be name conflicts\n because the fully qualified domain name (FQDN) doesn't contain the zone. To\n avoid this, use zonal DNS. If you cannot switch to zonal DNS, avoid using the\n same name pattern across different regions. For more information, see [Types\n of internal DNS names](/compute/docs/internal-dns#instance-fully-qualified-domain-names).\n\n- **Machine images.** You cannot create VMs from [machine\n images](/compute/docs/machine-images).\n\n- **Number of VMs.** You can create up to 5,000 VMs with each call. Also, you\n can create a maximum of 8,000 instances simultaneously at any time. This\n simultaneous operation limit is shared between\n [`instances.insert`](/compute/docs/reference/rest/v1/instances/insert) and\n [`instances.bulkInsert`](/compute/docs/reference/rest/v1/instances/bulkInsert).\n\n- **Sole-tenant nodes.** You cannot create VMs that use\n [sole-tenant node affinity labels](/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity).\n\n- **VM properties.** All [VM properties](/compute/docs/instances/update-instance-properties),\n except their names and custom hostnames, must be identical. You cannot use\n VM properties that are mutually exclusive between VMs, which include but\n are not limited to static external IP addresses and static internal IP addresses.\n\nAudit logs\n----------\n\nCompute Engine logs information about the bulk VM creation to the\n[Admin Activity audit log](/logging/docs/audit#admin-activity) when you make the\nAPI call and when the API call completes.\n\nCompute Engine also creates separate audit logs for each VM. You can\nfind the audit log for a single VM by matching the value of\n`protoPayload.resourceName` with the VM name generated by the naming pattern\nthat you specify with the request.\n\nPricing\n-------\n\nThere are no additional charges for using bulk VM creation. As with creating\nsingle VMs, billing begins when you create the VMs.\n\nYou are not billed for any VMs that Compute Engine fails to create.\n\nWhat's next\n-----------\n\n- [Create VMs in bulk](/compute/docs/instances/multiple/create-in-bulk)"]]