A virtual machine is installed on the deep Linux physical machine with the help of VirtualBox, but the virtual machine cannot be accessed directly on the physical machine (deep Linux system). What should we do? Let’s take a look at the solution to this problem.
The IP address of the virtual machine is 10.0.2.15, as shown in the figure below. In the physical machine (deepin Linux system), direct SSH connection cannot be accessed normally（Openssh server service installed）, stuck there all the time without any reaction.
Solve the above problems,Run VirtualBox first, clickAdministration“, select”Global settings“。
In the pop-up interface, selectnetwork“——”Host only network“. click the + sign as shown in the figure below to add.
After adding, click the location icon shown in the figure below to configure it.
Check “in the pop-up window”Start the server“Set the corresponding server address and range, which can be set by referring to the figure below. Click after setting.”ok“Save.
After exiting the global settings, select the virtual machine that cannot be logged in, and click“set up”。
Select in the pop-up window“network”。
Click on the network interface“Network card 2”As shown in the figure below,Check “enable network connection”.
Select “host only” as the connection method, and then save the settings.
Restart the virtual machine after saving,At this time, the virtual machine is equivalent to two network cards, one of which realizes communication with the host. A card to access the InternetAt this time, there are already two IP addresses, as shown in the following figure.
Direct access on physical machine192.168.56.101You can log in with your IP address.
The above is the solution that Linux cannot access VirtualBox. I hope you like it. Please continue to pay attention to developeppaer.