VMware Communities
ricky73
Hot Shot
Hot Shot
Jump to solution

disable dhcp

Can I disable dhcp in Fusion 12 for specific vm ?

0 Kudos
1 Solution

Accepted Solutions
Technogeezer
Immortal
Immortal
Jump to solution

Some results on experiments that I just completed.

Fusion 12.1.2 on Big Sur: No VMware dhcpd processes fired off by Fusion on macOS. The custom network dialog does not show an option to enable/disable use of DHCP for any custom networks.

Fusion 12.2.6 on Monterey: VMware dhcpd processes are seen on macOS. The option to enable DHCP for custom networks appears for creation of Fusion custom networks.

So unless someone can come up with a way at the macOS level to disable DHCP for one of the VMware networking segments on Big Sur, I'd say that it's not going to be easy to disable DHCP the way you want.

If you can, I'd recommend upgrading to Monterey and Fusion 12.2.6. 

Side note: perhaps this is one of the reasons why Fusion dropped support for Big Sur in Fusion 12.2?? Apple matured their APIs to allow VMware to take control of DHCP on the Fusion-created subnets?

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides

View solution in original post

18 Replies
RDPetruska
Leadership
Leadership
Jump to solution

Just set a static IP in that VM's guest OS configuration.  Refer to the Fusion user manual - there is a range allocated for static IP addresses in their DHCP settings (sorry, I forget whether it's higher or lower block of addresses).

0 Kudos
Technogeezer
Immortal
Immortal
Jump to solution

Unfortunately that information isn't in the Fusion documentation. The range that's assigned for DHCP on the NAT networks are xxx.xxx.xxx.128 to xxx.xxx.xxx.255 .

The Fusion user guide, unlike the Workstation user guide, does not contain details on how the virtual networking is configured. That's a shame, since some of that discussion in the Workstation documentation applies to Fusion.

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
ricky73
Hot Shot
Hot Shot
Jump to solution

I created new nat network where I set static IP and I installed service as dhcp server.

My target is to create other  virtual machines on the same network and these vm should ask IP address to my dhcp server which I installed. Now IP address is assigned from VMware Fusion.

0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

If you use bridged instead of NAT, you should be able to change the DHCP server address in the guest (I think).

I believe that for NAT, we're stuck because of how Apple's framework is built (but that may be out of date...digging in memory here)

0 Kudos
Technogeezer
Immortal
Immortal
Jump to solution

I don't think that you can change DHCP server for a bridged network because a network broadcast is used to get to obtain the address of the DHCP server.

For a custom NAT network in Fusion Pro, there is an option not to provide DHCP services on the network. That should allow a custom DHCP server that's configured on a VM in that NAT network (will need a static host address, plus the DHCP server bits installed and configured) to be used for other VMs in that NAT network.

I just tried this in Fusion Pro and can confirm that no DHCP server is available to serve up an IP config in the custom NAT segment

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
RDPetruska
Leadership
Leadership
Jump to solution

But - according to the OP initial question of how to disable dhcp for a single guest, it would appear they want to use a static IP address, NOT a dhcp-assigned one!

0 Kudos
ricky73
Hot Shot
Hot Shot
Jump to solution

I created this custom NAT network:

 

Screenshot 2023-03-20 at 17.48.25.png

I linked this network to Server (Debian OS) which has static IP and has installed the DHCP server service.


@Technogeezer wrote:

For a custom NAT network in Fusion Pro, there is an option not to provide DHCP services on the network.


Where is this option?

 


@Technogeezer wrote:

I just tried this in Fusion Pro and can confirm that no DHCP server is available to serve up an IP config in the custom NAT segment


Excuse me but I don't understand what you are saying 

0 Kudos
ricky73
Hot Shot
Hot Shot
Jump to solution


@RDPetruska wrote:

But - according to the OP initial question of how to disable dhcp for a single guest, it would appear they want to use a static IP address, NOT a dhcp-assigned one!


