Page 1 of 1

Getting VM to run on server in headless mode

Posted: 13. Jun 2016, 20:05
by cake_code
Hello all.

I downloaded a centos7 OVA from an application vendor, it in theory should work right out of the box. (it does via localhost by just launching it and entering localhost in browser)

What I want to do is make this .ova run the application thats on it and be able to point a browser at its IP and have the application displayed, like it does on localhost.

I have it running on a server (centos 7, no gui) in headless mode. I can start the vm fine but I need to be able to access its contents.

I've changed the vm to "bridged mode" so that I could use the host ip to access the application running on it (think apache)

I still have no idea how to make the application "seen" in a browser, or how to get into the vm without a gui on a server. the host is centos7 and the guest is also centos7.

Any ideas on how I could get this working within virtualbox?
Thanks!

Re: Getting VM to run on server in headless mode

Posted: 13. Jun 2016, 20:23
by Perryg
I've changed the vm to "bridged mode" so that I could use the host ip to access the application running on it (think apache)
You would actually use the guests IP to access what ever this app is. Be wary of firewall issues and never use localhost unless you are on the guest.

Re: Getting VM to run on server in headless mode

Posted: 13. Jun 2016, 20:24
by cake_code
Thank you very much for your response! Would it be accessible by multiple computers this way?

Re: Getting VM to run on server in headless mode

Posted: 13. Jun 2016, 20:31
by Perryg
Depending on the type of access you have yes and no. It should be available to all LAN connections but the Internet would require a public IP or forwarding in your router if available.

Re: Getting VM to run on server in headless mode

Posted: 13. Jun 2016, 20:38
by cake_code
Thank you its much appreciated.

Any Idea of how to go about "entering" the vm to make changes to the network configs to assign a static public ip?

Re: Getting VM to run on server in headless mode

Posted: 13. Jun 2016, 20:44
by Perryg
I would use ssh.

Re: Getting VM to run on server in headless mode

Posted: 14. Jun 2016, 22:04
by cake_code
Thanks again. I am still having some issues with this.

All I want to do is run the application in VM on server and point the ip at any browser and see it.
the address i get in vm is 10.0.2.15

I have port forwarded a port that is seen in netstat listening

how can I enter the servers IP followed by the port and have the application thats running show?

http://ip:port/ in browser.

Re: Getting VM to run on server in headless mode

Posted: 14. Jun 2016, 22:13
by Perryg
With port forwarding you would use the hosts IP and the guests port you defined.

Re: Getting VM to run on server in headless mode

Posted: 16. Jun 2016, 04:31
by Smackey's dad
It appears you are using Network Address Translation (NAT) as your network adapter. NAT does not allow access to the VM from pretty much anywhere. Not even the host, local LAN or WAN. Switch to Bridged Networking as it is the most versatile option for connecting in every direction. Once you switch to Bridged you should be able to access the VM from the host or LAN right away. I would also suggest you setup VRDE so you can get into the VM server console. Will help you setup the VM network configuration as desired. Finally you will have to open up ports on your router firewall for accessing the VM from the WAN/Internet.