Forum Discussion

mtfeliciano's avatar
mtfeliciano
Icon for Altostratus rankAltostratus
Jun 23, 2026

simultaneous disabling / enabling of all LTM objects

There is an F5 KB article about how to disable INDIVIDUAL nodes / pools:

https://my.f5.com/manage/s/article/K13310

 

Question:

Is there any quick way (e.g. in F5 GUI or CLI) to simultaneously disable / enable ALL LTM objects (e.g. ALL virtual servers, pools and nodes) in an F5 load balancer?

4 Replies

  • Hi

    how r u?
    Via gui you can enter a filter and manualy disable VS. The same for the pool, pool member and node.

    Via CLI you can disable anything, but you require more technical capacity or experience

     

    For example 

    tmsh modify ltm virtual <name_vs> disabled

    practical example:
    tmsh modify ltm virtual outservice_Oracle_147.154.96.158_vs disabled

     

    what do you want do it?

    Can help you with anything?

     

    Best Regard!

    jose.labra

  • Well you could just use 'all' in place of the Virtual Server name in the command as shown below but I would advise thinking this through a bit more thoroughly before you do that as it may well have unintended results. 

    modify ltm virtual all disabled  

    Imagine you have three Virtual Servers in the following states:

    VS1 - Disabled

    VS2 - Enabled

    VS3 - Enabled

    You run the command above and that sets all three Virtual Servers to a Disabled state which fulfils the criteria you have asked for but what happens when you run the command to enable all the Virtual Servers again? There is no consideration made for VS1 which was initially disabled - all three just change state from disabled to enabled. VS1 may well have been disabled for a very good reason but now it is potentially back up and accepting traffic again which could be very bad indeed.           

  • Simultaneously, no but you can do them consecutive with CLI commands. What is happening that this is now becoming something you want to do? 

  • Sounds like a job for...... dah dah dah dah!!! Automation Man :)

    So it depends on your exact requirement, knowledge, available tools and how much you time you can commit.

    With a bit of effort you could knock up a Python or Ansible script that queries for a list virtual servers / nodes / pool members stores it to a list and then sends a request to disable them all. You can even build in a step to verify that you want to stop everything or just select the nodes you want to stop

    if you have a more static environment then you can forgo the query part, but if you're looking to kill everything querying what's actually configured is a better option from a security point of view.

    There is a wealth of intro videos on Youtube