You didn't mention what VM software you are using but I will give you an example assuming you are using VMware Workstation.
In VMware, go to VM Settings and look for the setting for Network Adapter. I am assuming you are set to NAT. On my PC when I use that setting, my Ethernet adapter gets set to 192.168.200.xx. Now that is an issue because my PLC is using 192.168.1.xx. So my computer is on one network and my PLC is on a separate network. However, my PC acts as a sort of router allowing me to ping the devices on the other subnet.
In RSLinx, when you select the EtherNet/IP driver, by default it browses the network your computer is on. So while you would be able to ping the device, the EtherNet/IP driver would not be able to see it. Because it is on the wrong network. So to fix that open the EtherNet/IP driver settings and select Browse Remote Subnet. Then specify the first IP address in the range you want and the mask. So for me I entered 192.168.1.1 and 255.255.255.0. Now RSLinx EtherNet/IP driver can discover the devices on that network.
The alternative, as mentioned, would be the RSLinx Ethernet Devices driver where you type in the specific IP address you want to work with. That driver will not discover devices. It only identifies the ones you manually entered.
Hope that helps,
OG