How to Access Server in VirtualBox from Host Machine

2 min


A simple tutorial to demonstrate how you can access any web server in VirtualBox from any host machine on the network.

If you run multiple virtual machines and a few of them as servers, you can easily access them using some small configurations in your VirtualBox. This helps when you need to monitor your server, or you just need to access some files on the guest machine.

In this article, I will show you the steps which are super easy to do. But first, make sure you have created Virtual machines using VirtualBox to do these steps.

Access Server in VirtualBox from Host

  • Open VirtualBox.
  • On the left-pane, select the virtual machine you want to connect to (server).
  • Open settings and go to “Network” tab on the left.
  • Click on the Adapter 1 tab and change the “Attached To” to “Bridged Adapter”. Select your current network interface name.
Change the network adapter to Bridged Adapter
Change the network adapter to Bridged Adapter
  • Press OK.
  • Start your virtual machine.
  • To demonstrate, I have created a simple web server (temporary) in one of my guest virtual machines using the following command. It creates a single threaded standalone http server runs on port 8000 (default). If you already have a server set up, you do not need this step.
python3 -m http.server
  • Now, in your virtual box virtual machine, find the IP address for your network interface. It should start with 192.x.x.x.
Finding IP of server in virtual machine and a sample web server
Finding IP of server in virtual machine and a sample web server
  • In the Guest machine, open a web browser, and type the IP address and port number.
  • Since it is a web server in this example, we can use a browser to access the virtual machine server.
Access server in virtualbox from host machine
Access server in virtualbox from host machine

Alternatively, if you have an SFTP server running in your virtual machine, you can easily connect via FileZilla or any FTP client using the same IP!

Moreover, you can also set up server monitoring remotely using the IP address.

That’s it.

Closing notes

I hope, using this guide, you can access your server or desktop in VirtualBox. Although there are other ways to share files in VirtualBox between guest and host, but this is the easiest way to do. And it is perfect for servers having multiple services running.

Do let me know in the comment box if this tutorial helps you.


Arindam

Creator and author of debugpoint.com. Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments