Because the system accesses the Internet in VirtualBox by default. In this way, virtual machines can access the external network, but the external network cannot access the virtual machine, and even the host machine cannot access the virtual machine. In this way, we cannot remotely connect to the Linux host using ssh tools (such as secureCRT and petty) in Windows for experiments. [Using vmwarevm in Windows, NAT can directly achieve mutual access between host machines and virtual machines. This is also Virtual
Because the system accesses the Internet in VirtualBox by default. In this way, virtual machines can access the external network, but the external network cannot access the virtual machine, and even the host machine cannot access the virtual machine. In this way, we cannot remotely connect to the Linux host using ssh tools (such as secureCRT and petty) in Windows for experiments.
[Using vmwarevm in Windows, NAT can directly achieve mutual access between host machines and virtual machines. This is also the difference between VirtualBox and VMware .]
Host environment: Lenovo notebook, installed Ubuntu12.04, using VirtualBox virtual machine, virtual machine installed CentOS-5.5.
Objective: The host machine can communicate with the CentOS of the virtual machine. It is like using secureCRT to remotely log on to Windwos.
Procedure:
1) create a wireless connection in the host, such as CentOS-5.5
2) After a wireless connection is established, set the connection mode of the Virtual Machine System to bridging, and select the wireless network card (wlan0) for the NIC)
3) Start the virtual machine, start the system, and execute the ifconfig command in the host machine and virtual machine. The IP addresses of the two hosts are already under the same network segment, the two hosts can achieve normal communication. [At this time, the host machine cannot connect to the external wireless network. It can only achieve normal communication between the two hosts. You need to continue learning. * ^_^ *]
Note: You must create a new wireless connection and then select the bridging method of the wireless network card. Otherwise, the bridge function cannot be implemented.
Reading:
VirtualBox 4.2.12 install Ubuntu 13.04 http://www.linuxidc.com/Linux/2013-06/85352.htm
Install Win7 http://www.linuxidc.com/Linux/2012-11/74195.htm with Virtualbox in Ubuntu 12.10
Ubuntu 12.04.2 install VMware-Workstation-9 http://www.linuxidc.com/Linux/2013-03/81078.htm
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2