Reasons and solutions for the loss of network card of Linux virtual machine under Hyper-V

Source: Internet
Author: User

Reasons and solutions for the loss of network card of Linux virtual machine under Hyper-V   virtualization The company has implemented virtualization, all using Microsoft Windows R2 Enterprise with Hyper-V makes the cluster run Hyper-V virtual machine. This is a good thing, save resources, centralized management, power saving, deployment ultra-fast, the key is to live migration.   We use the Dell Md3000i enclosure as a clustered shared disk, which is iSCSI-based Gigabit Ethernet network storage, a piece of Dell PowerEdge R610 Server made a Windows Cluster, the switching device is juniper EX22000-48T-4G full Gigabit switch with jumbo frame support turned on.   As we all know, Microsoft's Hyper-V is good for your own Windows virtual machines, and there are special drivers. Even so Linux we also ran a lot of virtual machines, mainly because Windows Hyper-V is cheap and affordable than ESX.   Here are some embarrassing things about Linux virtual machines and Hyper-V 1. Network card to choose the old, the driver just released on the Hyper-V Linux virtual machine is the most deadly point is the network card driver, when we create a new Linux virtual machine, when the Linux system turned out to find that the network card can not be used, Because neither Rhel nor Ubuntu or poop Linux systems support Hyper-V network card drivers. This requires that we remove the network Adapter NIC attached to the Linux virtual machine in Hyper-V Manager and add a legacy network Adapter, which can be modeled as a classic old-fashioned NIC, Linux is generally integrated with the driver of this network card, the installation of networks can be used.   Good news is that Microsoft August just released can support Rhel and Ubuntu under Hyper-V virtual machine driver, the need for friends can be Google on the internet, only hundreds of K, very small.  2. God, what about My network card? Do a cluster, then the migration is not necessary to avoid, sometimes we need to restart maintenance of a server, need to run on its own virtual machine in real-time migration to other servers, migration is smooth, but found that after the Linux system migration, the network card can not be found, Ifconfig can only see an LO local loopback network card, where is eth0?   Quickly check the network configuration, sudo vi/etc/network/interfaces, find the configuration is in, that is why eth0 did not?   Using Ifconfig -A to see all the network card, found Eth0, but more out of the eth1. Brainwave, change it. interfaces file  sudo vi/etc/network/interfaces replace eth0 with eth1 and restart Network Service sudo/etc/init.d/networking restart   Haha, Nic good ~~ 3. And tragic again later, there is an Ubuntu 9.10 64-bit version after the migration, this trick is not good, because eth1 also did not find, and then manually deleted the Ubuntu network configuration file after restarting, just fine. sudo rm/etc/udev/rules.d/70-persistent-net.rules  after a summary, Linux network card is lost because Hyper-V a new virtual machine assigned by default network card MAC address is dynamic, Each migration of the host causes the new Mac to be reassigned to Ubuntu, and then the eth0 is not found, and sometimes a eth1 is generated automatically. If you can remember the previous MAC address, it is also possible to manually designate the Mac as the old Mac before the migration on Hyper-V manager, but the question is who will remember the MAC address?   So AH ~ ~ Erase the Ubuntu network configuration cache file is the king, or on the Hyper-V Manager to the Linux assigned to the MAC address is set to static.   hyper-v install Linux virtual machine considerations 1. When creating a virtual machine, don't worry about the dress system, replace the network card with legacy network Adapter2. The network card MAC address is not dynamic, specified as static 3. Microsoft just got out of the new Hyper-V Linux Drive and hastened to install 4. Nic lost after Ifconfig-a see is not eth0, more out of eth1, and then change interfaces Configuration 5. The ultimate Dafa is to delete the Linux network configuration cache sudo rm/etc/udev/rules.d/70-persistent-net.rules

Causes and solutions for the loss of network adapter for Linux virtual machines under Hyper-V

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.