Hyper-V virtual machine Internet access

Source: Internet
Author: User

The Hyper-V manager built into Windows 8 can be said to surprise a lot of people! While Hyper-V Manager is powerful, it also faces some of the inevitable hassles of setup. Some people say that Hyper-V virtual machine networking trouble, in fact, as long as mastered the skills, but also just a lift.

Any computer, if not connected to the network, can be said to have lost most of the functionality, Windows 8 especially, the virtual machine is also the case.

Hyper-V does not recognize the network card of the physical machine, so you need to use the virtual network card through the physical machine's network share to implement the web link.

In the case of shutting down the Hyper-V virtual machine, select Virtual Switch Manager in the Hyper-V management interface.

In the popup dialog box, "New virtual network Switch", select "Internal" and click "Create Virtual Switch".

After naming the virtual switch, click "Apply". After a wait, you can see the newly added virtual switch on the left.

At this point, in Control Panel-network and internet-network and Sharing Center, you can see the following unrecognized links:

You can also see the following devices under "Change adapter Settings":

This is the virtual switch that was just created.

Although the virtual appliance is present, the virtual machine still does not link properly.

Under Network and Sharing Center, click an existing Internet link:

In the dialog box that pops up, select "Properties":

Switch to the "Share" tab, tick "Allow other network users to connect via this computer's Internet connection" and select the virtual Switch--vethernet (Hyper-V switch) you just created in the "Home network Connection" below and click "OK".

At this point, you will find information about 192.168.137.1 in the IPV4 routing table when you enter "route print" in the command prompt that runs in Administrator mode (right-click in the lower-left corner of the screen and select command Prompt administrator):

Next, go to the Hyper-V Virtual machine Setup interface, under hardware, in network adapters, set the virtual switch to the Hyper-V switch Virtual Switch you just set up, and click OK.

You can then restart the Hyper-V virtual machine, which is set to "Obtain IP address automatically" and "Get DNS server automatically" in the TCP/IP protocol under the corresponding network connection.

If you use manual settings, the IP address is set to "192.167.137.X", X is 2~255 any number, the subnet mask is "255.255.255.0", the default gateway is "192.168.137.1", and the DNS server is set to "192.168.137.1". Note here that the gateway with the DNS server is Microsoft default and there is no need to change it.

When you are sure, you will see that the virtual machine is ready for network connectivity!

If you change the network connection of the physical machine thereafter, you need to reset the share and share the same way.

In addition, if you find that the link in the virtual machine becomes an "unrecognized network connection" with a yellow exclamation mark on the Network icon, you can see if the routing table is normal at the command prompt as described earlier, if it does not contain 192.168.137.1 content (for example) indicates that the network share is not normal. You can disable the network share and then re-open it as described earlier.

In addition to using a shared internal network connection, you can also use an external network connection, but if the physical machine contains only one network card device, the physical machine network connection will be disconnected. (a NIC supports only one network connection at a time, and virtual machines are also equivalent to one computer, so they cannot be used simultaneously.) )

Hyper-V virtual machine Internet access

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.