Force vmware to configure a network interface

This is funny but true. System developer updated the system including libc and other critical files. After upgrading system, they just rebooted the system and everything worked fine except VMWARE networking. Since they skipped the Linux kernel upgrade, VMWARE workstation was coming up but vmnet1 was not starting for some weird reason.

First, I restarted vmware service:

# /etc/init.d/vmware restart


Output:

Stopping VMware services:
Virtual machine monitor                                             done
Bridged networking on /dev/vmnet0                                   done
DHCP server on /dev/vmnet1                                          done
Host-only networking on /dev/vmnet1                                 done
Virtual ethernet                                                    done
Starting VMware services:
Virtual machine monitor                                             done
Virtual ethernet                                                    done
Bridged networking on /dev/vmnet0                                   done
   Host-only networking on /dev/vmnet1 (background)                    done

I thought vmnet1 is up and running (at least above output indicates this) but when I run ifconfig command:
# /sbin/ifconfig -a
There was no vmnet1 interface at all. This is one of production system and now things are complicated. Oh, boy I hate stupid developer(s) they will do anything to setup and run their development environment.

Anyways one of our senior UNIX admin pointed out me to use vmnet-netifup command :D. It is use to configure a virtual networking i.e. VMWARE network interfaces. The syntax is easy:
# vmnet-netifup -d /var/run/vmnet1.pid /dev/vmnet1 vmnet1
Where,

  • -d /var/run/vmnet1.pid : PID file for daemon mode
  • /dev/vmnet1 : Device file
  • vmnet1: Interface name (it can be eth1)

Assign an IP address:

# ifconfig vmnet xxx.xxx.xxx.xxx up

It worked like a charm. It saved me from restoring Debian updates as well as reinstalling VMWARE.

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
6 comments… add one
  • Mitch Oct 10, 2016 @ 18:53

    Sometimes we just need the simple solution,
    I installed vmware player but the auto config failed. All I needed to do for this step (networking) was to start the service.

    vmware-networks --start

    The following total had to be manually started:
    vmware-networks --start
    insmod /lib64/modules/4.8.1/misc/vmmon.ko
    insmod /lib64/modules/4.8.1/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko
    insmod /lib64/modules/4.8.1/misc/vmnet.ko
    insmod /lib64/modules/4.8.1/misc/vboxdrv.ko
    insmod /lib64/modules/4.8.1/misc/vboxnetadp.ko
    insmod /lib64/modules/4.8.1/misc/vboxnetvboxdrv.ko
    insmod /lib64/modules/4.8.1/misc/vboxnetflt.ko
    insmod /lib64/modules/4.8.1/misc/vboxpci.ko

  • dinu Oct 26, 2011 @ 19:37

    thanks… worked perfect for me!!!

  • gabriel Mar 6, 2010 @ 2:22

    when the vmnetX interface does not came up it’s because that IP is already being used.

  • Ray Nov 16, 2008 @ 15:59

    This was a huge help.

    I am not sure if the following line should read:
    # ifconfig vmnet1 xxx.xxx.xxx.xxx up

    instead of:
    # ifconfig vmnet xxx.xxx.xxx.xxx up

    When I used it on my vmnet2 (with the number) it worked.

  • Darrell Sep 14, 2008 @ 15:29

    This may not be your problem, but it’s worth noting that it is normal for the vmnet interfaces not to appear until 30 seconds or more after you start the vmware service. (That’s why it says “background” when initializing vmnet1 — the initialization is continuing in the background after the service starts.)

  • shao Jun 6, 2008 @ 2:57

    I use the command you give above to set up a v-net between 2 computers under linux, but when I use ping in one of them to another, it got something wrong. Why?
    vmnet-netifup and ifconfig, there is no error.

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.