//
you're reading...
Uncategorized

How to disable host only networking dhcp server on Linux hosts

Disabling the VMware DHCP Service on the Host Computer.

It is easy enough to do this on Windows hosts, this article focuses on Linux hosts.

Follow the steps shown below for your host operating system.

Linux for Workstation 5.x and VMware Server 1.x

  1. Open the file /usr/lib/vmware/net-services.sh in a text editor.
  2. Locate the following section (lines 697-699, as seen in Workstation 5.5.1, build 19175):
    vmware_bg_exec ‘Host-only networking on /dev/vmnet'”$vHubNr” \
    vmware_start_hostonly “$vHubNr” ‘vmnet'”$vHubNr” \
    “$hostaddr” “$netmask” ‘yes’
  3. Change yes to no. The resulting section should look like this:
    vmware_bg_exec ‘Host-only networking on /dev/vmnet'”$vHubNr” \
    vmware_start_hostonly “$vHubNr” ‘vmnet'”$vHubNr” \
    “$hostaddr” “$netmask” ‘no’
  4. Save the file.
  5. As root, run /usr/lib/vmware/net-services.sh restart to restart the service.

Linux for Workstation 6

  1. As root, stop VMware services using /etc/init.d/vmware stop
  2. Open the file /etc/vmware/locations in a text editor.
  3. Scroll all the way to the bottom.
  4. Look for answer VNET_1_DHCP yes, change this to answer VNET_1_DHCP no
  5. Continue for any other interfaces that you would like to disable DHCP.
  6. Save the file.
  7. As root, start VMware services using /etc/init.d/vmware start
Advertisements

About Hugo Phan

@hugophan

Discussion

8 thoughts on “How to disable host only networking dhcp server on Linux hosts

  1. Here’s a modification that allows you to turn DHCP on or off per vmnet? interface for host-only networks:VMWARE_HOSTONLY_DHCP=yesif [ -f ‘/etc/vmware/vmnet'”$vHubNr”‘/services’ ]; then source ‘/etc/vmware/vmnet'”$vHubNr”‘/services’fivmware_bg_exec ‘Host-only networking on /dev/vmnet'”$vHubNr” \ vmware_start_hostonly “$vHubNr” ‘vmnet'”$vHubNr” \ “$hostaddr” “$netmask” “$VMWARE_HOSTONLY_DHCP”Change the line mentioned in the article to the above lines and then you can create a file or files at /etc/vmware/vmnet?/services with the line VMWARE_HOSTONLY_DHCP=no to turn off DHCP for that vmnet? interface

    Posted by Randall Wood | March 5, 2008, 15:23
  2. One workaround is to create a bridged interface with a non-existent ethernet interface (dummy0).

    Posted by Anonymous | April 1, 2008, 01:18
  3. I have linux ubuntu 7.10 with vmware server 1.0.6 and this solution don’t work :Linux for Workstation 5.x and VMware Server 1.xOpen the file /usr/lib/vmware/net-services.sh in a text editor.Locate the following section (lines 697-699, as seen in Workstation 5.5.1, build 19175):vmware_bg_exec ‘Host-only networking on /dev/vmnet'”$vHubNr” \vmware_start_hostonly “$vHubNr” ‘vmnet'”$vHubNr” \”$hostaddr” “$netmask” ‘yes’ –> Change to “no”. The resulting section should look like this:vmware_bg_exec ‘Host-only networking on /dev/vmnet'”$vHubNr” \vmware_start_hostonly “$vHubNr” ‘vmnet'”$vHubNr” \”$hostaddr” “$netmask” ‘no’Save the file.As root, run /usr/lib/vmware/net-services.sh restart to restart the service.Thanks

    Posted by Anonymous | July 2, 2008, 13:25
  4. I have find a solution to disable dhcp server in vmware server 1.0.6 :launch script : /usr/bin/vmware-config.plIn this question :Do you want to be able to use NAT networking in your virtual machines? (yes/no) [yes] no <– ANSWER, VERY IMPORTANT Thanks

    Posted by Anonymous | July 2, 2008, 13:58
  5. I have find a solution to disable dhcp server in vmware server 1.0.6 :launch script : /usr/bin/vmware-config.plIn this question :Do you want to be able to use NAT networking in your virtual machines? (yes/no) [yes] no <– ANSWER, VERY IMPORTANT Thanks

    Posted by Anonymous | July 2, 2008, 13:59
  6. I have had similar problems with 1.0.6if you don’t turn off your vmware server all that often, you can kill the process from consolefirst you will need to find the process, you can do that in most Linux GUI’s with a process monitor, then look for vmnet-dhcpd. Then kill the process called vmnet-dhcpd.With no GUI, and using the console, or through ssh etc. type in ‘ps aux | grep vmnet-dhcpd’, the process id will then be shown, then type ‘kill ####’ and the dhcp daemon will be killed. The process id is the first number after the name of the user who started up the daemon, in my case, root.eg.xpclientx2:/mnt/VMs # ps aux | grep vmnet-dhcpdroot 12208 0.0 0.0 1828 308 ? Ss 07:54 0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1root 12212 0.0 0.0 3064 712 pts/0 R+ 07:55 0:00 grep vmnet-dhcpdxpclientx2:/mnt/VMs # kill 12208It’s only a band-aid approach, but the good thing is, it won’t matter what version it is, or if they modify the scripts again in future, as long as the dhcp daemon is seperate.

    Posted by MrMystic | September 8, 2008, 22:03
  7. One thing I did to remove DHCP from a single vmnet was to edit /etc/vmnet<#>/dhcp/dhcp.conf (in my network it was vi /etc/vmnet8/dhcp/dhcp.conf) and remark out all of the lines. Then I ran # /usr/lib/vmware/net-services.sh restart and it appears to disable the DHCP since it doesn't know what network to serve IPs for.

    Posted by Anonymous | September 23, 2008, 15:43
  8. In vmware-server 201, they finally gave us a choice!I think if we change the statement like "answer VNET_1_DHCP" in /etc/vmware/locations from "yes" to "no", it seems to no longer start the daemon. Code near /usr/lib/vmware/net-services.sh:700, where I used to disable the start by hand, seems to support this new config.Sure makes THAT easy for me.

    Posted by Lunchbox | August 16, 2009, 00:38

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: