How to set up VMware(tm)(*) on NetBSD/i386 ========================================== 0) Buy a license from VMware Inc. to run VMware workstation for Linux, see http://www.vmware.com/. Then, after copying the license to /root/.vmware/license, download the latest distribution file (currently VMware-2.0.3-799.tar.gz) from the same site. Extract the file into a temporary directory, and remember the name of this directory (the install script will ask for it). Please note that NetBSD/i386 is currently an unsupported platform for VMware, and that this is obviously a 3rd party, 'unofficial' effort. Also please read the file LEGAL.notice. 1) You will need either a recent NetBSD/i386-current kernel (later than march 2001), or a NetBSD/i386 1.5 branch kernel (after march 31st, 2001). NetBSD 1.5 or earlier will not work. You will need to compile a kernel from source. To get an 1.5 branch kernel via anoncvs, use '-r netbsd-1-5' to the CVS checkout command. For more information on how to use NetBSD's anoncvs service, see http://www.netbsd.org/ An 1.5 branch kernel is strongly recommended. I have seen some problems with -current kernels, like VMware panicing during win2000 installs, and during heavier disk access under Linux. Note that the LKMs are compiled for the 1.5 branch. If you want to use -current, you will need to recompile the LKMs from source (don't forget to set the path to your kernel sources in the Makefiles), and copy them to their place in the installed tree later. 2) Make sure you have the LKM option in your kernel. 3) Make sure you have a new enough binary of mount_procfs(8) so that it understands the -o linux mount option to mount -t procfs (same source dates as the kernels). 4) Have a fairly recently populated /emul/linux (for example through the suse_* pkgs), and of course COMPAT_LINUX enabled in the kernel (or the LKM loaded). You will need the most common Linux shared libraries (libm, libc, the dynamic linker), and the Linux X11 libraries. 5) Have a /emul/linux/dev that looks at least like this: lrwxr-xr-x 1 root wheel 10 Jan 7 19:33 cdrom -> /dev/rcd0a lrwxr-xr-x 1 root wheel 10 Jan 2 12:20 dsp -> /dev/sound lrwxr-xr-x 1 root wheel 10 Jan 7 19:33 fd0 -> /dev/rfd0a lrwxr-xr-x 1 root wheel 10 Jan 7 19:34 floppy0 -> /dev/rfd0a lrwxr-xr-x 1 root wheel 9 Apr 3 21:08 hda -> /dev/wd0d lrwxr-xr-x 1 root wheel 9 Apr 3 21:08 hdb -> /dev/wd1d lrwxr-xr-x 1 root wheel 9 Apr 3 21:12 hdc -> /dev/wd2d lrwxr-xr-x 1 root wheel 9 Apr 3 21:12 hdd -> /dev/wd3d lrwxr-xr-x 1 root wheel 9 Apr 3 22:41 hde -> /dev/sd0d lrwxr-xr-x 1 root wheel 9 Apr 3 22:42 hdf -> /dev/sd1d lrwxr-xr-x 1 root wheel 9 Apr 3 22:42 hdg -> /dev/sd2d lrwxr-xr-x 1 root wheel 9 Apr 3 22:42 hdh -> /dev/sd3d lrwxr-xr-x 1 root wheel 9 Apr 3 22:42 hdi -> /dev/sd4d lrwxr-xr-x 1 root wheel 9 Jan 25 23:41 null -> /dev/null lrwxr-xr-x 1 root wheel 4 Apr 3 21:15 tty0 -> tty1 lrwxr-xr-x 1 root wheel 10 Dec 29 15:12 tty1 -> /dev/ttyE0 lrwxr-xr-x 1 root wheel 10 Dec 29 15:12 tty2 -> /dev/ttyE1 lrwxr-xr-x 1 root wheel 10 Dec 29 15:12 tty3 -> /dev/ttyE2 lrwxr-xr-x 1 root wheel 10 Apr 3 21:15 tty4 -> /dev/ttyE3 lrwxr-xr-x 1 root wheel 10 Dec 29 15:12 tty5 -> /dev/ttyE4 lrwxr-xr-x 1 root wheel 10 Dec 29 15:12 tty6 -> /dev/ttyE5 The device links for floppy, cdrom and harddrives are for the benefit of the vmware-wizard. If you just create configuration files via the 'create new config' menu in vmware, you can specify the devices yourself, and you don't really need them. The install script will attempt to create these links, but it will not. 6) If you want to use vmware-wizard, you will also need a link from /emul/linux/etc/mtab to /etc/fstab, and a linux df(1) binary in /emul/linux/bin (vmware-wizard executes df(1) with the -T option, which NetBSD doesn't implement). 7) To avoid one complaint starting up vmware, have a free virtual wscons terminal, without getty running on it (if you don't have it, it'll complain, but don't worry). 8) mount procfs with -o linux either on /proc or /emul/linux/proc (it should have meminfo and cpuinfo in it). 9) To install VMware, use the provided 'install.sh' script, executed in the directory that it is located in. It will ask you for the directory to install VMware in. It will use the normal subdirectories (bin/ share/, etc) underneath that directory. The script will also create a config file called /etc/vmware/config. The location of this file can not be changed as far as I know, it is hardcoded in the binary. During installation, you may see some 'file exists' messages when it attempts to create device links in /emul/linux/dev. These are not fatal, but if you do see them, check with the ls(1) output above whether your /emul/linux/dev matches. The installer will also install 3 startup scripts into /etc/rc.d: vmmon, vmnet and vmnetif. These take care of loading the main vmware module, the 'host-only' networking module, and configuring 'host-only' networking respectively. They are configured via /etc/rc.conf.d/vmware. By default, the network used between virtual machines is 172.16.212.0/8, with 172.16.212.1 being the interface on the host machine. You can change this in the /etc/rc.conf.d/vmware config file. You can also use dhcpd(8) to configure virtual machines. The vmnetif script can optionally restart dhcpd, so that it will notice the newly created 'vmnet1' (the name of the host-only interface on the host machine). Using routing and possibly NAT, you can then access the outside world from a virtual machine, and do all other things that you could normally do with a network. Note that currently the network address of the host interface is actually in 2 places: /etc/rc.conf.d/vmware and /etc/vmware/config. 10) Before running VMware make sure to *read the VMware documentation* (for VMware Workstation on Linux), available from http://www.vmware.com/ This README *only* describes issues particular to this NetBSD version. 11) The installer will strip the setuid bit from the 'vmware' binary. I have no reason to assume that VMware is not secure, but for the things that it does, I thought it safer to only enable running it as root. The original mode is -r-sr-xr-x 1 root wheel. If you want to use that mode again, be sure to also change the mode of the device nodes (edit the share/lkm/*post.sh scripts), and copy the license file to the .vmware directory in the directory of the normal user you want to run it as. 12) When everything is installed, you can run vmware as $prefix/bin/vmware, where $prefix is the install directory you selected. You must run it as root. What doesn't work: ================== * The parallel port The parallel port code interfaces with a specific Linux parallel port kernel module, which is currently hard to support under NetBSD. * Bridged networking. Bridging is not in the NetBSD 1.5 branch kernel sources, and not yet available in NetBSD-current. * Full screen text mode. Do not switch to full screen mode while a virtual machine is in text mode, VMware will crash. This is no doubt a Linux emulation issue (it works fine under Linux), but it's impossible to track down what the problem is without source code. * Under Windows 2000, sound is fragmented, though under NT4 it's mostly fine. * The vmware-mount.pl and vmware-config.pl scripts have not been tested and will likely not work. The tested binaries are vmware itself, vmware-wizard, and vmnet-netifup, more should not be needed. Miscellaneous caveats ===================== The 'linuxrtc' kernel module is, as is indicated in the VMware docs, not needed for correct operation in most cases. This is why it is off by default. You will get a warning about /dev/rtc not being accessible, but you can ignore that. You will probably only need 'linuxrtc' when running Windows 95/98 (or perhaps ME), and menus seem sluggish, as described in the VMware documentation. At startup, you will get a message complaining about 'unknown mouse type'. This is not a problem in practice, unless you want to run programs that use the mouse in textmode inside a virtual machine. The presence of a floppy can not currently be detected from a userspace program under NetBSD. Hence, the Linux emulation code will always claim that a floppy has been inserted. This can be a problem if you have the floppy enabled, and there is no floppy in the drive. To work around this, either disable the floppy in the virtual machine's BIOS setup, or leave a floppy in the drive. The binaries for the VMware dhcpd and smbd programs are installed, but not used. To use DHCP on the virtual machines, you can use the NetBSD dhcpd. See dhcpd(8) (see also the comment about vmnetif above). For SMB file sharing, you can look at, for example, the 'samba' pkg, and use that on the host-only virtual network. When specifying device paths for attached devices to a virtual machine, use 'raw' devices (/dev/r*) for floppy and CD-ROM drives, otherwise a change of media in the drive will not be handled correctly. For raw disks, always use /dev/wdXd or /dev/sdXd (not their raw counterparts). Some Linux binaries, when run as root under emulation, will actually create the root homedirectory if it does not exist. So, you may have a /emul/linux/root as well as a /root. If this is the case, you may see "Invalid license" messages, because vmware is looking in /emul/linux/root/.vmware (using a directory search) rather than /root/.vmware. The easiest solution is to simply put the license in the /emul/linux/root/.vmware directory. * 'VMware' is a trademark of VMware, Inc, and is copyright (c) 1998-2001 VMware, Inc.