I try to explain again...

I have 2 vm : A , B

A, B are configured in the  custom NAT network : 10.0.2.0/24 

A: It's server configured with static IP address and It has installed the DHCP server. Vm A will release IP address to other vm (e.g. vm B)

B: It's a client which has no static ip address because vm B will ask ip using DHCP server called A.

 

Now I noted that the  IP address of B is assigned by VMware Fusion and NOT by the dhcp server.

infact if I turn off dhcp server, IP address to vm B is always assigned... so I thought to disable DHCP server on nat network

 

 

 

 

0 Kudos
RDPetruska
Leadership
Leadership
Jump to solution

So what you really need is a 2-part scenario.  One VM with 2 network connections... one facing the outside world using either NAT or bridged; and the other on a private guest-only network (use any of the unused VMnet switches 2-7, 9).  Also needing routing software inside it to do the NAT routing for it's guests.   Then, the client VM connects to the guest-only network to receive it's IP address from the server, and also routing to the outside world.

0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

Yeah, I was thinking they could then use reservations in the network DHCP server.

0 Kudos
Technogeezer
Immortal
Immortal
Jump to solution

@ricky73  I'm sorry for the confusion, and I apologize. I re-read your post and found that you are using Fusion 12. My experiment was tried in Fusion 13, not Fusion 12. It may be possible that Fusion 12 does not have this option exposed through the GUI.

However it might be possible with a little manual configuration. Let me try something and get back to you.

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
Technogeezer
Immortal
Immortal
Jump to solution

@ricky73 in my mind you have the right approach.

