Getting back on track of the problem at hand.....
Can you ping from one Virtual Machine to another Virtual Machine using its IP address?
If No, look for firewalls inside the Virtual Machines that are blocking ICMP pings.
If Yes, your problem is with the format of Hosts or the resolve order specified in the
the virtual machines
Edit /etc/hosts like you have already done, then reboot that vm (because some distros will not re-read hosts).
Look at /etc/nsswitch.conf in the virtual machines.
Read this web page for ubuntu https://help.ubuntu.com/10.04/serverguide/network-configuration.html and scroll down to the Name Service Switch Configuration section. Make sure your nsswitch.conf files include a line for hosts and that line includes the word files (preferably as the first option) as shown in that section.
(This varies by different distros. I mention this nsswitch infor because some machines and some distors are set up to ignore hosts files, or put them farther down the line, which can cause them to be skipped in certain cases).