Detailed network configuration of hyper-V Virtual Machine

Source: Internet
Author: User
ArticleDirectory
    • External Virtual Network
    • Internal virtual network and private virtual network
    • Set global MAC address
    • Networks in virtual machines
    • Virtual LAN (VLAN)
    • Summary

In recent years, the hottest It term is virtualization, cloud computing, with the release of Hyper-v2.0, server virtualization once again approached our side, in any virtualization environment, you need to consider the virtual network configuration, then, how does hyper-V Support the network and configure it? This article briefly introduces the hyper-V architecture and provides a detailed explanation of the network architecture and settings of hyper-V in practical applications, this gives you a comprehensive understanding of the virtual network operating mechanism.

Terms:

Virtual machines running on hyper-V servers: subpartitions, virtual machines, and guest

Physical servers running hyper-V: parent partition, management operating system, host

Introduction and architecture of hyper-V

Hyper-V is a server virtualization solution launched by Microsoft with Windows Server 2008. The latest version is hyper-V 2.0, which is released with Windows 2008 R2, its separate version is hyper-V Server 2008 R2, which adds a large number of new features to the previous version, especially live migration and Failover cluster) new server configuration tools, and so on. Physical System processors and memory support (4-way/24-core, 32 GB --> 8-way/64-core, 1 Tb ), in addition, the maximum number of virtual systems that can run is increased from 192 to 384. You do not need to restart the system while increasing the capacity. The hyper-V manager and scvmm2008 provide a dynamic, reliable, and scalable virtualization platform for managing physical and virtual resources to achieve lower total cost of ownership (TCO ).

Hyper-V CoreCodeThe driver is only several hundred kb and does not contain any third-party drivers.ProgramHosted in the parent partition together with the new IO sharing model, hyper-V architecture simplifies the layers between virtual machines and hardware, this architecture allows virtual machines and hardware to be connected only through a thin layer. Therefore, the execution efficiency of virtual machines is very high and hardware resources can be fully utilized, make the virtual machine system performance very close to the real operating system performance.

Hyper-V uses a high-speed memory bus architecture based on vmbus. It can directly pass through VSC for hardware requests (graphics card, mouse, disk, and network) from virtual machines, the VSP is sent to the root partition through the vmbus bus. The VSP calls the corresponding device driver to directly access the hardware without the help of hypervisor.

Shows the hyper-V architecture:

Hyper-V Network Operating Mechanism

Hyper-V supports the following three virtual networks by simulating a standard (ISO/OSI Layer 2) Switch:

External(External Virtual Network):Virtual machines can communicate with physical networks and local hosts.

This type of virtual network can be used when you want to allow sub-partitions (virtual machines or guest) to communicate with external servers and parent partitions (management operating systems or hosts. This type of Virtual Network also allows virtual machines on the same physical server to communicate with each other.

Internal(Internal virtual network):Virtual machines communicate with each other, and the virtual machine can communicate with the Local Machine

This type of virtual network can be used to allow communication between subpartitions on the same physical server and between subpartitions and parent partitions. An internal virtual network is a virtual network that is not bound to a physical network adapter. It is usually used to build the test environment required to connect from the management operating system to the virtual machine.

Private(Private Virtual Network):Only virtual machines running on this physical machine can communicate with each other

This type of virtual network can be used to allow communication between subpartitions on the same physical server. A private virtual network is a virtual network without a virtual network adapter installed in the parent partition. When you want to separate sub-partitions from the network communication in the parent partition and the external network, a private virtual network is usually used.

 

We recommend that you have at least two network adapters on the server running hyper-V, one of which is dedicated for remote management, one or more network adapters are dedicated to virtual machines (subpartitions). If you are using shared network storage such as San and iSCSI, you need two high-speed (Gbit copper or optical fiber cables) dedicated for network storage, we recommend that you have at least four network adapters in the production environment.

Practice: Rename each network adapter as a easy-to-remember and easy-to-understand identifier, for example, a network adapter dedicated for remote management-Manager

Hyper-V topology for an enterprise's production environment:

If you use system center Virtual Machine manager 2008 (scvmm), you can easily see the global or independent virtual network topology, as shown below:

External Virtual Network

For hyper-V servers, the most important thing is the external virtual network. To understand the external virtual network, we also understand the hyper-V network structure. Hyper-V External virtual network communication, by running "Microsoft Virtual Network Switch protocol (Microsoft Virtual Switch protocol)" on the physical network card )", simulate a standard (ISO/OSI Layer 2) switch that supports VLAN division. External virtual networks are basically used in the production environment. With VLAN settings, you can easily build a network suitable for enterprises.

