Forum Discussion
Ansh_Jain_36819
Nimbostratus
Dec 04, 2018Trying to add persistence profile in existing virtual server
I am trying to add persistence profile in an existing Virtual server but not able to do so. It is showing some errors.
Add-PSSnapIn iControlSnapIn
Initialize-F5.iControl -Hostname "hostname" -User...
Satoshi_Toyosa1
Dec 10, 2018Ret. Employee
I do not know PowerShell, but from the error message,
The requested virtual server
(/Common/iControl.CommonVirtualServerDefinition) was not found
, I would say that the virtual does not exist. Check if exists.
If that's not the case, I suspect the data format of the persistence profile(s). It must be given in array (
[]
). For example, to perform the task equivalent to the following tmsh command (adding cookie
persistence profile to the virtual vs
😞
tmsh modify ltm virtual vs persist replace-all-with { cookie }
You need to PATCH the
/mgmt/tm/ltm/virtual/vs
endpoint with the data {"persist":[ {"name":"cookie"} ]}
.
A curl call looks like this:
curl -sku : https:///mgmt/tm/ltm/virtual/vs \
-X PATCH -H "Content-type: application/json" \
-d '{"persist":[ {"name":"cookie"} ]}'
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