Skip to content

Instantly share code, notes, and snippets.

@bdwyertech
Last active December 8, 2021 10:24
Show Gist options
  • Save bdwyertech/d394ff41886cf0774a65202afa55ada9 to your computer and use it in GitHub Desktop.
Save bdwyertech/d394ff41886cf0774a65202afa55ada9 to your computer and use it in GitHub Desktop.
VMWare Fusion - Reset Networking
#!/bin/bash
# Reset VMware Fusion Networking
# Clear out the Configuration
sudo rm -f /Library/Preferences/VMware\ Fusion/networking*
sudo rm -f /Library/Preferences/VMware\ Fusion/*location*
sudo rm -rf /Library/Preferences/VMware\ Fusion/vmnet*
sudo rm -rf /var/db/vmware/vmnet-dhcpd-vmnet*
# Reconfigure Networking
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli -c
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --status
@bdwyertech
Copy link
Author

If we need to remove the localdomain from the DHCP configuration (Slow Gem installs)

Add to /Library/Preferences/VMware\ Fusion/networking

answer VNET_1_DHCP_PARAM_DOMAIN_NAME ""
answer VNET_8_DHCP_PARAM_DOMAIN_NAME ""

Unfortunately, doing it this way does not stick around. Ideally, we'd set it via the CLI, which would probably help it persist. Not sure what the param is actually called though
vmnet-cfgcli setdhcpparam vmnet8 'searchdomain' ''

@sbin0819
Copy link

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment