1 2 Previous Next 28 Replies Latest reply on Mar 4, 2013 2:47 PM by cosy Go to original post
      • 15. Re: lost eth0 when using a copied ubuntu-server vm
        metrolinux Lurker

        For Ubuntu (6.06LTS)  it's:

         

        sudo cp /etc/udev/rules.d/25-iftab.rules /etc/udev/rules.d/25-iftab.old

         

        sudo rm /etc/udev/rules.d/25-iftab.rules[/b]

         

        Did the same trick.  Thanks for helping point me in the right direction, Rainer !

        • 16. Re: lost eth0 when using a copied ubuntu-server vm
          axl Lurker

          If you delete this file, it will be rebuilt during

          the next system startup and your problem should go

          away.

           

          rainer,

           

          thank you very much; i ran into this problem several times (newer debian sarge and etch) and this solution works pretty well!

           

          cu

          axl

          • 17. Re: lost eth0 when using a copied ubuntu-server vm
            cwheeler33 Lurker

            I had the same problem with Gentoo

            The Debian solution was very close to what I needed. Here is what I had to do.

             

            Edited the following file

            #vi /etc/udev/rules.d/70-persistent-net.rules

            changed the MAC address to that listed in the .vmx file.

             

            If you delete the file instead, it will recreate the file and add the new MAC address but will assign it to eth1 after the reboot. You will then need to go into the file and change it to eth0 and then reboot again.

            • 18. Re: lost eth0 when using a copied ubuntu-server vm
              mieslep Lurker

              Just had a similar problem with RedHat Enterprise Linux 4 (RHEL4).  These files don't exist, but I was able to determine that "/etc/init.d/network restart" solved my problem.  My recollection from Ubuntu is that the method should work there too.

              • 19. Re: lost eth0 when using a copied ubuntu-server vm
                gjstory Lurker

                I ran into this today as well.  ifconfig -a did not show eth0.  I did some things based on earlier posts before I got to the removal suggestion of the /etc/udev/rules.d/25-iftab.rules file.  I originally made changes to iftab and interfaces to reflect eth1 instead of eth0.  That did work like a charm until I ran apt-get upgrade.  I lost eth1.  ifconfig -a showed eth0 had returned.  I restored the backup of iftab and interfaces so eth0 was back.  I also rename /etc/udev/rules.d/25-iftab.rules to /etc/udev/rules.d/25-iftab.rules.old.  A reboot later and all is well.  Thanks to everyone for their suggestions.

                • 20. Re: lost eth0 when using a copied ubuntu-server vm
                  burke3gd Lurker

                  I ran into this problem on Debian Etch. If the vm only has one interface you can disable udev's interface cache by renaming the following rules:

                   

                  /etc/udev/rules.d/z25_persistent-net.rules --> /etc/udev/rules.d/z25_persistent-net.rules.disabled

                  /etc/udev/rules.d/z45_persistent-net-generator.rules --> /etc/udev/rules.d/z45_persistent-net-generator.rules.disabled

                   

                  The upside of this solution is that, as long as the vm only has one interface, it will always be named eth0, even if the mac address changes.

                   

                  The downside is that you will probably have to use manually configured mac addresses if you want any reliability with multiple interfaces. But this is true in the case of the other suggested remedies also.

                  • 21. Re: lost eth0 when using a copied ubuntu-server vm
                    Lance Rushing Novice

                     

                    For Ubuntu 8.04 I got eth0 work by doing the following:

                     

                    sudo rm /etc/udev/rules.d/70-persistent-net.rules
                    sudo reboot

                    Also I went back and removed the 70-persistent-net.rules from my gold source used for cloning.

                    • 22. Re: lost eth0 when using a copied ubuntu-server vm
                      harunsahiner Novice

                      hi Lance;

                       

                       

                       

                       

                      Your solution also applies to ubuntu 8.10 server edition .

                       

                       

                       

                      thank you.

                      • 23. Re: lost eth0 when using a copied ubuntu-server vm
                        oreostogo Lurker

                        Thanks lilboy716, 2 years later and this still seems to be a problem when copying a VMWare.

                         

                        This is what I had to do on Ubuntu:

                        sudo rm /etc/udev/rules.d/70-persistent-net.rules

                         

                        Thanks!

                        • 24. Re: lost eth0 when using a copied ubuntu-server vm
                          ronalddevos Lurker

                           

                          Same problem after a conversion of an Ubuntu server.

                           

                           

                          Your script DID fix it! Thanks!

                           

                           

                          • 25. Re: lost eth0 when using a copied ubuntu-server vm
                            dbtanner Novice

                            Clarification about the solution for ubuntu...as of version 8.04 (I think that's when the switch happened), /etc/iftab was replaced with /etc/udev/rules.d/70-persistent-net.rules.  At least looking at my 10.04 version, it's this.  So your fix will depend based on the ubuntu version you're running.

                            • 26. Re: lost eth0 when using a copied ubuntu-server vm
                              rfreytag Novice

                              (I had this problem with VMware Workstation 7.1.3 and as I had a support contract I called it in.  What follows is their working solution for a VM running Ubuntu Server 10.04 LTS on VMware Workstation - RCHF)

                               

                              The solution involves running commands in the command prompt in the Ubuntu Server virtual machine.

                               

                              Use your preferred text editor to open /etc/udev/rules.d/70-persistent-net.rules as root You may want to backup /etc/udev/rules.d/70-persistent-net.rules by using cp just in case.

                               

                              Two PCI devices should be listed.
                              The one listed as using pcnet32 will be named eth0 and will have the MAC address of the original virtual machine's network adapter.

                               

                              The second PCI device is listed as using vmxnet and will be named eth1 and will have the MAC address of the new network adapter.

                               

                              Replace the ATTR{address}=="" entry for eth0 with the ATTR{address}=="" entry for eth1 Once that's done delete the entire entry for the PCI device named eth1.
                              Save the file and reboot.

                               

                              Once the system is rebooted the issue will be resolved

                              • 27. Re: lost eth0 when using a copied ubuntu-server vm
                                sutoor Novice

                                Method 1:

                                 

                                - Uncomment the following line in /etc/udev/rules.d/70-persistent-net.rules

                                SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="YOUR_MAC", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

                                 

                                reboot machine or restart networking

                                 

                                 

                                 

                                Method 2:

                                 

                                - change eth0 to eth1 in /etc/network/interfaces

                                 

                                reboot machine or restart networking

                                 

                                edit: if you use method nr 2, you'll get a new line in /etc/udev/rules.d/70-persistent-net.rules when you reboot

                                 

                                 

                                • 28. Re: lost eth0 when using a copied ubuntu-server vm
                                  cosy Enthusiast

                                  HI Guys,

                                   

                                  After clone the VM got the DHCP assign IP. So i had look and found eth0 is missing. then i follow this

                                   

                                  So here’s how we fix it:

                                  1. Remove the kernel’s networking interface rules file so that it can be regenerated

                                     

                                    # rm -f /etc/udev/rules.d/70-persistant-net.rules

                                     

                                  2. Restart the VM

                                     

                                    # reboot

                                     

                                  3. UPDATE your interface configuration file

                                     

                                    # vim /etc/sysconfig/networking/devices/ifcfg-eth0

                                    Remove the MACADDR entry or update it to the new MACADDR for the interface (listed in this file: /etc/udev/rules.d/70-persistent-net.rules).

                                    Remove the UUID entry

                                    Save and exit the file

                                  4. Restart the networking service

                                     

                                    # service network restart
                                    But this VM is authenticate to Active Directory and now its not working?
                                  1 2 Previous Next