Delete Dynamic Network Interfaces from an instance
This page describes how to delete a Dynamic Network Interface (NIC) from an existingCompute Engine instance.
For an overview of multiple network interfaces, seeMultiple network interfaces.
To view an instance's existing network interfaces, seeView network interfaces for an instance.
Delete a Dynamic NIC from an instance
This section describes how to delete a Dynamic NIC from an instance.
To preventa possibleerror when deleting a Dynamic NIC by instance update,don't delete Dynamic NICs from individual instances by updatinginstance properties.
Console
In the Google Cloud console, go to theVM instances page.
Click the name of the instance for which you want to delete aDynamic NIC.
On the instance details page, clickEdit.
In theDynamic Network Interfaces section, locate theDynamic NIC that you want to delete.
To delete the Dynamic NIC,clickDelete.
To save your configuration, clickSave.
gcloud
To delete a Dynamic NIC from an existing instance, use theinstances network-interfaces delete command.
gcloud compute instances network-interfaces deleteINSTANCE_NAME \ --zone=ZONE \ --network-interface=DYNAMIC_NIC_NAME
Replace the following:
INSTANCE_NAME: the name of the instance to createZONE: the zone of the instanceDYNAMIC_NIC_NAME: the name of the Dynamic NICto delete, such asnic0.2
API
To delete a Dynamic NIC from an existing instance, use theinstances.deleteNetworkInterface method.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/deleteNetworkInterface?networkInterfaceName=DYNAMIC_NIC_NAME
Replace the following:
PROJECT_ID: the ID of the project that containsthe instanceZONE: the zone that contains the instanceINSTANCE_NAME: the name of the instance to delete theDynamic NIC fromDYNAMIC_NIC_NAME: the name of the Dynamic NICto delete, such asnic0.2
Delete a Dynamic NIC from instances in a MIG
This section describes how to delete a Dynamic NIC from instancesin a MIG by creating a new instance template and applying the configurationto the MIG. Updating an existing instance template is not supported.
For more information about creating instance templates, seeCreate instance templates.To view an existing instance template, seeGet, list, and delete instance templates.
Console
Go to theInstance templates page.
Click the instance template that you want to copy and update.
ClickCreate similar.
Expand theAdvanced options section, and then expand theNetworking section.
In theDynamic Network Interfaces section, locate theDynamic NIC that you want to delete.
To delete the Dynamic NIC,clickDelete.
To create the instance template, clickCreate.
To update or recreate your instances with the new instance template, seeApply new VM configurations in a MIG.
gcloud
To create a new instance template that deletes a Dynamic NIC,use the
gcloud compute instance-templates createcommand.Include the
--network-interfaceflag for each network interface from yourexisting instance template, except for the Dynamic NIC thatyou want to delete.Adjust the following example to specify network interfaces andother properties as needed. For more examples of how to createinstances with multiple network interfaces,seeCreate VMs with multiple network interfaces.
gcloud compute instance-templates createINSTANCE_TEMPLATE_NAME \ --network-interface=network=NETWORK_A,subnet=SUBNET_A \ [--network-interface=network=NETWORK_B,subnet=SUBNET_B[,vlan=VLAN_ID]]
Replace the following:
INSTANCE_TEMPLATE_NAME: a name for the new instance template.NETWORK_A,NETWORK_B: the network where the interfaceattaches.SUBNET_A,SUBNET_B: the subnet where the interface attaches.VLAN_ID: a VLAN ID. Specifying a VLAN ID configuresthe network interface as a Dynamic NIC. You must place aDynamic NIC after its parent vNIC in the command.
To update or recreate your instances with the new instance template, seeApply new VM configurations in a MIG.
API
To create a new instance template that deletes a Dynamic NIC,use the
instanceTemplates.insertmethod to create a global instance template or theregionInstanceTemplates.insertmethod to create a regional instance template.In the
networkInterfacesfield, include each network interface from yourexisting instance template, except for the Dynamic NIC thatyou want to delete.Adjust the following example to specify network interfaces and otherproperties as needed. For more examples of how to create instances withmultiple network interfaces, seeCreate VMs with multiple network interfaces.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/instanceTemplates{ .... "networkInterfaces": [ { "subnetwork": "regions/REGION/subnetworks/SUBNET_A" }, { "subnetwork": "regions/REGION/subnetworks/SUBNET_B", "vlan": "VLAN_ID" }, additional network interfaces... ], other instance settings... }Replace the following:
PROJECT_ID: the ID of the project that contains theinstance template.REGION: the region that contains the instances.SUBNET_A,SUBNET_B: the subnet whereeach network interface is located.VLAN_ID: a VLAN ID. Specifying a VLAN ID configuresthe network interface as a Dynamic NIC. You must place aDynamic NIC after its parent vNIC the request.
To update or recreate your instances with the new instance template, seeApply new VM configurations in a MIG.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.