Can I run JMeter in VM?
Will I get accurate performance?
JMeter runs on top of Java Virtual Machine therefore it doesn't care about underlying operating system and hardware so the answer is yes, you can run JMeter on virtual machine. Moreover, there are several service providers which offer "JMeter as a service" and they run JMeter using cloud VM services like Microsoft Azure or Amazon EC2
Just make sure you monitor your VM resources like CPU, RAM and Swap usage along with Disk and Network IO to ensure that JMeter has enough headroom for operating, otherwise you may run into a situation when throughput is low because JMeter is not able to send requests fast enough. The majority of operating systems have bundled programs and commands which allow to monitor baseline OS health metrics, you can use PerfMon JMeter Plugin which can be integrated with your load test. See How to Monitor Your Server Health & Performance During a JMeter Load Test article for plugin installation and configuration instructions.