F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

ijdod's avatar
ijdod
Icon for Nimbostratus rankNimbostratus
May 09, 2014

TMSH config for a specific server

Is there a way to get the TMSH configuration for a specific virtual server in one command? So all the node, pool, monitor statements included as well. The idea is to be able to quickly 'clone' a vs config this way for use in our testing environment.

 

The way I do it now is saving an SCF file, copy/pasting the required config elements to a text file, making the required modifications for testing purposes, and then uploading that configuration to the LTM. Because this starts with a full config file, this is not hard, but as these bits are all over the config file there's a good chance of missing things.

 

5 Replies

  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    I think there is no single cmd, but I guess you can build a sequence a tmsh cmds which can be executed sequentially and repeatedly. Not sure if it's better than your current option of loading the full config

    for eg: build pools, then VS

    tmsh create ltm pool test_pool { members add { 10.10.10.10:443 { address 10.10.10.10 } } } 
    
    tmsh create ltm virtual test_vs { destination 20.20.20.20:https ip-protocol tcp mask 255.255.255.255 profiles add { http {} } pool test_pool }
    
  • Kevin_K_51432's avatar
    Kevin_K_51432
    Historic F5 Account

    One other thought, you could string Kunjan's commands together with the ; operator if one-line is a must.

     tmsh create ltm pool testPool ; tmsh create ltm virtual testVip pool testPool
    
     tmsh list ltm pool testPool ; tmsh list ltm virtual testVip
    ltm pool testPool { }
    ltm virtual testVip {
        destination 0.0.0.0:any
        mask any
        pool testPool
        profiles {
            fastL4 { }
        }
        source 0.0.0.0/0
        translate-address disabled
        translate-port disabled
        vlans-disabled
    }
    

    Kevin

  • ijdod's avatar
    ijdod
    Icon for Nimbostratus rankNimbostratus

    Update on this: I talked to our F5 rep about this, and there is currently no easy way of doing it, other than through a selective copy/paste of the main config.