Forum Discussion

Luca_55898's avatar
Luca_55898
Icon for Nimbostratus rankNimbostratus
Jul 17, 2012

change virtual server type with TMSH command?

Hi,

 

 

I would like to know how I can change the virtual server type using tmsh.

 

 

So if someone configures a virtual server as a 'standard' type, and I want to change it to 'performance (layer4)' How can I do this using TMSH?

 

 

I tried but can't really see where it is:

 

 

'modify ltm virtual vs-1.1.1.1 ??'

 

 

Cheers.

 

3 Replies

  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    tmsh does not directly expose a type field. tmui uses the type field to filter the profiles that are presented. tmsh is not a gui/browser and does not provide that type of filtering.

     

    If you are using tmsh, and you assign a fastl4 profile to the virtual, then the type of the virtual should automatically be changed to "performance (layer 4)".
  • So basically there is no way to modify an existing standard virtual server to a performance (layer 4) virtual server using TMSH?

     

  • Hi Luca,

    Mark was trying to say that the virtual server "type" is just a friendly name used in the GUI which doesn't actually exist in tmsh or the conifuration. If you have an HTTP VS with a couple of L7 options enabled, you can change it to a fastL4 using tmsh:

    
     list ltm virtual my_http_vs
    ltm virtual my_http_vs {
        destination 1.1.1.1:http
        ip-protocol tcp
        mask 255.255.255.255
        persist {
            cookie {
                default yes
            }
        }
        pool http_pool
        profiles {
            http { }
            tcp { }
        }
        vlans-disabled
    }
    
     modify ltm virtual my_http_vs profiles replace-all-with { fastL4 } persist replace-all-with { source_addr }
    
     list ltm virtual my_http_vs
    ltm virtual my_http_vs {
        destination 1.1.1.1:http
        ip-protocol tcp
        mask 255.255.255.255
        persist {
            source_addr {
                default yes
            }
        }
        pool http_pool
        profiles {
            fastL4 { }
        }
        vlans-disabled
    }
    

    Aaron