Communication between Ubuntu and VirtualBox

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.