REST service not working on VM

have published a rest service locally on my laptop with studio pro and it works fine and i get back the api output. http://localhost:8080/rest/my_service_name/v1 but when i package it and push it to a VM, this no longer works. i tried changng the link “localhost” to piont to the vm name, but no luck. is there any other setting i need to take care to get this working  http://<vmname>:8080/rest/my_service_name/v1  
1 answers

You’re using port 8080 for your VM host, but did you open this port in your VM?