Hi,
Some question to come to the conclusion
1) Are you able to ping gateway after providing the IP address from the virtual machine ?
2) If you are trying to ping the VM with its hostname then to which IP address its showing ?
3) Trying to provide IP address having issue and then run a tracert through command prompt and check where its getting stuck
4) There are chances where you have registered the IP address and hostname in DNS server because of which it might getting clashes between the Old IP and VM name ?