You need to assign persistence always at virtual server level. Steps to create persistence and assign to virtual server.
Go to Local Traffic ›› Profiles : Persistence >> Click create button >> Select persistence type as cookie and then assign method based on your application requirement.
Once persistence is created go to Local Traffic > Virtual servers > Click on the virtual server to which you need to apply persistence > go to resources tab and select newly created cookie persistence and click update.
Please let me know any more information is required.