Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
MvS-MacBook-OSX:~ Marika$ EDITOR=/usr/bin/nano sudo visudo
>>> /etc/sudoers: syntax error near line 45 <<<
What now?
Options are:
(e)dit sudoers file again
e(x)it without saving changes to sudoers file
(Q)uit and save changes to sudoers file (DANGER!)

What now? e
>>> /etc/sudoers: syntax error near line 46 <<<
What now?

Well you did all steps all right except for the last one which admittedly is the trickiest.

I assume you selected the second option e(x)it and left the file unchanged.

To try again, after typing the command:

EDITOR=/usr/bin/nano sudo visudo

with the sudoers file open just keep pressing ctrl-v and when nothing happens (no more text scrolling) you will be at the end of the file.

And just to make sure you can also press ctrl-c which will show you the current position in the file like so:

[ line 48/48 (100%), col 1/1 (100%), char 1359/1359 (100%) ]

Actuall line numbers will probably be different on your Mac but if it says 100% you are at the end.

You can then actually paste the line as shown from step 5 using cmd-v. Exit and save the file as before and you should get no warning now.

I hope this is clearer?
 
Awww, so close. Thank you. The next time I feel brave I'll try again - I really would like to be able to start up my Mac without VMware fusion running all that "stuff." For now, though, I reinstalled it and had to contend with Windows Activation (both in VMware and in BootCamp proper.)
 
Great IDEA like wise. dislike being forced and untold about things launched without my intention wasting system resources

where is com.vmware.fusion.netopt.plist stored please? for the enhancement?

i executed the scripts on OSX10.6.7 on VMF 3.1.2 with Win7 on a hackintosh worked flawless.
" " " on OSX 10.6.7 on VMF 3.1.3 on my MB5,1 with Ubuntu11.04 on me MB5,1 worked flawless.

great work.

and when system updates is performed. does the whole copying of the .sh file and nanoing the list required?

one more thing i noticed thou, after quitting VMWare. checking on Activity Monitor. Two items remain on VMF3.1.3, VMWare Fusion Helper and VMware Fusion Start Menu process still remain standing. is that intentional?

my greatest concern is boot time. as my MB booted with 6 gear spins prior installing VMware. post installation gear spin counts to 30. i assume/expect by preventing them v-kexts and dameons launching should bring me back to if not at 6gear spins, at least less than 10. any info please? :)

Right picture is before running VMF3.1.3
Left picture is after quitting.

any chance to include in the sh files to kill these two VMware Fusion Helper and VMware Fusion Start Menu please.

cheers
h
 

Attachments

  • attachment.jpg
    attachment.jpg
    165.6 KB · Views: 193
  • attachment-1.png
    attachment-1.png
    340.6 KB · Views: 193
Last edited:
where is com.vmware.fusion.netopt.plist stored please? for the enhancement?

The com.vmware.fusion.netopt.plist file is inside your user's Preferences folder (that is /Users/yourusername/Library/Preferences).

one more thing i noticed thou, after quitting VMWare. checking on Activity Monitor. Two items remain on VMF3.1.3, VMWare Fusion Helper and VMware Fusion Start Menu process still remain standing. is that intentional?

The VMware Fusion Start Menu process is running because that is what you have set it to do in the Virtual Machine Settings. The script has no reason to kill it.

To stop it go to Virtual Machine Settings (cmd-E) -> Applications -> Show applications menu in menu bar and select either Never or Only when Fusion is running. You probably have to do this for every Virtual Machine if you have many setup.

As for the VMWare Fusion Helper process I think that it must be listed in your system login items. Go to System Preferences -> Accounts -> Login Items and if it is there just remove it.

Try the above and let us know if you succeeded.
 
psid you are a star.

selecting off in the Application menu terminated the both processes when VMF quits.

Fantastic. regain full control now. :)
 
Are those the bits and pieces that tell OSX where programs are? For example, receive an excel file via mac mail, click on it and W7 VM unpauses and opens it. Dead useful that sometimes if it is.
 
Are those the bits and pieces that tell OSX where programs are? For example, receive an excel file via mac mail, click on it and W7 VM unpauses and opens it. Dead useful that sometimes if it is.

I think that the VMWare Fusion Helper process is responsible for what you described. And the scripts do not touch that, they only deal with the kernel extensions and root daemons.

The idea is that if you decide to use these scripts you do not lose any functionality at all.
 
no network on vmware

Interesting. I will try this tonight, thank you. Delicious'd! :)

The initial solution was to reboot the mac - this involves shutting down the VMs etc. It's apparent that doing this multiple times a day is will make it impossible to get anything done, so the solution I found was to run:

Code:
$ sudo /Library/Application Support/VMware Fusion/boot.sh –restart

which basically re-initialises the vm services and by proxy the nat services - now the VMs pick up the new nat settings and testing can continue. It's maybe a little heavy handed, but I needed something quick and dirty so that I could get on.

The best news is that you can run this script while the VMs are open and running, so it's really convenient.

