VirtualBox virtual Ubuntu system and host ping

Source: Internet
Author: User

VirtualBox virtual Ubuntu system and host ping

The premise of mutual ping is that the IP address of the host and virtual machine is in the same band [eg: Host: 192.168.1.10 virtual Linux: 192.168.1.11]

1. Set the Host ip Address:

Open Network Sharing Center-> change adapter settings-> Ethernet, modify its ip address

Run CMD on the host and enter ipconfig as follows:

2. Set the Virtual Machine ip Address:

Open the terminal and run it as root

Run sudo gedit/etc/hosts to modify the settings as follows:

Run sudo gedit/etc/network/interfaces to modify the settings as follows:

Run sudo gedit/etc/resolv. conf to modify it as follows:

The DNS of the host is followed by the nameserver. Different machines correspond to different

Restart NETWORK SERVICE

Sudo/etc/init. d/networking restart

Disable Firewall

Sudo ufw disable

3. Virtual Machine network connection settings:

In this test, if the Virtual Machine network format is set incorrectly, it will not be pinged, so pay special attention to it.

If the host is connected to WiFi, choose Virtual Machine Settings> network> enable network connection (bridging network card, Realtek... Wireless Lan .......)

If the host is connected to a wired network, choose Virtual Machine Settings> network> enable network connection (bridging network card, Realtek PCIe GBE Family ........)

So far, all settings have been set successfully, and the host and the virtual machine can ping each other.

Related Article

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.