Duplicating BIG-IP Objects
Late last night as I was heading to bed I checked twitter (send help, I need an intervention STAT!) and noticed a comment about how to copy a virtual server. I answered in short and he has already ar...
Updated Jun 06, 2023
Version 2.0JRahm
Admin
Joined January 20, 2005
Leonardo_Souza
Jun 29, 2018Cirrocumulus
The GUI with repeat button is definitely the easiest way to do, but here is another way to do this.
Create virtual server you want via tmsh:
root@(LABBIGIP1)(cfg-sync Changes Pending)(Active)(/Common)(tmos) create ltm virtual vs1 destination 10.0.0.200:80 pool pool_http
Go back to history (arrow up), repeat the command with the changes you want:
root@(LABBIGIP1)(cfg-sync Changes Pending)(Active)(/Common)(tmos) create ltm virtual vs2 destination 10.0.0.200:443 pool pool_http
Also, you can use the one-line option:
root@(LABBIGIP1)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm virtual vs2 one-line
ltm virtual vs2 { destination 10.0.0.200:https mask 255.255.255.255 pool pool_http profiles { fastL4 { } } source 0.0.0.0/0 translate-address enabled translate-port enabled vs-index 19 }
Use the line you got to recreate the command, add create, add for profiles and other properties, and lastly remove the vs-index:
root@(LABBIGIP1)(cfg-sync Changes Pending)(Active)(/Common)(tmos) create ltm virtual vs3 { destination 10.0.0.200:8443 mask 255.255.255.255 pool pool_http profiles add { fastL4 { } } source 0.0.0.0/0 translate-address enabled translate-port enabled}