After hyper-V is installed and an external virtual network is created, the computer runs in different ways. After installation, the parent partition uses a virtual network adapter to connect to the physical network. On the "Network Connection" of the parent partition, you will see the original network adapter and a new virtual network adapter. On the original physical network adapter, only the "Microsoft Virtual Network switching protocol" is bound ", the virtual network adapter is bound to all standard protocols and services (such as IPv4, IPv6, and Microsoft network clients ). The virtual network adapter displayed under network connection uses the same name as the vswitch associated with it. When an external virtual network is created or deleted, the external network connection is temporarily interrupted.

After creating an external virtual network, in addition to the software-based switch and the ability to dynamically add or delete ports as needed, the working principle of the virtual network is basically the same as that of the physical network, A vswitch functions as a physical switch. All network communication is transmitted to its destination through an external virtual network.

Therefore, we recommend that you use at least one other physical network adapter to manage network communication.

Generally, scvmm is used to configure the virtual network. More options such as VLAN trunk mode are provided in scvmm. In an external virtual network, we need to configure the network connection type (external), select the bound network adapter, VLAN mode, and so on, for the hyper-V Manager-External Virtual Network Configuration:

Internal virtual network and private virtual network

Compared with external virtual networks, internal and private virtual networks are much easier to understand.

Adding an internal virtual network is similar to adding an external virtual network, but you do not need to select the bound physical network adapter. A new virtual network adapter is added to the "Network Connection" of the parent partition, however, no changes will be made to the existing physical card. The internal virtual network only provides communication between subpartitions, subpartitions, and parent partitions.

The steps for adding a private virtual network are the same as adding an internal virtual network. The "network connection" in the parent partition does not add a virtual network adapter. A private virtual network only provides communication between subpartitions.

Set global MAC address

You can use the hyper manager to set the MAC address range that sub-partitions can use. Generally, you do not need to set it. In some special cases of P-V, we only need to assign MAC addresses to the NIC of the Virtual Machine (subpartition) separately.

Networks in virtual machines

When you create a virtual machine in hyper-V and connect to the virtual network, the virtual network adapter is used. There are two types of network adapters available for hyper-V:

L network adapter: an integrated network adapter in scvmm

The integrated network adapter is a new device used by hyper-V to provide better performance than the simulated network adapter. The merging network adapter requires that hyper-V Integrated Services (vgs and virtual guest services) be installed on the virtual machine ).

L old network adapter: a simulated network adapter in scvmm

The simulation is based on the intel 21140 Network Adapter. It can be used on all virtualization software (such as virtual PC and virtual server) platforms and supports PXE startup. Generally, the integration service cannot be installed due to operating system reasons (for example, the version is too old.

A port connecting a Virtual Machine (sub-partition) to a vswitch. To enable network applications on virtual machines to work with external network applications, first, it routes data packets to a virtual port (Port connecting to the Virtual Machine) on the external virtual network through the virtual network adapter, and then sends the packets to the external physical network through the physical network adapter.

Usually we need to configure the Virtual Machine network adapter: network connection, MAC address, VLAN, such:

Virtual LAN (VLAN)

Hyper-V supports both access and trunk. First, your network needs to support VLAN, at least your parent partition network adapter supports VLAN. The access mode is relatively simple. You only need to set the corresponding vlan id in the subpartition Network Adapter. The trunk mode allows multiple VLAN IDs to share the connection between the physical network adapter and the physical network. To enable external access to the virtual network in multiple VLANs, you must configure the port on the physical network to trunk mode. You also need to know the specific VLAN used and all VLAN IDs used by virtual machines supported by the virtual network. The trunk mode needs to be set in the system center Virtual Machine manager 2008.

Three Link types of Ethernet switch ports: Access, trunk, and hybird.

L access ports can belong to only one VLAN and are generally used to connect to the computer ports;

L a trunk port can be used by multiple VLANs to receive and send packets from multiple VLANs. It is generally used for ports connected between switches;

L a hybrid port allows multiple VLANs to pass through. It can receive and send packets from multiple VLANs. It can be used for Switch Connection or user computer connection.

Summary

Through the introduction above, we will learn three types of virtual network architecture, different virtual networks for different purposes, especially for external virtual networks commonly used in the production environment, and VLAN support. Hyper-V's network architecture differs greatly from VMware's network architecture. However, hyper-V's network architecture is simpler and more suitable for enterprise production environments. In the actual production environment, a powerful system center (mainly scvmm, scom, and DPM) will be used to manage the entire virtualization platform.

 

From: http://tech.huweishen.com/gongju/1343.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.