Fixed IP in Virtual Machine

If I install freepbx in a VM, such as VirtualBox or VMware, how would I configure it to have a fixed IP from my hardware router.
I need to be able to connect to it via its IP on the same network (or via port forwarding). I am on Windows 7 w/ both VMware and VirtualBox. I am also on WiFi but I can use Ethernet if needed.