Really impressed that Fusion was stable enough to do this. This software rocks. :)

How do I do this I tired to put it in run an it says windows cant find $
 
OS X Lion compatibility

Hi psid, could you please confirm that this process works for the latest version of Mac OS, 10.7 Lion?

I've just upgraded to Lion and got some problem with VMWare Fusion. It seems that the scripts work great except one thing: the network.

Investigations (including re-starting the Mac, re-installing VMware Fusion 3.1.3) shows that the scripts probably cannot start the vmnet kext.

This is after starting VMware:

Code:
ngocminh@MBP[411]:~ $ kextstat | grep vm
  147    0 0xffffff7f821b4000 0xd1000    0xd1000    com.vmware.kext.vmx86 (3.1.3) <7 5 4 3 1>
  149    0 0xffffff7f80796000 0xe000     0xe000     com.vmware.kext.vmci (3.1.3) <5 4 3 1>
  150    0 0xffffff7f807c1000 0x7000     0x7000     com.vmware.kext.vmioplug (3.1.3) <33 25 5 4 3 1>

And after shuting it down, there's no kext like this to show. I think this is the reason why the networking is not started when the VMware Fusion starts.

Please help me fix this because I love your way of using VMware, and I like to change the subnets for virtual networks using by VMware, your scripts help me with it!

Thanks in advance!
 
Last edited:
Hi psid, could you please confirm that this process works for the latest version of Mac OS, 10.7 Lion?

Sorry but I have not upgraded to Lion yet. I plan to do so in the next couple of weeks since I've been quite busy. Will then certainly try to get Fusion working again and post the results here.
 
Sorry but I have not upgraded to Lion yet. I plan to do so in the next couple of weeks since I've been quite busy. Will then certainly try to get Fusion working again and post the results here.

I am waiting for that. Thank you in advance, psid!
 
Just installed a fresh copy of Lion.

then installed VMF3.1.2.
ran the VM
worked in Lion.
when VMF quits, all the kext were still loaded as seen in terminals as expected.

Applied the tweak as described to attempt to remove the unused kext when VMF is not running

after applying all the necessary.

booted up VM, no network. saying problem with loading vnet8?

thought i screwed up, finger trouble. re-did it all again by first uninstalling, re-installing. ran, apply tweak.

same happens. tried to undo the tweak.
then when load up VM, it says can't locate vmmon

now totally uninstalled VMF.
any idea please?
 
Sorry but I have not upgraded to Lion yet. I plan to do so in the next couple of weeks since I've been quite busy. Will then certainly try to get Fusion working again and post the results here.

No need to change anything mate. I got it up and running with Lion. Everything runs and shuts down when its the appropriate time.

Running Fusion 3.1.3 and Lion :)
 
No need to change anything mate. I got it up and running with Lion. Everything runs and shuts down when its the appropriate time.

Running Fusion 3.1.3 and Lion :)

It's kinda weird! Seems that hekokimushi has the same problem with me when the vmnet kext is not loaded. Is there anybody using Lion and successfully applied the tweak?
 
It's kinda weird! Seems that hekokimushi has the same problem with me when the vmnet kext is not loaded. Is there anybody using Lion and successfully applied the tweak?

You guys prob did it wrongly... follow the instructions fully and make sure you do not have any errors on any of the steps. Key thing is make sure you got that zip file with the scripts downloaded to the correct location or it won't work :)

I'll show you guys my terminal output just to prove to you this works.

This one's with VMware on
:~ negativzero$ kextstat | grep vm
131 0 0xffffff7f812b5000 0xd1000 0xd1000 com.vmware.kext.vmx86 (3.1.3) <7 5 4 3 1>
132 0 0xffffff7f807ee000 0xe000 0xe000 com.vmware.kext.vmci (3.1.3) <5 4 3 1>
133 0 0xffffff7f807fc000 0x7000 0x7000 com.vmware.kext.vmioplug (3.1.3) <30 27 5 4 3 1>
134 0 0xffffff7f80805000 0xa000 0xa000 com.vmware.kext.vmnet (3.1.3) <5 4 3 1>
:~ negativzero$ ps -Ac | grep vmnet
853 ?? 0:00.02 vmnet-bridge
863 ?? 0:00.00 vmnet-dhcpd
865 ?? 0:00.00 vmnet-netifup
867 ?? 0:00.00 vmnet-dhcpd
870 ?? 0:00.00 vmnet-natd
872 ?? 0:00.00 vmnet-netifup
:~ negativzero$ ifconfig -l
lo0 gif0 stf0 en0 en1 fw0 p2p0 vmnet1 vmnet8

And this one is with VMware off
:~ negativzero$ kextstat | grep vm
:~ negativzero$ ps -Ac | grep vmnet
:~ negativzero$ ifconfig -l
lo0 gif0 stf0 en0 en1 fw0 p2p0
 
Have done it several times (as VMware fusion had been updated). This time I copied and pasted from this forum. I don't think it could go wrong. However, I am trying to have "clean" install of Lion on my system. Will try it again and report back. Cheers!
 
