vmware conversion, lost network

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
computerhell
Posts: 6
Joined: Sun Mar 31, 2013 7:32 pm

vmware conversion, lost network

Post by computerhell »

I need to move an instlalation of Nagios 3.4.1 on Centos from an ESX 4.1 host to a 5.1 host.
I have run a conversion with the vcenter standalone converter.
When I power up the converted machine, I am unable to ping it.
When I type ifconfig, no eht0 adaptor is displayed, it is there on the machine before the conversion.

Can anyone point me in the right direction please?

Thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: vmware conversion, lost network

Post by slansing »

Is there a NIC assigned to the VM? If you view it's hardware options? This may be more of a vmware based issue rather than a Nagios specific problem.
computerhell
Posts: 6
Joined: Sun Mar 31, 2013 7:32 pm

Re: vmware conversion, lost network

Post by computerhell »

Thanks for your reply.

The same nic is still present in the VM settings, and I've tried adding another of the same type, but still nothing from ifconfig.
I've seen Windows VMs lose their IP settings after a conversion, but I always see a network card. I think possibly it gets a new NIC sometimes, sometimes I see the old IP settings hanging around in the registry.

So I think it's a Centos issue, but definitely brought about by the conversion. If this were a physical server, and I added a NIC, would it appear straight away in ifconfig?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: vmware conversion, lost network

Post by abrist »

Is the interface down?

Code: Select all

ifconfig -a
Is it's kernel module loading?

Code: Select all

lsmod
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
computerhell
Posts: 6
Joined: Sun Mar 31, 2013 7:32 pm

Re: vmware conversion, lost network

Post by computerhell »

Great, thank you. I'm getting somewhere now. I was not familiar with the -a option for ifconfig and had been trying to bring up eth0, which no longer exists and is now eth1.

I used ifconfig eth1 up.
Then set the IP, mask and gateway.
I was then able to ping and access the Nagios interface.

Unfortunately, when I reboot, the change is lost. Could anyone help make the change stick please?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: vmware conversion, lost network

Post by abrist »

You can set up static interfaces through the networking scripts config files. See the following links:
http://www.putorius.net/2012/10/how-to- ... ss-in.html
http://www.centos.org/docs/5/html/Deplo ... faces.html
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
computerhell
Posts: 6
Joined: Sun Mar 31, 2013 7:32 pm

Re: vmware conversion, lost network

Post by computerhell »

I've put the settings in ifcfg-eth1 and rebooted, but the nic is still down at startup.
I copied the ifcfg-eth0 file to the new name to ensure it was the same, and changed the device= line.
I've also tried changing device= in the original ifcfg-eth0 with the same result.

Close to a solution now but not quite there.

Thanks again everyone for the help.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: vmware conversion, lost network

Post by abrist »

If you bring up the device and restart the networking script does it auto-configure with your static settings?

Code: Select all

ifconfig eth1 up
service network restart
ifconfig eth1
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: vmware conversion, lost network

Post by lmiltchev »

Also, can you check if you have both NICs listed in the "70-persistent-net.rules":

Code: Select all

cat /etc/udev/rules.d/70-persistent-net.rules
Be sure to check out our Knowledgebase for helpful articles and solutions!
computerhell
Posts: 6
Joined: Sun Mar 31, 2013 7:32 pm

Re: vmware conversion, lost network

Post by computerhell »

Thanks a lot guys, I've got it working. :D

service network restart pointed out that the MAC was wrong for eth1. I corrected it and can now reboot and keep the network configuration.

To summarise, for future reference:

After using VMware converter, the original eth0 nic was removed and eth1 created.
I copied /etc/sysconfig/network-scripts/ifcfg-eth0 to ifcfg-eth1.
I deleted ifcfg-eth0.
I changed the MAC in ifcfg-eth1 to that of the new nic (visible in VM settings).
I restarted and was able to log in via the Nagios web interface.
Locked