Delete Dynamic Network Interfaces from an instance
This page describes how to delete a Dynamic Network Interface (NIC) from an existing Compute Engine instance.For an overview of multiple network interfaces, see Multiple network interfaces.
To view an instance's existing network interfaces, see View network interfaces for an instance.
Delete a Dynamic NIC
Delete Dynamic NICs by using the following procedures. To prevent a possible error when deleting a Dynamic NIC by instance update, don't delete Dynamic NICs from individual instances by updating instance properties.
gcloud
To delete a Dynamic NIC from an existing instance, use the
instances network-interfaces delete command.
gcloud beta compute instances network-interfaces delete INSTANCE_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 NIC to delete, such asnic0.2
To delete Dynamic NICs from an a managed instance group (MIG), seeinstance-groups managed set-instance-template.
API
To delete a Dynamic NIC from an existing instance, use the
instances.deleteNetworkInterface method.
POST https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/deleteNetworkInterface?networkInterfaceName=DYNAMIC_NIC_NAME
Replace the following:
PROJECT_ID: the ID of the project that contains the instanceZONE: the zone that contains the instanceINSTANCE_NAME: the name of the instance to delete the Dynamic NIC fromDYNAMIC_NIC_NAME: the name of the Dynamic NIC to delete, such asnic0.2
To delete Dynamic NICs from an a managed instance group (MIG), see instanceGroupManagers.setInstanceTemplate.