Forum Discussion

Steven_J__Willi's avatar
Steven_J__Willi
Icon for Nimbostratus rankNimbostratus
Jun 27, 2014

Mirror VIPs from device to device

Is there a way to replicate a VIP from one device to another, but just modify the VIP through tclsh? Is there a way to export a config file for that VIP on one device modify the IP address and paste it or SCP it to the other device?

 

5 Replies

  • Sure.

     

    tmsh list ltm virtual my-vs > myvs.conf
    
    tmsh load sys config merge file myvs.conf
    

     

    Understand of course that the VIP configuration contains references to other objects that may not be on the second device.

     

  • A virtual server configuration could reference various profiles (TCP, HTTP, client and server SSL, pools, iRules, persistence, etc.).

     

  • Ok I get what you are saying, but if one device is prod and the other is BCP/DR then all that should be the same in both environments. It is just painfully long process to do the mirrored config in the gui, ssl profile creation, pool creation, vip creation, etc, etc.

     

  • I've been doing this same thing recently. Been working on some PowerShell scripts to do a lot of the legwork for me, but haven't finished yet...

    So far, the easiest way I've found to accomplish this is by using the iRule Editor and grabbing the current config file from both environments, and pulling out the pieces I need (e.g. a specific or multiple virtuals, along with known dependencies that may not exist or be up to date in the DR site). If I don't need all of that, I'll just run tmsh list from putty to get most (if not all) the config data as well.

    Then I'll use WinScp to connect to the DR site and create a new file I'll use as the merge config file, and paste the code for the/those virtual(s) in there (and making the necessary modification to them, like ip addresses and what not, and being sure to put the dependencies above the rest).

    Then through putty in that folder i run the verify merge command tmsh load sys config verify merge file

    If it gives me an error because it couldn't find something, I'll go and grab that from the full config file and add it to the merge doc...

    Only think I've had problems with are things that need actual files (e.g. the actual ssl certificates, a bit of APM stuff), which can be added through the GUI.

    Once the verify runs without error, I run the merge command Kevin mentioned tmsh load sys config merge file

    Hope this helps.