VMware Cloud Community
deltatech77
Contributor
Contributor
Jump to solution

Multiple nics on a single linux vm

It seems this should be simple but, when I assign two nics to a single linux vm, the linux vm shuts down as soon as it finishes starting up and does it over and over again endlessly. It actually does a clean shutdown, watching the console, I see it starting to shut down all services the moment it gets them all started.

This started as soon as I added a second nic, and the problem went away as soon as I removed the nic.

What I am trying to do is have a second nic on a separate network which I use to communicate with only one other physical machine on my network using a static internal ip address.

I setup a separate virtual switch which has the second nic assigned to it. There is only one guest that uses that nic. Does anyone have any ideas why this would cause CentOS5 to keep shutting down and restarting endlessly?

0 Kudos
1 Solution

Accepted Solutions
PaulusG
Enthusiast
Enthusiast
Jump to solution

Sorry, in my previous message, actually one-liner I was not very clear.

I meant, what happens when you configure the VM with a second NIC and then reboot the VM in Recovery Mode od Single user mode?

Does the VM responds the same way or not?

The idea is to boot the VM with less services so that it keeps running and you will be able to do some research on the second NIC

Paul Grevink

Twitter: @PaulGrevink

If you find this information useful, please award points for "correct" or "helpful".

Paul Grevink Twitter: @PaulGrevink http://twitter.com/PaulGrevink If you find this information useful, please consider awarding points for "correct" or "helpful".

View solution in original post

0 Kudos
7 Replies
PaulusG
Enthusiast
Enthusiast
Jump to solution

After you have removed the second NIC, boot up the VM and check /var/log/messages or /var/log/syslog for any clues on the issue with the second NIC?

Paul Grevink

Twitter: @PaulGrevink

If you find this information useful, please award points for "correct" or "helpful".

Paul Grevink Twitter: @PaulGrevink http://twitter.com/PaulGrevink If you find this information useful, please consider awarding points for "correct" or "helpful".
0 Kudos
deltatech77
Contributor
Contributor
Jump to solution

No such luck finding anything useful in the logs. Just this line...

shutdown[4264]: shutting down for system reboot

But no clue what called for it. It only does it when the second nic is assigned to the machine. Even when there is no cable plugged into that nic. It even happens regardless of the OS bringing up that interface. Just having it assigned in vmware is all it takes to cause the problem.

0 Kudos
PaulusG
Enthusiast
Enthusiast
Jump to solution

Did you try booting the CentOS VM in recovery mode, with network support or Single user mode?

Paul Grevink

Twitter: @PaulGrevink

If you find this information useful, please award points for "correct" or "helpful".

Paul Grevink Twitter: @PaulGrevink http://twitter.com/PaulGrevink If you find this information useful, please consider awarding points for "correct" or "helpful".
0 Kudos
deltatech77
Contributor
Contributor
Jump to solution

No, it wasn't single user mode. Just a normal boot. I was actually able to SSH in while it was booting and look around and tail /var/log/messages watching for anything that might be causeing to do a shutdown.

There were no clues, but the "going down for reboot" message came to my ssh screen and sure enough, the console showed all the services being stopped until it shut down and started up again only to repeat same thing over and over. All I had to do to fix it was remove the second nic in vmware

0 Kudos
PaulusG
Enthusiast
Enthusiast
Jump to solution

Sorry, in my previous message, actually one-liner I was not very clear.

I meant, what happens when you configure the VM with a second NIC and then reboot the VM in Recovery Mode od Single user mode?

Does the VM responds the same way or not?

The idea is to boot the VM with less services so that it keeps running and you will be able to do some research on the second NIC

Paul Grevink

Twitter: @PaulGrevink

If you find this information useful, please award points for "correct" or "helpful".

Paul Grevink Twitter: @PaulGrevink http://twitter.com/PaulGrevink If you find this information useful, please consider awarding points for "correct" or "helpful".
0 Kudos
deltatech77
Contributor
Contributor
Jump to solution

HA! you were right. I had a service called asl-firstboot which was causing the problem. Disabled that from starting and the machine boots fine.

But, I am not out of the woods yet on this ethernet port.

I can't ping it from the esxi host, nor from anything else on the network.

The interface is up. according to ifconfig but no pings in or out.

eth1 Link encap:Ethernet HWaddr 00:0C:29:2F:3B:F3

inet addr:10.1.1.1 Bcast:10.1.1.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe2f:3bf3/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:50 errors:0 dropped:0 overruns:0 frame:0

TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:3000 (2.9 KiB) TX bytes:636 (636.0 b)

0 Kudos
PaulusG
Enthusiast
Enthusiast
Jump to solution

Good you have found the naughty service. Smiley Happy

You have eth0 and eth1 now on different networks aka portgroups?

I would try setting eth1 on the same network as eth0 and assign a proper IP address for testing purposes.

If that works, then reassigh to the original network and troubleshoot.

Another useful command in situations with >1 networks is: # route -n

Good luck

Paul Grevink

Twitter: @PaulGrevink

If you find this information useful, please award points for "correct" or "helpful".

Paul Grevink Twitter: @PaulGrevink http://twitter.com/PaulGrevink If you find this information useful, please consider awarding points for "correct" or "helpful".
0 Kudos