I use VMWare to run a bunch of different Linux VMs on my home PC, which is running Vista SP1(this applies to Windows 7 too). Today I encountered strange thing: Linux VM won’t get an IP address from VMWare DHCP. I’ve opened VMWare Virtual Networks management console (as Administrator, of course, or it won’t let you make and save any changes) just to find out that DHCP service is not started. I tried to start it from there, but it failed again.
So I went to Windows Services console and tried to start "VMWare DHCP service" from there. Again, failed to start with no explanation, even cryptic one. So I went to Windows Events viewer and there, under Windows Logs->System, I found a lot of messages from VMNetDHCP:
The description for Event ID 2 from source VMnetDHCP cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Can't open C:\ProgramData\VMware\vmnetdhcp.conf: Access is denied.
/ The data is invalid
the message resource is present but the message is not found in the string/message table
That message says enough to fix the problem.So, I took a look at the security properties for C:\ProgramData\VMWare folder and found that SYSTEM account somehow is not in a list of permitted users. The only account, who was permitted to access that folder, was my Windows user account. So I added SYSTEM account with all permissions to this folder, waited when Windows propagated my change to all files and tried to start VMWare DHCP service again. It worked!
Then I simply restarted network within Linux VM (sudo /etc/init.d/networking restart) and got back to work.