both virtual machines have same ip code example
Example: virtualbox machines have same ip
In VirtualBox control panel go to File -> Preferences -> Network
Select NAT Networks tab, create a new "NatNetwork" by clicking + button at side and press OK.
Now select each VM go to Settings -> Network
In Attached to: option choose NAT Network and select "NatNetwork" and press OK.
Restart all the VMs.
Now VMs have different network address.