Technical Tip: How to delete a VDOM using the GUI and CLI
Description
Scope
FortiGate.
Solution
ssl.<vdom>: virtual interface associated with the SSL VPN function. Used when defining Firewall Policies for SSL VPN users.
In FortiOS v7.0 and later, two additional virtual interfaces are built into each VDOM:
- naf.<vdom>: virtual interface associated with a new design for NAT46/NAT64 in FortiOS v7.0.
See this document: Simplify NAT46 and NAT64 policy and routing configurations 7.0.1. - l2t.<vdom>: virtual interface associated with L2TP. Part of an enhancement to L2TP over IPsec support on the FortiGate to improve performance and allow for split-tunnel support via DHCP.
See this article: Technical Tip: Manual upgradation of L2TP over IPsec configuration after upgrading from 6.4.x or 7.0.0 to 7.0.x.
Note: the built-in interfaces mentioned above cannot be individually deleted by the administrator. Instead, they are automatically created and deleted whenever a VDOM is created/deleted. Crucially, these specific interfaces will not block an administrator from deleting a VDOM, and so they can be ignored during configuration cleanup.
The number of references is visible under the 'Reference' column.
In the Global VDOM, go to Network -> Interfaces, select the DMZ interface, then move the interface from its current VDOM (in this case, testvdom) to another VDOM, such as root.
dmz interface with no configuration references in testvdom.
dmz interface with existing references in testvdom. Note that the Virtual Domain dropdown is no longer accessible.
Note: Sometimes it is not possible to remove the VDOM from the GUI after removing the DMZ interface. In this example can see that a VDOM is still under configuration under the config system admin:
config system admin
edit "admin"
set vdom "root" "testvdom" <---
set accprofile "super_admin"
set ssh-public-key1 "XXXXXXXXXXXXXXX"
config gui-dashboard
edit 1
set name "Status"
set vdom "testvdom" <---
Below is how to remove VDOM testvdom under config system admin:
config system admin
edit admin
set vdom root
end
next
config gui-dashboard
delete 1
end
end
This VDOM is now successfully removed from the configuration.


FortiGate (vdom) #

Also, if deleting VDOM is not yet possible, it is necessary to run the following command (being in the global environment) to identify the remanent configuration (for this example, the VDOM name is also 'testvdom'):
(global) # diagnose sys cmdb refcnt show system.vdom.name testvdom
entry used by table system.interface:name 'l2t.testvdom' (From 'global')
entry used by table system.interface:name 'naf.testvdom' (From 'global')
entry used by table system.interface:name 'ssl.testvdom' (From 'global')
entry used in table system.interface:name 'npu0_vlink1.testvdom' (From 'global')
entry used by child table vdom:name 'testvdom' of table system.admin:name 'admin' (From 'global')
entry used by table system.vdom-property:name 'testvdom' (From 'global')
Troubleshooting Tip: Unable to delete a VDOM
Notes:
- If the VDOM is configured on the HA cluster with the vcluster option, make sure that the VDOM that has to be deleted is active on the same cluster member where the management VDOM is.
- The 'root' VDOM cannot be deleted. This is the default VDOM where interface binding reverts to when disabling a multi-VDOM environment, and it is also the default management VDOM.
Related article: