I struggled with this as well. The best I could come up with was to do a "vfiler status" on all the controllers, then look for the vfiler name and match it. We only had a few controllers, so this wasn't too bad to do dynamically - but if you've got a big environment, maybe you could have a nightly job to list the vfilers, then pull from that list?
Bill