Try the following to manually disable DHCP on a custom NAT configuration in Fusion 12:

  • Make note of your custom NAT vmnet id. For example. I created a vmnet2 custom NAT configuration.
  • Shut down Fusion.
  • Edit the file /Library/Preferences/VMware\ Fusion/networking (you will need admin privileges to do so).
  • You will find lines corresponding to your custom NAT configuration. Mine are prefaced by VNET_2 (that's what was included in my case for vmnet2).
  • Change the line containing 
answer VNET_2_DHCP yes

and change it to

answer VNET_2_DHCP no
  • Save and exit the editor
  • Start Fusion.

You should find that there is no DHCP for that virtual network. To verify this, look in directory /Library/Preferences/VMware\ Fusion/vmnet2. There should be no file named dhcp.conf.

Now start your VM B without starting VM A that contains your DHCP server. It should not get an IP address until you start VM A.  

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
ricky73
Hot Shot
Hot Shot
Jump to solution

Thanks for your precious info.

I detected my custom network as vmnet3 and I modified as you suggested

answer VNET_3_DHCP no

I verified that dhcp.conf is missing now in  /Library/Preferences/VMware Fusion/vmnet3.

I turned off A machine and I reboot only B machine (client) but I see these logs:

 

Mar 21 16:18:21 students dhclient: Internet Systems Consortium DHCP Client 4.3.1
Mar 21 16:18:21 students networking[270]: Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Mar 21 16:18:21 students dhclient: Copyright 2004-2014 Internet Systems Consortium.
Mar 21 16:18:21 students networking[270]: Copyright 2004-2014 Internet Systems Consortium.
Mar 21 16:18:21 students dhclient: All rights reserved.
Mar 21 16:18:21 students networking[270]: All rights reserved.
Mar 21 16:18:21 students dhclient: For info, please visit https://www.isc.org/software/dhcp/
Mar 21 16:18:21 students networking[270]: For info, please visit https://www.isc.org/software/dhcp/
Mar 21 16:18:21 students dhclient:
Mar 21 16:18:21 students dhclient: Listening on LPF/eth0/00:0c:29:26:ea:09
Mar 21 16:18:21 students dhclient: Sending on LPF/eth0/00:0c:29:26:ea:09
Mar 21 16:18:21 students dhclient: Sending on Socket/fallback
Mar 21 16:18:21 students dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Mar 21 16:18:21 students networking[270]: Listening on LPF/eth0/00:0c:29:26:ea:09
Mar 21 16:18:21 students networking[270]: Sending on LPF/eth0/00:0c:29:26:ea:09
Mar 21 16:18:21 students networking[270]: Sending on Socket/fallback
Mar 21 16:18:21 students networking[270]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Mar 21 16:18:21 students dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Mar 21 16:18:21 students networking[270]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Mar 21 16:18:21 students dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Mar 21 16:18:21 students dhclient: DHCPOFFER from 10.0.2.1
Mar 21 16:18:21 students networking[270]: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Mar 21 16:18:21 students networking[270]: DHCPOFFER from 10.0.2.1
Mar 21 16:18:21 students dhclient: DHCPACK from 10.0.2.1
Mar 21 16:18:21 students networking[270]: DHCPACK from 10.0.2.1
Mar 21 16:18:21 students dhclient: bound to 10.0.2.3 -- renewal in 39442 seconds.
Mar 21 16:18:21 students networking[270]: bound to 10.0.2.3 -- renewal in 39442 seconds.
Mar 21 16:18:21 students networking[270]: done.

 

It like dhcp server was 10.0.2.1, It's always interface of my custom network of Fusion ?

IP address is again assigned as 10.0.2.3. My dhcp server assigns ip address at starting 10.0.2.100

What do you think ?

0 Kudos
Technogeezer
Immortal
Immortal
Jump to solution

Could you post the contents of that networking file and the .vmx file of the "B" VM?

I also assume that a DHCP server is not running for that network segment? Could you also drop into Terminal and post the output of the following command while Fusion is running (VMs do not need to be running):

ps -ef | grep -i dhcp

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
Technogeezer
Immortal
Immortal
Jump to solution

Given what @ricky73 is seeing and doing some research based on  @ColoradoMarmot 's recollections - I'm wondering if you may be hitting the situation that's described here: https://communities.vmware.com/t5/VMware-Fusion-Discussions/Big-Sur-hosts-with-Fusion-Is-vmnet-dhcpd...

That thread is indicating to me that Apple is in control of DHCP on Big Sur and not VMware. (which matches @ColoradoMarmot 's thoughts).

Evidently something has changed between then and now since Fusion 13 on Ventura and Monterey (each of which is offering me the ability to disable DHCP in the UI). I don't know if Apple or VMware or both made changes so that VMware can support not enabling DHCP on that segment. I'll have to see if I can fire up something on a Big Sur VM that I have and see if there's any change. 

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
ricky73
Hot Shot
Hot Shot
Jump to solution

I'm running big sur (11.7.4) and Fusion 12.1.1

Tags (1)
0 Kudos
Technogeezer
Immortal
Immortal
Jump to solution

Some results on experiments that I just completed.

Fusion 12.1.2 on Big Sur: No VMware dhcpd processes fired off by Fusion on macOS. The custom network dialog does not show an option to enable/disable use of DHCP for any custom networks.

Fusion 12.2.6 on Monterey: VMware dhcpd processes are seen on macOS. The option to enable DHCP for custom networks appears for creation of Fusion custom networks.

So unless someone can come up with a way at the macOS level to disable DHCP for one of the VMware networking segments on Big Sur, I'd say that it's not going to be easy to disable DHCP the way you want.

If you can, I'd recommend upgrading to Monterey and Fusion 12.2.6. 

Side note: perhaps this is one of the reasons why Fusion dropped support for Big Sur in Fusion 12.2?? Apple matured their APIs to allow VMware to take control of DHCP on the Fusion-created subnets?

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
ricky73
Hot Shot
Hot Shot
Jump to solution

I thank you for your precious help and support.

My hardware cannot permit me to upgrade to Monterey, Big Sur was last update. 

When I use Vmware I'll disable OSX dhcp daemon.

0 Kudos