Can I disable dhcp in Fusion 12 for specific vm ?
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?
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).
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.
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.
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)
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
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 created this custom NAT network:
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
@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
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.
Yeah, I was thinking they could then use reservations in the network DHCP server.
@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.
@ricky73 in my mind you have the right approach.
Try the following to manually disable DHCP on a custom NAT configuration in Fusion 12:
answer VNET_2_DHCP yes
and change it to
answer VNET_2_DHCP no
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.
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 ?
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
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.
I'm running big sur (11.7.4) and Fusion 12.1.1
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?
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.