FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
darisandy
Staff
Staff
Article Id 297100

Description

This article describes how to delete VDOM from CLI.

Scope

FortiGate.

Solution

There may be a scenario where it is impossible to access the FortiGate GUI and there is a requirement to delete the VDOM.

But usually, it is not an easy task, because if any objects are being referenced by this VDOM, it is impossible to delete the VDOM right away.

 

Here are the steps to delete VDOM from CLI:

 

  1. Purge all VDOM-related configurations:

Press "y" after every "purge" command.

 

This operation will clear all table!
Do you want to continue? (y/n)

 

config vdom
    edit <VDOM name>
        config firewall policy
        purge
        end
        config firewall policy6
        purge
        end
        config firewall vipgrp
        purge
        end
        config firewall vip
        purge
        end
        config firewall addrgrp
        purge
        end
        config firewall address
        purge
        end
        config router static
        purge
        end
end

 

There may be some default objects that cannot be purged, it is possible to ignore them.

 

  1. Assign any interfaces used by the VDOM back to ROOT or delete them if unused (for example VLAN interface):

    config global

        config system interface
            edit <intf name>
                set vdom root
        end
    end

     

    or:

    config global
        config system interface
            delete <intf name>
        end
    end

     

  1. Delete any VDOM Links if any:

    config global
        config system vdom-link
            delete <vdom-link name>
        end
    end  

     

     

  2. Make sure all admins are NOT assigned to the VDOM, it is possible to assign it to the root:

    config global
        config system admin
            edit <admin username>
                set vdom root
        end
     end

     

     

  3. Then delete the VDOM:

    config vdom

        delete <VDOM name>

    end