Cybersecurity Forum

This forum is for all security enthusiasts to discuss Fortinet's latest & evolving technologies and to connect & network with peers in the cybersecurity hemisphere. Share and learn on a broad range of topics like best practices, use cases, integrations and more. For support specific questions/resources, please visit the Support Forum or the Knowledge Base.

Prageeth_Karunarathn
New Contributor II

Deleting VDOM's in CLI

VDOMs have quite a number of dependencies that need to be deleted before you can get rid of the VDOM itself. Below is a useful little script that goes through all the sections and purges them so the VDOM can be deleted. Adjust it as needed.

This script needs to be run interactively. In other words you cannot copy and paste the whole script. You have to acknowledge each purge command.

## Purge all VDOM specific configuration

config vdom
 edit
 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

## Assign any interfaces used by the VDOM back to ROOT

config global
 config system interface
    edit
    set vdom root
 end
end

## Delete any VDOM Links

config system global
 config system vdom-link
    delete
 end
end  

## Make sure all admins are assigned to the root VDOM

config system global
 config system admin
  edit
  set vdom root
  end
 end

config vdom
 delete
end
1 REPLY 1
AndrLars
New Contributor

Thank you for this =) Shouldn't be hard for Fortinet to actually do this as a command to be run ? 

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.