WobbleWobble
Contributor
Contributor

ESX 3.5 and I appear to have lost all networking.

Jump to solution

DL580 G4 with ESX3.5. I have migrated all the guests to another ESX server but it has gone a bit strange to say the least.

After migrating all the guests off I went ahead and added more ram and rebooted. Server come up OK, tells me the IP to connect to (static) but thats it.

I can ping 127.0.0.1, but not the static host ip, I get an error "connect: could not connect to the network"

If I check the following localions I get zero info in files

/etc/hosts

etc/network-scripts/ifcfg-vswif0

etc/vmware/esx.conf

if I try to list nics I get no nics listed, if I list network hardware I get hardware type and mac address.

I cannot see any vmware switches if I try esxcfg-vswitch -l

I have tried restarting network and a few other services I've found on Google, to now avail.

If I boot using ERD Commander and enable networking I cannot use the 2 onboard nics but can use the 2 extra network cards/ 4 ports and can ping/ map external drives.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal

Hi There,

I think this could be a case of corrupt esx.conf file. After upgrading the host by adding more ram or other component you might need to update the initrd image which you did not and this results in corrupting of your esx.conf file. Till this time this is the only imagination I can take.

Now there are straight forward process of recovering the original esx.conf file. Please look at the below procedure.

#

Connect to the ESX host with an SSH client or connect directly to the ESX console using KVM.

#

Back up the corrupted esx.conf file using the command:

cp esx.conf /tmp/esx.bad

#

Copy the image to a temporary directory using a command similar to:

cp /boot/initrd-2.4.21-47.0.1.ELvmnix.img /tmp

Note: The initrd version of the image is different than the ESX 3.x version. If the version in the cp /boot/initrd-2.4.21-47.0.1.ELvmnix.img /tmp command is different, cd to the /boot directory and run the ls command to see your version.

#

Uncompress the image file using the command:

cd /tmp

gunzip -dc initrd-2.4.21-47.0.1.ELvmnix.img > initrd.unziped

#

Make a directory and mount the uncompressed image using the commands:

mkdir initrd

mount -o loop initrd.unziped initrd

#

Copy the esx.conf file from the mounted directory to /etc/vmware/ using the commands:

cd /tmp/initrd/etc/vmware

cp esx.conf /etc/vmware/

#

Unmount the directory mounted in step 5 using the commands:

cd /tmp

umount /tmp/initrd

#

Restart the management agents for the changes to take effect.

Now the other solutions could be looking at recreating ESX Service Console and see if that can help. Procedure is as below:

On your system the vswif, vmnic, vSwitch numbers and network settings are different.

1.

Run the following command to list the name of the vswif adapter:

esxcfg-vswif -l

2.

Run the following command to delete the vswif adapter:

esxcfg-vswif --del vswif0

3.

Run the following command to list the name of the vSwitch:

esxcfg-vswitch -l

4.

Run the following command to delete the vSwitch:

esxcfg-vswitch -d vSwitch0

5.

Run the following command to create the vSwitch:

esxcfg-vswitch -a vSwitch0

6.

Run the following commands to create default port groups for vSwitch:

esxcfg-vswitch -A "VM Network" vSwitch0

esxcfg-vswitch -A "Service Console" vSwitch0

7.

Run the following command to create the vswif adapter:

esxcfg-vswif --add --portgroup "Service Console" --ip=nnn.nnn.nnn.nnn --netmask=255.255.255.0 vswif0

8.

Run the following command to verify that the settings in the network file are correct:

cat /etc/sysconfig/network

NETWORKING=yes

GATEWAYDEV=vswif0

HOSTNAME=host.domain.com

GATEWAY=nnn.nnn.nnn.nnn

9.

Run the following commands to list all of the network adapters and associate a vmnic which has a link status of up:

esxcfg-nics -l

esxcfg-vswitch -L vmnic1 vSwitch0

10.

Run the following command to verify that the vmnic is associated with the vSwitch:

esxcfg-vswitch -l

11.

Ping an IP address to check for network connectivity. If the ping fails remove the previous vmnic from the vSwitch and try another adapter that has a

link status of up.

esxcfg-vswitch -U vmnic1 vSwitch0

esxcfg-vswitch -L vmnic2 vSwitch0

12.

Run the following command to change the vlan ID of a vSwitch

# esxcfg-vswitch -p "VM Network 1" -v 10 vSwitch0

13.

If you make any manual changes to /etc/sysconfig/network, run the following command to restart the network service:

service network restart

