Forum Discussion

Roman_80473's avatar
Icon for Nimbostratus rankNimbostratus
Dec 30, 2010

How to check if particular Virtual Server exists?

Hi folks,



I'm new to iControl, and I'm struggling to have few simple tasks accomplished via java:


1. check if particular Virtual Server exists


2. create new Virtual Server


3. Set basic properties



I've found an article ( which prob covers some basic stuff, but I'm still not sure how to check whether the vserver exists. Is there a wrapper class similar to Pool or PoolMember?



Any help is appreciated.


Thank you, Roman

5 Replies

  • Roman: I'd just to a get_list(), check for the VS. If it exists, pass. Else, create().


  • Hi Matt,



    Thanks for replying. I'll try it and let you know ... I can't believe it's that simple




  • Hi Matt,



    That worked fine, thanks. One last question though a bit off topic: do I need the def pool w members created prior to creating a virtual server? In other words, is this a correct sequence: create f5 pool -> create members -> create virtual server and set def pool along with other params (address, port, protocol, etc) ?



    Thank you,




  • That's actually a really good question, and the answer reveals quite a bit about how BigIP is setup. In short, no, you don't need to have a default pool setup. A Virtual Server is an object that you can assign a bunch of optional behaviors and attributes to - a pool is among them. From an iControl perspective, you'll probably need to specify that there's no default pool though - it doesn't handle default settings like the CLI or GUI does (which is a shame in my opinion).



  • Got it, thanks. I think I'll be better off creating a pool w members first. Otherwise, vserver would pretty much render itself useless.