Forum Discussion
Aaron_Lewis_215
Feb 12, 2016Nimbostratus
Modify multiple virtual servers
Hi,
I have an LTM environment with about 30 virtual servers that I'm moving to a new datacenter with a different external IP network. Can I copy the virtual servers in bulk while changing the v...
Kai_Wilke
Feb 12, 2016MVP
Hi Aaron,
you could either write a TMSH-TCL script to manipulate those IPs or export/edit/import the configuration using TMSH. But i doubt that writing a TMSH-TCL script would make any sense for a one-time task. So I would recommend to go the export/edit/import route...
Note: The code below outlines a TMSH sequence to clone a single virtual server. But the same method can be used to export/edit/import multiple configuration objects.
itacs@(f5-02)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm virtual VS_HTTPS_211
ltm virtual VS_HTTPS_211 {
destination 172.21.17.211%1:https
ip-protocol tcp
mask 255.255.255.255
pool pool_a
profiles {
clientssl-insecure-compatible {
context clientside
}
http { }
oneconnect { }
serverssl-insecure-compatible {
context serverside
}
tcp-lan-optimized { }
}
related-rules {
Test
}
rules {
iRule_2_Delete
}
source 0.0.0.0%1/0
source-address-translation {
type automap
}
vs-index 12
}
itacs@(f5-02)(cfg-sync Standalone)(Active)(/Common)(tmos) load sys config from-terminal merge
Enter configuration. Press CTRL-D to submit or CTRL-C to cancel.
ltm virtual VS_HTTPS_212 {
destination 172.21.17.212%1:https
ip-protocol tcp
mask 255.255.255.255
pool pool_a
profiles {
clientssl-insecure-compatible {
context clientside
}
http { }
oneconnect { }
serverssl-insecure-compatible {
context serverside
}
tcp-lan-optimized { }
}
related-rules {
Test
}
rules {
iRule_2_Delete
}
source 0.0.0.0%1/0
source-address-translation {
type automap
}
vs-index 12
}Loading configuration...
itacs@(f5-02)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm virtual VS_HTTPS_212
ltm virtual VS_HTTPS_212 {
destination 172.21.17.212%1:https
ip-protocol tcp
mask 255.255.255.255
pool pool_a
profiles {
clientssl-insecure-compatible {
context clientside
}
http { }
oneconnect { }
serverssl-insecure-compatible {
context serverside
}
tcp-lan-optimized { }
}
related-rules {
Test
}
rules {
iRule_2_Delete
}
source 0.0.0.0%1/0
source-address-translation {
type automap
}
vs-index 31
}
Cheers, Kai
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects