Virtualbox -- set the ubuntu Virtual Machine network in win7

Source: Internet
Author: User

Virtualbox -- set the ubuntu Virtual Machine network in win7

Using virtualbox in XP to install the ubuntu virtual machine makes it easy to configure network connections. Use nat to access the Internet; use bridging to allow the host to access the virtual machine. That is, you can configure two NICs. In win7, this is not the same thing. Nat can be used to access the Internet, but the configuration of the bridging Nic is much more troublesome. The static address is used for bridging. The host can access the virtual machine, but the virtual machine cannot access the network and ping Baidu. The dynamic address is used for bridging. The virtual machine can access the Internet, but the host cannot access the virtual machine.

A lot of trouble has been encountered during the tamping process. Then I went to the Internet and found a solution. Mark it here. To put it simply, use host only + to bridge the NIC.
The host uses a Wi-Fi connection, which may lead to a different problem than mine. Open Control Panel-> network and Internet-> network and sharing center, my situation

Select the above wireless network connection. The following dialog box is displayed:

Select the attribute button in the lower left corner:

Set "allow" in "sharing" and select VirtualBox Host-Only Network in the home Network connection.
Note that the global settings are as follows:



The above function is to disable the DHCP server in the global network settings. This is very important and is directly related to the smooth operation of the following operations.
Before starting your own virtual machine, set the network in it. My settings are as follows:


Note that Nic 1 is host-only and nic 2 is bridging. For some online references, this sequence is necessary. Articles for reference: VirtualBox Virtual Machine CentOS is used to access the Internet and communicate with each other.
In some systems, the control chip should be set to Intel PRO/1000 MT desktop (82540EM ). I have encountered this problem. You can refer to it.
When installing virtualbox, you need to install the VirtualBox Extension Pack. When downloading virtualbox, pay attention to the following connection to find it. You can see it at the bottom.

My virtual machine is copied from other places. Because the installed Enhancement Tool is a bit old, update it.

Do another thing before installing the Enhancement Tool. Because my virtual machine is not newly installed, there will be a previous Nic set in the Virtual Machine System, You need to delete them first.

You can delete the files in/etc/edev/rules. d. It is automatically generated after the VM is restarted.

Install the Enhancement Tool under ubuntu. The iso file of the enhancement tool will not be automatically mounted. You need to mount it by yourself. Generally, You need to mount/dev/cdrom. If there is no/dev/cdrom, in that case, Mount/dev/sr0, which is generally acceptable. Note that the driver file cannot be run in the mounted folder. I copy the file to another place and then run it. You can refer to the figure above for the basic installation process.
After the installation is complete, restart the system. At this time, it is generally run.

We can see that there is a 192.168.137.167 address, which is used to connect to the virtual machine.
Ping the baidu. The ping is successful:

Use xshell to access ubuntu. login successful:

Ping the baidu in xshell, and the operation is successful:

Now, the virtualbox network configuration is complete.

Source http://www.cnblogs.com/getong/archive/2013/04/23/3037200.html

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.