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 don't 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.
I hope this might solve the problem.
Many Thanks to Tim for his blog post.
@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.
1 comment:
Veery creative post
Post a Comment