If you find this helpful please mark some reward points for this.

View solution in original post

0 Kudos
4 Replies
admin
Immortal
Immortal

Hi There,

I think this could be a case of corrupt esx.conf file. After upgrading the host by adding more ram or other component you might need to update the initrd image which you did not and this results in corrupting of your esx.conf file. Till this time this is the only imagination I can take.

Now there are straight forward process of recovering the original esx.conf file. Please look at the below procedure.

#

Connect to the ESX host with an SSH client or connect directly to the ESX console using KVM.

#

Back up the corrupted esx.conf file using the command:

cp esx.conf /tmp/esx.bad

#

Copy the image to a temporary directory using a command similar to:

cp /boot/initrd-2.4.21-47.0.1.ELvmnix.img /tmp

Note: The initrd version of the image is different than the ESX 3.x version. If the version in the cp /boot/initrd-2.4.21-47.0.1.ELvmnix.img /tmp command is different, cd to the /boot directory and run the ls command to see your version.

#

Uncompress the image file using the command:

cd /tmp

gunzip -dc initrd-2.4.21-47.0.1.ELvmnix.img > initrd.unziped

#

Make a directory and mount the uncompressed image using the commands:

mkdir initrd

mount -o loop initrd.unziped initrd

#

Copy the esx.conf file from the mounted directory to /etc/vmware/ using the commands:

cd /tmp/initrd/etc/vmware

cp esx.conf /etc/vmware/

#

Unmount the directory mounted in step 5 using the commands:

cd /tmp

umount /tmp/initrd

#

Restart the management agents for the changes to take effect.

Now the other solutions could be looking at recreating ESX Service Console and see if that can help. Procedure is as below:

On your system the vswif, vmnic, vSwitch numbers and network settings are different.

1.

Run the following command to list the name of the vswif adapter:

esxcfg-vswif -l

2.

Run the following command to delete the vswif adapter:

esxcfg-vswif --del vswif0

3.

Run the following command to list the name of the vSwitch:

esxcfg-vswitch -l

4.

Run the following command to delete the vSwitch:

esxcfg-vswitch -d vSwitch0

5.

Run the following command to create the vSwitch:

esxcfg-vswitch -a vSwitch0

6.

Run the following commands to create default port groups for vSwitch:

esxcfg-vswitch -A "VM Network" vSwitch0

esxcfg-vswitch -A "Service Console" vSwitch0

7.

Run the following command to create the vswif adapter:

esxcfg-vswif --add --portgroup "Service Console" --ip=nnn.nnn.nnn.nnn --netmask=255.255.255.0 vswif0

8.

Run the following command to verify that the settings in the network file are correct:

cat /etc/sysconfig/network

NETWORKING=yes

GATEWAYDEV=vswif0

HOSTNAME=host.domain.com

GATEWAY=nnn.nnn.nnn.nnn

9.

Run the following commands to list all of the network adapters and associate a vmnic which has a link status of up:

esxcfg-nics -l

esxcfg-vswitch -L vmnic1 vSwitch0

10.

Run the following command to verify that the vmnic is associated with the vSwitch:

esxcfg-vswitch -l

11.

Ping an IP address to check for network connectivity. If the ping fails remove the previous vmnic from the vSwitch and try another adapter that has a

link status of up.

esxcfg-vswitch -U vmnic1 vSwitch0

esxcfg-vswitch -L vmnic2 vSwitch0

12.

Run the following command to change the vlan ID of a vSwitch

# esxcfg-vswitch -p "VM Network 1" -v 10 vSwitch0

13.

If you make any manual changes to /etc/sysconfig/network, run the following command to restart the network service:

service network restart

If you find this helpful please mark some reward points for this.

0 Kudos
WobbleWobble
Contributor
Contributor

Sarprase,

Thanks for that. I only got round to looking at this today about 2 hours ago and the first suggestion worked a treat.

It looks like the issue was a lack of space on the / drive ( sorry still very new to linux commands) as I couldn't do anything to move/ copy data. I ended up deleting a guest that was un-necessary to free up space. From then on the info was spot on.

Thanks.

0 Kudos
admin
Immortal
Immortal

Hi There,

Please mark it as helpful or correct. Smiley Wink

if you found my answer to be useful, feel free to mark it as Helpful or Correct.

0 Kudos
WobbleWobble
Contributor
Contributor

I think I did mark it as correct...or at least I hope I did. Sorry looking at this on a locked down server.

Will check from a pc later.

But yes, it was a correct answer. Thanks again.

0 Kudos