Created
August 29, 2016 02:46
-
-
Save mhtsai1010/e6f3442cefc34ae7069dc2b5e690577c to your computer and use it in GitHub Desktop.
Enable promiscuous mode of vmware on a Linux Host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ref: https://bbs.archlinux.org/viewtopic.php?id=65508 | |
1/ Method 1 | |
# First, create a new Linux group which has permission to use promiscuous mode, and add yourself to the group. | |
$ groupadd promiscuous | |
$ usermod -a -G promiscuous <your_user_id> | |
# Update the group ownership and access permission of /dev/vmnet* | |
$ chgrp promiscuous /dev/vmnet* | |
$ chmod g+rw /dev/vmnet* | |
2/ Method 2 | |
To allow all users (instead of a specific user) to set the virtual adapter to promiscuous mode, run the following command on host machine. | |
$ chmod a+rw /dev/vmnet* | |
Above setting is a temporary solution as the reboot will delete changes. | |
==To make it permanent at each reboot== | |
# For Method 1 (assuming that you already created a Linux group called "promiscuous" as described earlier): | |
Find the line vmwareStartVmnet in /etc/init.d/vmware | |
vmwareStartVmnet() { | |
vmwareLoadModule $vnet | |
"$BINDIR"/vmware-networks --start >> $VNETLIB_LOG 2>&1 | |
chgrp promiscuous /dev/vmnet* | |
chmod g+rw /dev/vmnet* | |
} | |
# For Method 2 : | |
Find the line vmwareStartVmnet in /etc/init.d/vmware, and put the chmod as below : | |
vmwareStartVmnet() | |
vmwareLoadModule $vnet | |
"$BINDIR"/vmware-networks --start >> $VNETLIB_LOG 2>&1 | |
chmod a+rw /dev/vmnet* | |
} |
Worked like a charm!
Thanks @izznogooood
UPDATE: not sure what happened but your solution doesn't work
I'm using VMware Workstation 14.0 and @mhtsai1010 solution is working instead
Thanks @mhtsai1010
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, this does not work in vmware 14 as it does not use init.d
I made a simple script:
saved in "/opt/scripts/enable_vmware_promiscuous"
edit /etc/systemd/system/multi-user.target.wants/vmware-networks.service
add:
ExecStartPre=/opt/scripts/enable_vmware_promiscuous