How do I to rename a Virtual Server on a F5 LTM ?

Below provides the steps rename a virtual server, pool or any other object within the configuration of a F5 LTM. The steps provided involve the editing of the (bigip.conf) configuration file. This file is then verified for any potential issues before it is loaded and committed to the F5 LTM`s running configuration.

Backup Configuration

First of we back up the configuration.

cp bigip.conf bigip.conf.bak

Change Name

Next we amend the old object name with its new name. The -i option ensures that the changes are saved to the bigip.conf file.

sed -i ‘s/[OLD NAME]/[NEW NAME]/g’ bigip.conf

Verify Configuration

We then verfiy the configuration to ensure we don’t get any nasty surprises at the point of loading the new configuration.

b verify load

Commit Configuration

Finally we commit the new configuration to the running configuration.

b load

Example

[root@f5-ltm:Active] config # b virtual list
virtual VS-FOWARD-TEST {
   ip forward
   destination any:any
   mask 0.0.0.0
   rules IRULE-SNAT
   vlans {
      EXTERNAL
      INTERNAL
   } enable
}

[root@f5-ltm:Active] config # cp bigip.conf bigip.conf.bak
[root@f5-ltm:Active] config # sed -i ‘s/VS-FOWARD-TEST/VS-FOWARD-PRODUCTION/g’ bigip.conf

[root@f5-ltm:Active] config # b verify load
Reading configuration from /config/low_profile_base.conf.
Reading configuration from /defaults/config_base.conf.
Reading configuration from /config/bigip_sys.conf.
Reading configuration from /config/bigip_base.conf.
Reading configuration from /usr/share/monitors/base_monitors.conf.
Reading configuration from /config/profile_base.conf.
Reading configuration from /config/daemon.conf.
Reading configuration from /config/bigip.conf.
Reading configuration from /config/bigip_local.conf.
Validating the configuration …

[root@f5-ltm:Active] config # b load
Reading configuration from /config/low_profile_base.conf.
Reading configuration from /defaults/config_base.conf.
Reading configuration from /config/bigip_sys.conf.
Reading configuration from /config/bigip_base.conf.
Reading configuration from /usr/share/monitors/base_monitors.conf.
Reading configuration from /config/profile_base.conf.
Reading configuration from /config/daemon.conf.
Reading configuration from /config/bigip.conf.
Reading configuration from /config/bigip_local.conf.
Loading the configuration …

[root@f5-ltm:Active] config # b virtual list
virtual VS-FOWARD-PRODUCTION {
   ip forward
   destination any:any
   mask 0.0.0.0
   rules IRULE-SNAT
   vlans {
      EXTERNAL
      INTERNAL
   } enable
}

v11.x Update

As the bigpipe commands have now been deprecated with v11.x. When using v11.x replace the following bigpipe commands with the equivalent tmsh commands,

 BIGPIPETMSH
b verify loadload sys config verify
b loadload sys config partitions all
Rick Donato

Want to become an F5 Loadbalancers expert?

Here is our hand-picked selection of the best courses you can find online:
F5 BIG-IP 101 Certification Exam – Complete Course
F5 BIG-IP 201 Certification Exam – Complete Course
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial