Files
doc-exports/docs/vpc/umn/vpc_faq_0075.html
Qin Ying, Fan 19f0993a37 VPC UMN 20231207 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2023-12-20 11:27:38 +00:00

169 lines
17 KiB
HTML

<a name="vpc_faq_0075"></a><a name="vpc_faq_0075"></a>
<h1 class="topictitle1">Why Can't I Delete My VPCs and Subnets?</h1>
<div id="body1494466502935"><div class="p" id="vpc_faq_0075__p515811319577">If VPCs and subnets are being used by other resources, you need to delete these resources first based on the prompts on the console before deleting the VPCs and subnets. This following provides detailed deletion prompts and corresponding deletion guide.<ul id="vpc_faq_0075__ul1019314249337"><li id="vpc_faq_0075__li919312247339"><a href="#vpc_faq_0075__section16966157133218">Deleting Subnets</a></li><li id="vpc_faq_0075__li259732513311"><a href="#vpc_faq_0075__table95312065138">Deleting VPCs</a></li></ul>
</div>
<div class="section" id="vpc_faq_0075__section16966157133218"><a name="vpc_faq_0075__section16966157133218"></a><a name="section16966157133218"></a><h4 class="sectiontitle">Deleting Subnets</h4><p id="vpc_faq_0075__p477104074014">You can refer to <a href="#vpc_faq_0075__table4284113316400">Table 1</a> to delete subnets.</p>
<div class="tablenoborder"><a name="vpc_faq_0075__table4284113316400"></a><a name="table4284113316400"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_faq_0075__table4284113316400" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Deleting subnets</caption><thead align="left"><tr id="vpc_faq_0075__row1228413333409"><th align="left" class="cellrowborder" valign="top" width="16.53827636013481%" id="mcps1.3.2.3.2.4.1.1"><p id="vpc_faq_0075__p928413314403">Prompts</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.011073663938372%" id="mcps1.3.2.3.2.4.1.2"><p id="vpc_faq_0075__p152842033174013">Cause</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.450649975926815%" id="mcps1.3.2.3.2.4.1.3"><p id="vpc_faq_0075__p12284153334017">Solution</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_faq_0075__row1592145519204"><td class="cellrowborder" valign="top" width="16.53827636013481%" headers="mcps1.3.2.3.2.4.1.1 "><p id="vpc_faq_0075__p169788918212">You do not have permission to perform this operation.</p>
</td>
<td class="cellrowborder" valign="top" width="26.011073663938372%" headers="mcps1.3.2.3.2.4.1.2 "><p id="vpc_faq_0075__p15978129112116">Your account does not have permissions to delete subnets.</p>
</td>
<td class="cellrowborder" valign="top" width="57.450649975926815%" headers="mcps1.3.2.3.2.4.1.3 "><p id="vpc_faq_0075__p397819910217">Contact the account administrator to grant permissions to your account and then delete the subnet.</p>
</td>
</tr>
<tr id="vpc_faq_0075__row10457141285"><td class="cellrowborder" valign="top" width="16.53827636013481%" headers="mcps1.3.2.3.2.4.1.1 "><p id="vpc_faq_0075__p124572115815">Delete custom routes from the associated route table of the subnet and then delete the subnet.</p>
</td>
<td class="cellrowborder" valign="top" width="26.011073663938372%" headers="mcps1.3.2.3.2.4.1.2 "><div class="p" id="vpc_faq_0075__p5254131919104">The route table has custom routes with the following as the next hop type:<ul id="vpc_faq_0075__ul1711942111010"><li id="vpc_faq_0075__li984913230102">Server</li><li id="vpc_faq_0075__li14784825191018">Extension NIC</li><li id="vpc_faq_0075__li15119192116104">Virtual IP address</li><li id="vpc_faq_0075__li1875693119109">NAT gateway</li></ul>
</div>
</td>
<td class="cellrowborder" valign="top" width="57.450649975926815%" headers="mcps1.3.2.3.2.4.1.3 "><div class="p" id="vpc_faq_0075__p69161462175">Delete the custom routes from the route table and then delete the subnet.<ol id="vpc_faq_0075__ol146211747417"><li id="vpc_faq_0075__li183931258134814"><a href="vpc_route01_0015.html">Viewing the Route Table Associated with a Subnet</a></li><li id="vpc_faq_0075__li649824017509"><a href="vpc_route01_0012.html">Deleting a Route</a></li></ol>
</div>
</td>
</tr>
<tr id="vpc_faq_0075__row1298101313553"><td class="cellrowborder" valign="top" width="16.53827636013481%" headers="mcps1.3.2.3.2.4.1.1 "><p id="vpc_faq_0075__p16240806489">Release any virtual IP addresses configured in the subnet and then delete the subnet.</p>
</td>
<td class="cellrowborder" valign="top" width="26.011073663938372%" headers="mcps1.3.2.3.2.4.1.2 "><p id="vpc_faq_0075__p20240140164819">The subnet has virtual IP addresses configured.</p>
</td>
<td class="cellrowborder" valign="top" width="57.450649975926815%" headers="mcps1.3.2.3.2.4.1.3 "><p id="vpc_faq_0075__p11240104486">Release the virtual IP addresses from the subnet and then delete the subnet.</p>
<p id="vpc_faq_0075__p141541938185012"><a href="vpc_vip_0009.html">Releasing a Virtual IP Address</a></p>
</td>
</tr>
<tr id="vpc_faq_0075__row333962415587"><td class="cellrowborder" valign="top" width="16.53827636013481%" headers="mcps1.3.2.3.2.4.1.1 "><p id="vpc_faq_0075__p1633952445814">Release any private IP addresses configured in the subnet and then delete the subnet.</p>
</td>
<td class="cellrowborder" valign="top" width="26.011073663938372%" headers="mcps1.3.2.3.2.4.1.2 "><p id="vpc_faq_0075__p81211026163715">The subnet has virtual IP addresses that are not used by any instance.</p>
</td>
<td class="cellrowborder" valign="top" width="57.450649975926815%" headers="mcps1.3.2.3.2.4.1.3 "><p id="vpc_faq_0075__p133398242585">On the <strong id="vpc_faq_0075__b19586104918173">IP Addresses</strong> tab, release these private IP addresses that are not required and then delete the subnet.</p>
<ol id="vpc_faq_0075__ol6625113043119"><li id="vpc_faq_0075__li1375920582518"><a href="vpc_vpc_0012.html">Viewing IP Addresses in a Subnet</a></li><li id="vpc_faq_0075__li76161452123518">In the private IP address list, locate the IP address that is not being used and click <strong id="vpc_faq_0075__b9440131011222">Release</strong> in the <strong id="vpc_faq_0075__b14718617162219">Operation</strong> column.<div class="notice" id="vpc_faq_0075__note18925183117557"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><p id="vpc_faq_0075__p1894781313379">If you want to release an in-use private IP address, you need to delete the resource that uses the IP address first.</p>
</div></div>
</li></ol>
</td>
</tr>
<tr id="vpc_faq_0075__row1515975716542"><td class="cellrowborder" valign="top" width="16.53827636013481%" headers="mcps1.3.2.3.2.4.1.1 "><p id="vpc_faq_0075__p105031146193919">Delete the resource (ECS or load balancer) that is using the subnet and then delete the subnet.</p>
</td>
<td class="cellrowborder" valign="top" width="26.011073663938372%" headers="mcps1.3.2.3.2.4.1.2 "><p id="vpc_faq_0075__p1750374619394">The subnet is being used by an ECS or a load balancer.</p>
</td>
<td class="cellrowborder" valign="top" width="57.450649975926815%" headers="mcps1.3.2.3.2.4.1.3 "><p id="vpc_faq_0075__p155033468392">Delete the ECS or load balancer and then delete the subnet.</p>
<p id="vpc_faq_0075__p198737524531"><a href="vpc_vpc_0011.html">Viewing and Deleting Resources in a Subnet</a></p>
</td>
</tr>
<tr id="vpc_faq_0075__row145032466393"><td class="cellrowborder" valign="top" width="16.53827636013481%" headers="mcps1.3.2.3.2.4.1.1 "><p id="vpc_faq_0075__p9785521105610">Delete the load balancer that is using the subnet and then delete the subnet.</p>
</td>
<td class="cellrowborder" valign="top" width="26.011073663938372%" headers="mcps1.3.2.3.2.4.1.2 "><p id="vpc_faq_0075__p1578513210569">The subnet is being used by a load balancer.</p>
</td>
<td class="cellrowborder" valign="top" width="57.450649975926815%" headers="mcps1.3.2.3.2.4.1.3 "><p id="vpc_faq_0075__p333735212564">Delete the load balancer and then delete the subnet.</p>
<p id="vpc_faq_0075__p102643247123"><a href="vpc_vpc_0011.html">Viewing and Deleting Resources in a Subnet</a></p>
</td>
</tr>
<tr id="vpc_faq_0075__row122394017488"><td class="cellrowborder" valign="top" width="16.53827636013481%" headers="mcps1.3.2.3.2.4.1.1 "><p id="vpc_faq_0075__p03199425518">Delete the NAT gateway that is using the subnet and then delete the subnet.</p>
</td>
<td class="cellrowborder" valign="top" width="26.011073663938372%" headers="mcps1.3.2.3.2.4.1.2 "><p id="vpc_faq_0075__p12774153125815">The subnet is being used by a NAT gateway.</p>
</td>
<td class="cellrowborder" valign="top" width="57.450649975926815%" headers="mcps1.3.2.3.2.4.1.3 "><p id="vpc_faq_0075__p1022362716591">Delete the NAT gateway and then delete the subnet.</p>
<p id="vpc_faq_0075__p11663033151212"><a href="vpc_vpc_0011.html">Viewing and Deleting Resources in a Subnet</a></p>
</td>
</tr>
<tr id="vpc_faq_0075__row51125317011"><td class="cellrowborder" valign="top" width="16.53827636013481%" headers="mcps1.3.2.3.2.4.1.1 "><p id="vpc_faq_0075__p19112123117015">Delete the resource that is using the subnet and then delete the subnet.</p>
</td>
<td class="cellrowborder" valign="top" width="26.011073663938372%" headers="mcps1.3.2.3.2.4.1.2 "><p id="vpc_faq_0075__p011216312006">The subnet is being used by cloud resources.</p>
</td>
<td class="cellrowborder" valign="top" width="57.450649975926815%" headers="mcps1.3.2.3.2.4.1.3 "><p id="vpc_faq_0075__p164696261912">On the <strong id="vpc_faq_0075__b12910135210470">IP Addresses</strong> tab, view the usage of the IP address, find the resource that is using the IP address, delete the resource, and delete the subnet.</p>
<ol id="vpc_faq_0075__ol64691126711"><li id="vpc_faq_0075__li8118111121310"><a href="vpc_vpc_0012.html">Viewing IP Addresses in a Subnet</a></li><li id="vpc_faq_0075__li1523791112589">Locate resource based on the usage of the IP address.</li><li id="vpc_faq_0075__li14811203152011">Delete the resource and then delete the subnet.</li></ol>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_faq_0075__section1753116613130"><h4 class="sectiontitle">Deleting VPCs</h4><p id="vpc_faq_0075__p125318610136">Before deleting a VPC, ensure that all subnets in the VPC have been deleted. You can refer to <a href="#vpc_faq_0075__table95312065138">Table 2</a> to delete VPCs.</p>
<div class="tablenoborder"><a name="vpc_faq_0075__table95312065138"></a><a name="table95312065138"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_faq_0075__table95312065138" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Deleting VPCs</caption><thead align="left"><tr id="vpc_faq_0075__row35318615135"><th align="left" class="cellrowborder" valign="top" width="16.47795711876656%" id="mcps1.3.3.3.2.4.1.1"><p id="vpc_faq_0075__p75311169131">Prompts</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.02987231992291%" id="mcps1.3.3.3.2.4.1.2"><p id="vpc_faq_0075__p1953113610139">Cause</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.49217056131053%" id="mcps1.3.3.3.2.4.1.3"><p id="vpc_faq_0075__p18531126181311">Solution</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_faq_0075__row1853126121310"><td class="cellrowborder" valign="top" width="16.47795711876656%" headers="mcps1.3.3.3.2.4.1.1 "><p id="vpc_faq_0075__p7531196111310">You do not have permission to perform this operation.</p>
</td>
<td class="cellrowborder" valign="top" width="26.02987231992291%" headers="mcps1.3.3.3.2.4.1.2 "><p id="vpc_faq_0075__p25315614134">Your account does not have permissions to delete VPCs.</p>
</td>
<td class="cellrowborder" valign="top" width="57.49217056131053%" headers="mcps1.3.3.3.2.4.1.3 "><p id="vpc_faq_0075__p1853118612132">Contact the account administrator to grant permissions to your account and then delete the VPC.</p>
</td>
</tr>
<tr id="vpc_faq_0075__row237493984"><td class="cellrowborder" rowspan="2" valign="top" width="16.47795711876656%" headers="mcps1.3.3.3.2.4.1.1 "><p id="vpc_faq_0075__p2532186101318">Delete the VPC endpoint service or the route configured for the service from the VPC route table and then delete the VPC.</p>
</td>
<td class="cellrowborder" valign="top" width="26.02987231992291%" headers="mcps1.3.3.3.2.4.1.2 "><p id="vpc_faq_0075__p11532461131">The VPC route table has custom routes.</p>
</td>
<td class="cellrowborder" valign="top" width="57.49217056131053%" headers="mcps1.3.3.3.2.4.1.3 "><p id="vpc_faq_0075__p4532126131313">Delete the custom routes and then delete the VPC.</p>
<ol id="vpc_faq_0075__ol125321869139"><li id="vpc_faq_0075__li168525588306">In the VPC list, locate the row that contains the VPC and click the number in the <strong id="vpc_faq_0075__b17689171316333">Route Tables</strong> column.<p id="vpc_faq_0075__p1283412512338">The route table list is displayed.</p>
</li><li id="vpc_faq_0075__li83051350195911"><a href="vpc_route01_0012.html">Deleting a Route</a></li></ol>
</td>
</tr>
<tr id="vpc_faq_0075__row1395414146304"><td class="cellrowborder" valign="top" headers="mcps1.3.3.3.2.4.1.1 "><p id="vpc_faq_0075__p16955191412303">The VPC is being used by a VPC endpoint service.</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.3.3.2.4.1.2 "><p id="vpc_faq_0075__p7955121483020">Search for the VPC endpoint service on the VPC endpoint service console and delete it.</p>
</td>
</tr>
<tr id="vpc_faq_0075__row18514457112"><td class="cellrowborder" valign="top" width="16.47795711876656%" headers="mcps1.3.3.3.2.4.1.1 "><p id="vpc_faq_0075__p11851174541110">This VPC cannot be deleted because it has associated resources.</p>
</td>
<td class="cellrowborder" valign="top" width="26.02987231992291%" headers="mcps1.3.3.3.2.4.1.2 "><p id="vpc_faq_0075__p198511745121113">The VPC is being used by the following resources:</p>
<ul id="vpc_faq_0075__ul437633812132"><li id="vpc_faq_0075__li1837643816134">Subnet</li><li id="vpc_faq_0075__li183373406132">VPC peering connection</li><li id="vpc_faq_0075__li082224231318">Custom route table</li></ul>
</td>
<td class="cellrowborder" valign="top" width="57.49217056131053%" headers="mcps1.3.3.3.2.4.1.3 "><p id="vpc_faq_0075__p085164571117">Click the resource name hyperlink as prompted to delete the resource.</p>
<ul id="vpc_faq_0075__ul14125142182213"><li id="vpc_faq_0075__li14125142112216"><a href="#vpc_faq_0075__table4284113316400">Table 1</a></li><li id="vpc_faq_0075__li64521533325"><a href="vpc_peering_0003.html">Deleting a VPC Peering Connection</a></li><li id="vpc_faq_0075__li577645311215"><a href="vpc_route01_0010.html">Deleting a Route Table</a></li></ul>
</td>
</tr>
<tr id="vpc_faq_0075__row14840101013718"><td class="cellrowborder" valign="top" width="16.47795711876656%" headers="mcps1.3.3.3.2.4.1.1 "><p id="vpc_faq_0075__p98841301373">Delete the virtual gateway that is using the VPC and then delete the VPC.</p>
</td>
<td class="cellrowborder" valign="top" width="26.02987231992291%" headers="mcps1.3.3.3.2.4.1.2 "><p id="vpc_faq_0075__p1088493073713">The VPC is being used by a Direct Connect virtual gateway.</p>
</td>
<td class="cellrowborder" valign="top" width="57.49217056131053%" headers="mcps1.3.3.3.2.4.1.3 "><p id="vpc_faq_0075__p6203182113610">On the Direct Connect console, locate the virtual gateway and delete it.</p>
</td>
</tr>
<tr id="vpc_faq_0075__row198221117777"><td class="cellrowborder" valign="top" width="16.47795711876656%" headers="mcps1.3.3.3.2.4.1.1 "><p id="vpc_faq_0075__p16822121719713">Delete the VPN gateway that is using the VPC and then delete the VPC.</p>
</td>
<td class="cellrowborder" valign="top" width="26.02987231992291%" headers="mcps1.3.3.3.2.4.1.2 "><p id="vpc_faq_0075__p38234176717">The VPC is being used by a VPN gateway.</p>
</td>
<td class="cellrowborder" valign="top" width="57.49217056131053%" headers="mcps1.3.3.3.2.4.1.3 "><p id="vpc_faq_0075__p2940539482">On the VPN console, locate the VPN gateway and delete it.</p>
</td>
</tr>
<tr id="vpc_faq_0075__row51514712496"><td class="cellrowborder" valign="top" width="16.47795711876656%" headers="mcps1.3.3.3.2.4.1.1 "><p id="vpc_faq_0075__p516871495">Delete all custom security groups in this region and then delete this last VPC.</p>
</td>
<td class="cellrowborder" valign="top" width="26.02987231992291%" headers="mcps1.3.3.3.2.4.1.2 "><p id="vpc_faq_0075__p111687184917">In the current region, this is the last VPC and there are custom security groups.</p>
<div class="notice" id="vpc_faq_0075__note122231018205120"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><p id="vpc_faq_0075__p1122317182514">You only need to delete the custom security groups. The default security group does not affect the deletion of VPCs.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" width="57.49217056131053%" headers="mcps1.3.3.3.2.4.1.3 "><p id="vpc_faq_0075__p11161271491">Delete all custom security groups and then delete the VPC.</p>
<p id="vpc_faq_0075__p454420367510"><a href="vpc_SecurityGroup_0008.html">Deleting a Security Group</a></p>
</td>
</tr>
<tr id="vpc_faq_0075__row13161971497"><td class="cellrowborder" valign="top" width="16.47795711876656%" headers="mcps1.3.3.3.2.4.1.1 "><p id="vpc_faq_0075__p116147164916">Release all EIPs in this region and then delete this last VPC.</p>
</td>
<td class="cellrowborder" valign="top" width="26.02987231992291%" headers="mcps1.3.3.3.2.4.1.2 "><p id="vpc_faq_0075__p171613714492">In the current region, this is the last VPC and there are EIPs.</p>
</td>
<td class="cellrowborder" valign="top" width="57.49217056131053%" headers="mcps1.3.3.3.2.4.1.3 "><p id="vpc_faq_0075__p208002248910">Release all EIPs and then delete the VPC.</p>
<p id="vpc_faq_0075__p1199419472076"><a href="vpc_eip_0001.html">Unbinding an EIP from an ECS and Releasing the EIP</a></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="faq_vpc.html">VPCs and Subnets</a></div>
</div>
</div>