Topic: vmware3 on FreeBSD
After several installations of this, I decided to write this howto. I've seen a few, but there are problems that I've run into each time, and I now have a system. I'm writing this mostly for myself, for the next time that I have to do this. I welcome comments of a better way.
I want to thank fmj who was an enormous help with my vmware installations. All mistakes are his--oops, I meant mine, but at least one best selling author always gets away with a line like--thanks to all of them and any mistakes are theirs.
I have found that I am unable to successfully do a new installation of vmware3 on CURRENT. It might die during the build or it might install, and coredump when I run the vmware-wizard. I have, in at least one case, been able to install it on a 6.x release and then update that machine to CURRENT and have it continue to work. (However, I haven't, once it is upgraded to CURRENT, been able to run a new instance of vmware wizard)
I have not tried to create a new vmware virtual disk manually on CURRENT. That might work, as the problem seems to be more with the wizard than with vmware itself.
I have also found (as this might soon be of interest) that it will install on a clean installation using Xorg-7.x with X11BASE being /usr/local. (Defined in /etc/make.conf) By default, at present, it will install in /usr/X11R6. (See the xorg FreeBSD wiki for a discussion of moving X11BASE to /usr/local.)
So, first, install vmware from ports.
cd /usr/ports/emulators/vmware3
make install cleanIt will pull in linux_base-fc-<version>.
During installation, it will ask if you wish to configure the vmnet interface. Choose yes. It will then ask if you wish to use netgraph bridging. Again, choose yes. It will then ask to which interface do you wish to tie the netgraph bridging. Choose your internal interface--that is, if you have a multihomed machine, choose the interface that works with yor internal network. If you just have one interface and reach the Internet through a router or another machine, just choose your network interface, for example, fxp0 (if it's an Intel) vr0 (if it's a via), etc.
There is some documentation in the port's directory. Rather than being directly there, as pkg-message, it's in /usr/ports/emulators/vmware3/files and called pkg-message.in
After installation, a few things are necessary. Contrary to the documentation, I have not found it necessary to load the aio module (or add VFS_AIO to the kernel.)
However, there are a few more things you will want to do. Once it is installed, add
kern.ipc.shm_allow_removed=1to /etc/sysctl.conf
(You can put that in force immediately, of course, with the sysctl command, doing
sysctl kern.ipc.shm_allow_removed=1Add the following to /boot/device.hints
hint.apic.0.disabled="1"(I've never been sure how to get this working without a reboot, but actually, the first run should work without it. )
You will have to mount linprocfs
Add the following to /etc/fstab
linprocfs /compat/linux/proc linprocfs rw 0 0kldload the module and mount it
kldload linprocfs
mount /compat/linux/procvmware3 installs a script in %%PREFIX%%/etc/rc.d called 001.vmware.sh. %%PREFIX%% will be /usr/X11R6 by default or, if the X11 folks' proposed changes take place, /usr/local. As mentioned above, both work. (At time of writing, late December, 2006, it will be /usr/X11R6 unless you specifically set X11BASE to /usr/local. As newcomers may also read this, note that the easiest way to change the default X11BASE would be to add the following to /etc/make.conf.
X11BASE=/usr/localHowever, newcomers, be warned. If you don't understand this, you should probably stick to the defaults, as this might cause other things to break. On the other hand, if you're doing a brand new installation of FreeBSD, it might be a good thing to add to /etc/make.conf, a file which you will probably have to create.
For the rest of this article, I'm going to assume you have the default of /usr/X11R6. If it's still useful in 6 or 8 months, and you don't see these files in /usr/X11R6 then check /usr/local. ![]()
Start the vmware script
/usr/X11R6/etc/rc.d/001.vmware.sh startNow you have vmware installed. The first thing to do is to run the vmware-wizard. The rest of this can be done as normal user in your $HOME directory.
Run the wizard
vmware-wizardHere is the first real problem. It will ask for a serial number. The vmware company no longer supports vmware3, so it will not sell you one. You will have to have one--one from a Linux vmware3 will work. Googling will often bring you a legitimate serial number. Using a friend's linux vmware3 serial number will work and he won't get arrested. Basically, the vmware company no longer seems to care about vmware3, however, they aren't going to post a usable serial number on their site, which seems a bit rude of them.
It will open a dialog that is pretty straight forward. It asks you choose the type of system you'll be installing. Neither fmj nor myself have gotten it working well with LInux, and actually, both of us needed some programs only available in Windows. (When installing Linux distributions, I could get it installed, but couldn't run anything in X.)
The wizard's defaults seem to be mostly for Linux. For example, for cdrom it chooses ./dev/cdrom rather than /dev/acd0. Edit it so that it points to your CD device, e.g. /dev/acd0. I choose to disable the floppy drive, since I've never needed it. For networking, choose host only, not bridged, even though you chose bridged during installation.
When this is done, you can start vmware
vmwareIt will ask you if you want to run the wizard, the configuration editor or open an existing configuration.
It will give various hints, saying this or that isn't going to work--these can usually be ignored, and you can also choose, with most of them, to not show the hint again.
Navigate to the existing configuration which will be something like
/home/scottro/vmware/Win2000pro/Win2000pro.cfg
Of course, unless your user name is scottro, the path will be a bit different, but in other words, your $HOME/vmware/<TYPE_CHOSEN_BY_WIZARD>/something.cfg
You'll get some more warnings and hints that can be ignored.
Insert the CD of the O/S that you wish to install. Depending upon your needs, if Win2k will do it, it will run a bit more quickly in vmware than will WinXP. (I need it primarily for walking users through various things, and also to run a Nortel VPN client, so for my needs, Win2k is fine.)
Note that games and the like are quite slow in vmware, and to me, it's not worth installing it for that. I was hoping to get Windows' pinball working, and it does work, but it acts as if it's on barbituates.
Click the power on button (in the vmware interface, not on your computer) It's in the upper left of the vmware window.
A virtual machine will boot up. You might get a warning about a floppy, no such device. I find the easiest way to get around this nuisance is to choose F2 for setup as the virtual machine boots, and disable the floppy drives shown in the virtual machine's (henceforth known as VM) BIOS.
It should see the CD and go through the installation. It will give a message that there is no usable disk, and give you the option to hit C to continue. Then, it will create the partition and offer to format it. (This is for a WIn2k installation--it's the same message you would get if booting a Win2k CD on a machine with no FAT or NTFS partitions.)
After that, it pretty much proceeds like a normal Win2k or XP install. It is usually quicker than an installation on an actual machine.
During the networking phase, just accept defaults and join a workgroup. (I haven't tried to join a domain during installation, so I'm not sure if that will work or not.)
When it's done, it will boot up. You'll log in. The mouse will be confined to the VM's screen--you won't be able to reach the vmware menu, which is outside of the VM. To release the mouse (there is a message to this effect) hit ctl+alt.
You can ignore warnings about video and mouse. However, the first thing you want to do is install vmware tools. Release the mouse with ctl+alt and go to Settings=> VMwareTools install. It will again give various warnings and hints but install the tools. This will improve the video. After they've been installed, you can right click on the desktop and adjust the settings to 800x600 or 1024x768.
Now, networking. This should work. If it doesn't, take a look at your /usr/X11R6/etc/vmware/config file. (Do this after closing vmware.)
You should see
vmnet1.Bridged = "YES"
vmnet1.BridgeInterface = "fxp0"
vmnet1.HostOnlyAddress = "192.168.0.1"
vmnet1.HostOnlyNetMask = "255.255.255.0"(That is assuming your LAN interface is fxp0. You want to be sure it's pointing to the LAN interface, whether it's fxp0, (Intel) vr0 (via) etc. You can always check that with ifconfig.
What is peculiar about this is that if you choose bridged in the the vmware-wizard, or later, with the configuration editor, it will not work. So, choose bridged during installation of the port and host only for everything afterwards, that is, the vmware-wizard when setting up your virtual machines.
Last edited by scottro (2008-03-09 02:19:17)