Solve connection error on Ubuntu Server on VMware Workstation

Solve connection error on Ubuntu Server on VMware Workstation


Virtualization has been a necessity for quick deployment of server. However there is a drawback of connection in case like VMware Workstation 7.0 where ubuntu server loose internet connection due to failure of  VMware NAT Service. A restart for NAT service is required to bring everything in working order. I dont exactly why vmnat.exe stop working but this error causes severe loss to server based on vmware so to resolve this problem I have made custom batch script. You can schedule task it as per your severity. For my preference I shall schedule it for every 5 minutes.


@setlocal enableextensions enabledelayedexpansion
@echo off
set ipaddr={YOUR VMWARE LOCAL IP} Eg. 192.168.xxx.128
set oldstate=neither
:loop
set state=up
ping -n 1 !ipaddr! >nul: 2>nul:
if not !errorlevel!==0 (
set state=down
taskkill /im vmnat.exe /T /F
net start "VMWare NAT Service"
)
if not !state!==!oldstate! (
echo.Link is !state!
set oldstate=!state!
exit /B
)
ping -n 2 127.0.0.1 >nul: 2>nul:
goto :loop
endlocal

I hope this might solve the problem.
Many Thanks to Tim for his blog post.

download file now

Comments

Popular posts from this blog

Spider Man Friend Or Foe ISO Free Download PPSSPP Setting

Sorry Mutter closed unexpectedly on Ubuntu 10 10

Solution Ubuntu 10 04 minimize maximize and close button to right