VirtualBox is a powerful, open-source virtualization software developed by Oracle Corporation. It allows users to run multiple operating systems (OS) simultaneously on a single physical machine. VirtualBox creates a virtual environment, known as a virtual machine (VM), in which users can install and run different operating systems, such as Windows, Linux, macOS, and others.
Users can configure various aspects of the virtual machines, including the amount of allocated memory, CPU resources, network settings, and storage options. VirtualBox supports features like snapshots, which capture the current state of a virtual machine, enabling users to revert to that state later if needed.
It’s widely used by developers, testers, and IT professionals for tasks such as software development, testing, running legacy applications, and creating isolated environments for experimenting with different configurations without affecting the host system. Additionally, VirtualBox is popular among users who need to run applications that are not compatible with their primary operating system.
Virtualization relies on the teamwork of the “host” computer (system), providing the main resources, and the “guest” systems.
Host systems
The host system, also known as the host machine or host operating system, is the physical computer on which the virtualization software is installed. It provides the resources necessary to create and manage virtual machines. The host system controls the hardware resources, such as CPU, memory, storage, and networking, and it runs the virtualization software, such as VirtualBox or VMware.
Guest systems
The guest system, also known as the guest machine or guest operating system, is the virtual environment created by the virtualization software on the host system. It’s essentially a simulated computer system running within the host system. Users can install and run different operating systems (guest operating systems) within these virtual machines, such as Windows, Linux, macOS, or others. Each guest system operates independently of the host system and other guest systems, with its own set of virtualized hardware resources.
The host system is the physical computer that hosts the virtualization software, while the guest system refers to the virtual machines running within the host system.
How to display a running guest server on the host
To display a running guest server on the host, you can follow these steps:
Retrieve the hostname
Open Terminal on the host and run the following command:
hostname
Output example
Ubuntu
Change network settings
- Open VirtualBox and select the virtual machine for which you want to configure this change.
- Click on “Settings” for the selected virtual machine.
- Click on “Network” tab.
- Under the “Adapter 1” tab, select the “Attached to” dropdown menu and choose “Bridged Adapter” from the list.
By configuring the network adapter to use a bridged connection, the virtual machine will be able to directly access your physical network, obtaining its own IP address and appearing as a separate device on your network.
Run the server on the guest
Start your development server.
Example
npm run
Display the running guest server on the host
Open your web browser on the host system to display the running server. Enter the following URL into the address bar.
http://<hostname>:port
If the host server is running on http://localhost:3000
, be sure to use port 3000.
Example
http://ubuntu:3000/
Now, you’ll be able to access the running guest server through the host’s web browser.