Have done it several times (as VMware fusion had been updated). This time I copied and pasted from this forum. I don't think it could go wrong. However, I am trying to have "clean" install of Lion on my system. Will try it again and report back. Cheers!

i have done it many times. failed in Lion. no Prob in SL.:confused:
 
Clean Lion feedback

Sorry for the late response.

I have installed a clean Lion with VMware Fusion 3.1.3. Do all those things and it WORKS!

Have no idea why it didn't work last time, when I have Lion upgraded from Snow Leopard.

Thanks psid for this greate mod!
 
Sorry for the late response.

I have installed a clean Lion with VMware Fusion 3.1.3. Do all those things and it WORKS!

Have no idea why it didn't work last time, when I have Lion upgraded from Snow Leopard.

Thanks psid for this greate mod!

hey mate, what have you done differently??
just copied all again and tried again, no luck

what i noticed different from SL was, unable to load up nano, seems the EDITOR line, brings me only vi...

------------

finally sorted. turns out, it wasn't recognising the home directory which is on another partition.
i replaced all ~ by its actual fixed location. i.e. replaced all ~ by /Volume/<diskName>/<user>/

phew... glad it is all working again. :)
 
Last edited:
Instructions for Lion

Finally installed Lion and I think I solved the mystery of why/when the scripts fail to work properly.

When is this happening:

Only when you have the mod already applied and then upgrade to Lion.

If you upgrade to Lion and have never applied the mod before or if you do a clean install everything should work as is.

Why is this happening:

The problem as hekokimushi has figured out has to do with determining the home folder. The reason is that in Lion the default settings for sudo have changed.

If we compare the default sudoers file from Snow Leopard to that of Lion we see that an extra line is added in Lion:

Defaults env_keep += "HOME MAIL"

But it seems that while upgrading the installer sees that the sudoers file had been modified before and does not change it at all.

*** This means that if you had the mod applied and then upgraded to Lion your sudoers file is missing the line above. ***

How to fix it:

You have to edit sudoers (using sudo visudo) and manually add the missing line. Here is how the section of the file were defaults are specified should look like:

# Defaults specification
Defaults env_reset
Defaults env_keep += "BLOCKSIZE"
Defaults env_keep += "COLORFGBG COLORTERM"
Defaults env_keep += "__CF_USER_TEXT_ENCODING"
Defaults env_keep += "CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE"
Defaults env_keep += "LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME"
Defaults env_keep += "LINES COLUMNS"
Defaults env_keep += "LSCOLORS"
Defaults env_keep += "SSH_AUTH_SOCK"
Defaults env_keep += "TZ"
Defaults env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
Defaults env_keep += "EDITOR VISUAL"
Defaults env_keep += "HOME MAIL"


That is you should add the line:

Defaults env_keep += "HOME MAIL"

after this line:

Defaults env_keep += "EDITOR VISUAL"

What happened to nano?

In Lion you cannot change the editor used to edit sudoers. That is the line:

EDITOR=/usr/bin/nano sudo visudo

does not work as before. You still get vim as your editor.

The reason is that the env_editor option is off by default in Lion but was on by default in Snow Leopard (for anyone more interested type man sudoers). This can be changed but probably not worth doing. Instead here are some basic instructions of how to do step 5 using vim.

5. Add bootnetopt.sh to sudoers.

This is done using the visudo command which must be run with sudo (we cannot give ourselves permission to be running a script as root without first being root) so type:

$ sudo visudo

Press shift-g to go to the last line, then press shift-a to go to the end of that line, press return to start a new line and add the following exactly:

ALL ALL = NOPASSWD: /Applications/VMware\ Fusion.app/Contents/MacOS/bootnetopt.sh

Now press Esc to go to command mode and press shift-; then type wq (to write changes and quit) and press return again.

If you get a warning like the following:

What now?
Options are:
(e)dit sudoers file again
e(x)it without saving changes to sudoers file
(Q)uit and save changes to sudoers file (DANGER!)


it means you made a mistake, do NOT select Q to quit, either press e to try again or x to cancel your changes.

I hope all the above is not too intimidating but if you have any questions or problems just ask here and I'll try to help if I can.
 
problem opening .vmware files

i changed this (in vmware.sh):
/Applications/VMware\ Fusion.app/Contents/MacOS/vmware.bin
to this:
/Applications/VMware\ Fusion.app/Contents/MacOS/vmware.bin $*

and now it opens them as it did originally
 
Last edited:
VMware Fusion 4

The new version 4 of Vmware Fusion is out!

I've just upgraded (with tool provided in the package installer) to this new release and the workaround by psid still works. However, I realize there's no vmware.bin (and vmware.sh script by psid) and bootnetopt.sh anymore. So I wonder whether or not Vmware Fusion 4 add psid's workaround into their product. :rolleyes:

Is there anybody there just clean-install Vmware Fusion 4? Could you please confirm that the kexts and vmnets are only started with Vmware, not with the system? ;)
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.