Go to main content

Oracle® SuperCluster T5-8 Zones With Oracle Database on Database Domains Configuration Guide

Exit Print View

Updated: April 2020
 
 

Delete VNETs

Follow these procedures if you need to delete any VNETs that you added using the addvnet-wrapper.sh script and you created VNETs accidentally that are not needed.


Note -  Do not delete VNETs that are used by zones. Doing so results in a failed zone.
  1. Locate the rmvnet.sh script.

    See Preparing to Configure Zones on Database Domains for the location of the rmvnet.sh script.

  2. Identify the VNETs that you want to remove:
    ldm ls -l -p DB-domain | grep '^VNET'
    

    where DB-domain is the name of the Database Domain that you added the VNETs to. For example, if the name of the Database Domain that you added the VNETs to is osc01dbadmin02-01, you would type the following:

    ldm ls -l -p osc01dbadmin02-01 | grep '^VNET'
    VNET|name=mgnet0|dev=network@0|service=mng-primary-net1@primary|mac-addr=00:14:4f:fa:f8:e8|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=0
    VNET|name=mgnet1|dev=network@1|service=mng-primary-net00@primary|mac-addr=00:14:4f:fb:a0:cd|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=1
    VNET|name=z0mgnet0|dev=network@2|service=mng-primary-net1@primary|mac-addr=00:14:4f:fb:da:06|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=2
    VNET|name=z0mgnet1|dev=network@3|service=mng-primary-net1@primary|mac-addr=00:14:4f:f8:a8:06|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=3
    VNET|name=z1mgnet0|dev=network@4|service=mng-primary-net1@primary|mac-addr=00:14:4f:fb:83:cc|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=4
    VNET|name=z1mgnet1|dev=network@5|service=mng-primary-net1@primary|mac-addr=00:14:4f:fb:26:ab|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=5
    
  3. Remove the VNETs.
    • If you want to remove specific VNETs, type:
      rmvnet.sh -n vnet-name DB-domain
      

      where:

      • vnet-name is the name of the VNET that you want to remove. If you want to remove more than one VNET, type the name of each VNET that you want to remove, separated by commas.

      • DB-domain is the name of the Database Domain from which you are removing the VNETs.

      For example, assume you have the following setup:

      • The names of the VNETs that you want to remove are z1mgnet0 and z1mgnet1.

      • The name of the Database Domain that you are removing the VNETs from is osc01dbadmin02-01.

      Then you would type the following:

      rmvnet.sh -n z1mgnet0,z1mgnet1 osc01dbadmin02-01
      
    • If you want to remove several VNETs that have common characteristics, type:
      rmvnet.sh -p 'beginning-term+' DB-domain
      

      where:

      • beginning-term is the term at the beginning of the VNET names for the VNETs that you want to remove (for example, all VNETs with names that begin with z1).

      • domain-name is the name of the Database Domain from which you are removing the VNETs.

      For example, assume you have the following setup:

      • You want to remove all VNETs with names that begin with z1 (in the output from Step 2, that would be z1mgnet0 and z1mgnet1).

      • The name of the Database Domain that you are removing the VNETs from is osc01dbadmin02-01.

      Then you would type the following:

      rmvnet.sh -p 'z1+' osc01dbadmin02-01
      
  4. Verify that the VNETs have been removed:
    ldm ls -l -p DB-domain | grep '^VNET'
    

    where DB-domain is the name of the Database Domain that you removed the VNETs from. For example, if the name of the Database Domain that you removed the VNETs from is osc01dbadmin02-01, type the following:

    ldm ls -l -p osc01dbadmin02-01 | grep ???^VNET'
    VNET|name=mgnet0|dev=network@0|service=mng-primary-net1@primary|mac-addr=00:14:4f:fa:f8:e8|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=0
    VNET|name=mgnet1|dev=network@1|service=mng-primary-net00@primary|mac-addr=00:14:4f:fb:a0:cd|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=1
    VNET|name=z0mgnet0|dev=network@2|service=mng-primary-net1@primary|mac-addr=00:14:4f:fb:da:06|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=2
    VNET|name=z0mgnet1|dev=network@3|service=mng-primary-net1@primary|mac-addr=00:14:4f:f8:a8:06|mode=|pvid=1|vid=|mtu=1500|linkprop=|id=3
    

    The VNETs that you removed should not appear in the list.