I have a powerful PC with 32GB memory and a Intel Xeon E3-1230 V2 CPU. I want to do some testing in VM. I want to know can I run a VM totally in memory to speed up the operations?
You can set up a RAM disk and put your VM VHD file on it.
IMDisk is a good, free RAMdisk software on Windows if you want to try it out. Paying alternatives such as Primo RAMdisk gives you better performance, more backup management options and dynamic memory allocation (so you can create a 16GB ram disk, but it will only use 10GB if that's what the VM size is).
However, you should also consider simply putting your VM on a SSD. Their speed is quite fast for this type of tasks, much simpler to manage, and leave more RAM free for the VM guest or other tasks. I'd strongly recommend you benchmark some of your tasks to see if the improvement over a SSD is worth the trouble before committing to regular RAMDisk usage.