If you are thinking about installing Oneagent into a VM image, I think the best approach would be to perform an installation each time a machine is generated from that template (or initially started up). I'd recommend writing a script that would download the agent and install it. After a successful installation the script would disable itself.
By using this method your VM will always have the most recent agent. Also, you can easily script to download the correct installation package for the environment - handy in case the VM image will be used in different environments.