23 April 2012 Joe Chan

I recently had a customer who had accidentally removed the vNIC from his VCVA.

Upon boot up, the VCVA had issues connecting to the network.

Normally, I would suggest just re-deploying the VCVA, but the customer did not want to rebuild his VCVA.

We ran ifconfig, and we saw this:

localhost:~ # ifconfig  
lo Link encap:Local Loopback  
inet addr:127.0.0.1 Mask:255.0.0.0  
inet6 addr: ::1/128 Scope:Host  
UP LOOPBACK RUNNING MTU:16436 Metric:1  
RX packets:180 errors:0 dropped:0 overruns:0 frame:0  
TX packets:180 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:0  
RX bytes:66116 (64.5 Kb) TX bytes:66116 (64.5 Kb)  

Where was eth0?

localhost:~ # ls /etc/sysconfig/network |grep eth  
ifcfg-eth0  

The interface’s script appeared to be there.

I looked at /var/log/messages on the VM during boot and it looked like the current adapter was being identified as eth1, and it was failing to come up.

We then looked at /etc/udev/rules.d/70-persistent-net.rules:

\# 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.  
\# PCI device 0x15ad:0x07b0 (vmxnet3)  
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?\*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{type}=="1", KERNEL=="eth\*", NAME="eth0"  
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?\*", ATTR{address}=="yy:yy:yy:yy:yy:yy", ATTR{type}=="1", KERNEL=="eth\*", NAME="eth1"  

where xx:xx:xx:xx:xx:xx was the MAC address of the vNIC he had removed and yy:yy:yy:yy:yy:yy is the MAC of his current existing vNIC.

We replaced his old 70-persistent-net.rules with:

\# 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.  
\# PCI device 0x15ad:0x07b0 (vmxnet3)  
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?\*", ATTR{address}=="yy:yy:yy:yy:yy:yy", ATTR{type}=="1", KERNEL=="eth\*", NAME="eth0"  

We then rebooted the VCVA, and it came online with no problems.


blog comments powered by Disqus