0

The Mistry of Ethernet not seeming in Ubuntu under VM after mac transformed

Recently I used to be doing a remote installation of Ubuntu Server as a guest VM in ESXI five.1 in INDIA/PUNE. It had been OS demand to alter the default dynamic Macintosh created by VM to another mounted Macintosh address thanks to AN application demand that was bind with the precise Macintosh address. when dynamic Macintosh address to needed Macintosh address e.g.: 00:0h:c1:96:1c:98 via esxi shopper in guest vm networking properties , after I rebooted Ubuntu, the LAN adapter didn’t not appeared within the networking interfaces list. If I manually attempt to quote the interface by ipconfig eth0 up or ipconfig eth1 up, I receive following error.

SIOCSIFADDR: no such device
eth0: ERROR whereas obtaining interface flags: No such device
Bind socket to interface: no such device
Failed to quote eth0

when I revert it to default (dynamic) it works ok.

After investigation deeply, it unconcealed that it occurred as a result of if we tend to clone a virtual machine, it creates a replacement Macintosh address for every network adapter. The guest OS detects this is often a replacement network adapter that has been inserted, however retains configuration for the previous network adapter (name and mac).

So here is however I mounted it

Login to your Ubuntu server (which is put in underneath vm) with root access ,

Open the file /etc/udev/rules.d/70-persistent-net.rules in nano.

nano /etc/udev/rules.d/70-persistent-net.rules
You will see one thing like below . (After biological research of mac)

 # This file was automatically generated by the /lib/udev/write_net_rules
 # program, run by the persistent-net-generator.rules rules file.
 # You can modify it, as long as you keep each rule on a single
 # line, and change only the value of the NAME= key.
  
 # PCI device 0x1022:0x2000 (pcnet32)  # Entry Ethernet adapter before cloning
 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:11:3b:6a:8c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
  
 # PCI device 0x1022:0x2000 (pcnet32)  # Entry Ethernet adapter after cloning
 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0h:c1:96:1c:98", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1” 

Now merely take away the primary entry that is previous interface entry with Macintosh 00:0c:11:3b:6a:8c,

and in second entry that is eth1, amendment it to eth0

so when writing the file can seem like following.

Now merely take away the primary entry that is previous interface entry

with Macintosh 00:0c:11:3b:6a:8c,

and in second entry that is eth1, amendment it to eth0

so when writing the file can seem like following.

 # This file was automatically generated by the /lib/udev/write_net_rules
 # program, run by the persistent-net-generator.rules rules file.
 # You can modify it, as long as you keep each rule on a single
 # line, and change only the value of the NAME= key.
  
 # PCI device 0x1022:0x2000 (pcnet32)
 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0h:c1:96:1c:98", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" 

Save the file and exit.

Now merely resuscitate the Ubuntu server, so check your interface by

ifconfig

hopefully it’ll seem within the list.

TIP: To avoid such problems, continually amendment the Macintosh address before OS installation

Asad Mukhtar

Leave a Reply

Your email address will not be published. Required fields are marked *