Wednesday, December 14, 2005

Disabling the VMWare network adapters

When you are not running a VMWare session, you may want to disable the VMware virtual network adapters. I have found that they can slow down network operations on the host. Anything doing a UDP broadcast that is sentg over all adapters will take much longer to run if they broadcast over the VMWare adapters. The ListAvailableSQLServers function call in the SQLDMO library is one example that I came across that slowed down dramaticly with the VMWare adapters running.

You have at least three ways of enabling and disabling the network adapters. You can open up the Device Manager (click the "Start" button, select "Run...", enter devmgmt.msc), select the "VMware Network Adapter VMnet1" and "VMware Network Adapter VMnet8" adapters and press the disable button in the tool bar. The second option is to right click on "My Network Places" in the Start menu and select "properties". You can then right click on the "VMware Network Adapter VMnet1" and "VMware Network Adapter VMnet8" adapters and enable or disable them. The third method is via the command line, so that you can script it.

Microsoft, in it's infinite wisdom, does not provide a command line means of enabling or disabling network adapters out of the box. For that, you'll need DevCon.exe, the command line alternative to Device Manager. You can get from Microsoft as Knowledge Base article Q311272. With devcon, you can disable/enable a netwoirk adapter by it's hardware id. You can get the id from Device Manager, or by running devcon.exe like this:

devcon hwids =net

That will spit out a great deal of information, the ID's that you are looking for are *VMnetAdapter1 and *VMnetAdapter8. You can disable them individually or do both with a wildcard

devcon disable *VMnetAdapter1
devcon disable *VMnetAdapter8

or

devcon disable *VMnetAdapter*

The former probably executes faster, the latter is simpler. I run with the adapters disabled and I only enable them whem I am running a VMWare session.

If you are running Windows 7, you should head to Windows Driver Kit (WDK) Version 7.1.0 Release N, which includes a version of devcon that will install under Win7 64bit.  If you have an older release of the WDK, you can extract the devcon.exe out manually.  A commenter left a link to a post that included the following instructions:



  1. Download the “Windows Driver Kit (WDK) 7.1.0 from MS, it is an ISO image of several hundreds meg in size.
  2. Using UniversalExtractor (http://legroom.net/software/uniextract) extract the ISO to a temporary folder.
  3. Again using UniversalExtractor, extract the install file "WDK\setuptools_x64fre.msi" to a temporary dir
  4. In that temporary dir you will find "WinDDK\7600.16385.win7_wdk.100208-1538\tools\devcon\amd64\devcon.exe". It may be in a different folder hierarchy, but it should look like.

Along the way UniversalExtractor will prompt you with some warnings, just click OK. With Windows Vista and Windows 7, it will need elevated administrator rights to run.

16 comments:

  1. Another reason why I usually disable the VMware NICs in WXP is because of offline files. As long as Windows sees a "live" NIC in the system, it will try to synchronise any offline files you might have set - very annoying when you're on the road and not logged in to your corporate network.

    Btw. - devcon is nice and usefull, but not required to do this. Use netsh if you don't want or need the reskit tools:

    netsh interface set interface /?

    ReplyDelete
  2. I started with netsh, but I couldn't get it work. What was the syntax that worked for you?

    I tried this:
    netsh interface set interface name = "VMware Network Adapter VMnet8" admin = DISABLED

    That comes back with a syntax error.

    ReplyDelete
  3. YEY!!! Thank you for this post Chris. I have to diable VMware NICs in order to use our VPN. I found devcon, then this blog entry. How convenient and informational. rickj

    ReplyDelete
  4. I had to disable the VMware Network Adapters VMNet8 and VMNet1 in order to use my broadband card.

    ReplyDelete
  5. The correct syntax to disable the VMware network adapters on my system using netsh is:
    netsh interface set interface name="VMware Network Adapter VMnet1" admin=disabled
    netsh interface set interface name="VMware Network Adapter VMnet8" admin=disabled

    To enable them, I use:
    netsh interface set interface name="VMware Network Adapter VMnet1" admin=enabled
    netsh interface set interface name="VMware Network Adapter VMnet8" admin=enabled

    I had to disable them to receive Whozz Calling? Ethernet Link messages.

    -Bill Root

    ReplyDelete
  6. Man thanks a lot i was looking for this problem, vmware is amazing program but have so many problems ( lots of progresses etc )

    ReplyDelete
  7. One annoying side effect of leaving the adapters enabled is that Windows Vista/7 shows a connection with "limited connectivity" in the system tray if the VMware adapters are the only active ones. I always disable the adapters when VMware isn't running.

    ReplyDelete
  8. Vmware doesn't seem to connect to the internet. It was working about a week ago...

    I currently running Fedora 11.

    Any help on this? (thanks)

    ReplyDelete
  9. @anonymous: I'm sorry, but I have no idea what could be causing your problem. Have you tried the Vmware support forums? You should include more information when you post to their forums. I would suggest including the Vmware version number and saying if it ever worked or that it stopped working.

    ReplyDelete
  10. Thanks i just used the netsh command to disable adapter and vm services

    @echo off
    title + + + + + + + + + + + + + + VM Process stop + + + + + + + + + + + + + + + +
    COLOR 1F

    ECHO.
    ECHO -----------------------------------------------------------------------------
    ECHO. Now disabling VM network devices on "%COMPUTERNAME%
    ECHO -----------------------------------------------------------------------------

    netsh interface set interface name="VMware Network Adapter VMnet1" admin=disabled
    netsh interface set interface name="VMware Network Adapter VMnet8" admin=disabled
    CLS
    ECHO.
    ECHO -----------------------------------------------------------------------------
    ECHO. Network Devices Disabled. now stoping VM services...
    ECHO -----------------------------------------------------------------------------
    ECHO.
    sleep 2
    CLS
    ECHO.
    ECHO -----------------------------------------------------------------------------
    ECHO. Now stoping VMware services on "%COMPUTERNAME%
    ECHO -----------------------------------------------------------------------------
    sleep 1
    net stop "VMware Authorization Service"
    net stop "VMware Agent Service"
    net stop "VMware DHCP Service"
    net stop "VMware NAT Service"
    net stop "VMware USB Arbitration Service"
    sleep 1

    ReplyDelete
  11. I really liked your blog quite informative and interesting facts and figures you have discussed on your blog even the comments are very fruitful and helpful in enhancing the knowledge regarding the topic.

    ReplyDelete
  12. I've always wanted to know how to disable network adapters, thank you for this guide.

    ReplyDelete
  13. For those who are having troubles with Win7 x64 see the folowing link;

    http://techlikes.com/2010/09/25/devcon-problem-in-windows-7-solved.html

    ReplyDelete
  14. Really great post nice work i love your work and its really helped me in my research.Thanks

    ReplyDelete
  15. Finally, I can get back to what I need to do. Got my VM adapters working.

    ReplyDelete
  16. Uh, you left out a step. This will *NEVER* work as written:

    You can open up the Device Manager (click the "Start" button, select "Run...", enter devmgmt.msc), select the "VMware Network Adapter VMnet1" and "VMware Network Ad

    ReplyDelete

Note: Only a member of this blog may post a comment.