I have a policy that I had written it in XACML and I want to test it in a virtual environment, so I want to know how to add Policy Enforcement Point(PEP) to the virtual machine... Any Idea?
To understand how to deploy a PEP anywhere, you need to understand what you will be intercepting. For instance, if you are protecting a web service API, then you need to know whether your PEP would be an API gateway or an interceptor within the web services framework or just code within the web service itself.
Similarly, for a virtual machine, what technology are you using? Do you want to run the PEP inside a VM (e.g. VMWare, Docker...) or do you want to enforce access to that virtual machine? If it is the latter, then what interfaces are available? Are there hooks?
Share your architecture in your question and I may be able to refine this answer.
PS: Postman and SoapUI are a pretty easy way to test a PDP. They are a PEP of sorts though they do not enforce decisions.