Forum Discussion
damian_19221
Nimbostratus
Feb 19, 2015iControl to disable a virtual server
Hi,
Apologies for probably asking a really basic question, but this is my first foray into iControl! We need to disable a virtualserver on our F5 during a maintenance window. I was looking into creat...
StephanManthey
Nacreous
Feb 19, 2015Hi Damian,
maybe using REST is an option?
To retrieve a list of virtual server direct links you can use the following request:
curl -s -k -u admin:admin -H "Content-Type: application/json" -X GET https://localhost/mgmt/tm/ltm/virtual?\$select=selfLink | grep -ioE '"selfLink":"[^"]+"'
It will return the links to access the virtual servers.
To enable / disable a specific virtual servers you can do the following:
curl -s -k -u admin:admin -H "Content-Type: application/json" -X PUT -d '{"enabled":true}' https://localhost/mgmt/tm/ltm/virtual/~Common~vs_101_8081
curl -s -k -u admin:admin -H "Content-Type: application/json" -X PUT -d '{"disabled":true}' https://localhost/mgmt/tm/ltm/virtual/~Common~vs_101_8081
Thanks, Stephan
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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