I am not sure what you mean by the same gateway, IF they all have the same gateway then they are on the same network segment and it is as simple as giving the VMs a static IP, in Linux depending on which flavor there should be plenty of info on google how to set the ip if it's Windows it is even...