Setup a 2 node mongodb replica set

Yes, You have setup on VM machine , to complete the quorum of 3 nodes add another node(Arbiter) on App server if you can’t afford new VM. Process is already clarified by @Doug_Duncan. Still you need help we are here to help you.