VMware on Slackware Linux

Slackware Linux isn't officially *supported* by the folks at VMware - but it's not a big deal to get everything working... once you realize the only immediate bump in the road is with the install/setup scripts that come with VMware. I would also suggest 'forcing' the installation to compile the various VMware modules for your system.

In a nutshell... the VMware installation script assumes 'System V' style startup directories, scripts, etc... and Slackware just doesn't come setup that way since it has adopted something closer to a BSD scenario.

BTW - If you happen to be running a 2.4.x kernel - do yourself a favor and grab a copy of VMware 2.0.4. You shouldn't have problems installing/compiling modules w/VMware 2.0.3 with kernels through 2.4.3... but you'd need to edit some of the modules source to compile with a 2.4.4 kernel or later (just grab the latest VMware release and save yourself some trouble ;-)

The Suggested Solution - Preparation

Let's just assume we'll temporarily create the 'missing' System V setup in /etc

You might want to do the following:

Since VMware will run suid root, you might want to limit program execution to a particular group of users (I created a 'vmware' group in /etc/group and added the desired users).

Running the installation

ok... let's assume you already downloaded the latest VMware .tar.gz archive and untarred & unzipped the distribution (creates a vmware-distrib directory wherever you did this).

(you need to be root to actually run the install)

If you didn't create the directories as mentioned above... the install should blow-up on you... and you'll need to go back and create the directories as mentioned.

When it asks you for the location of your startup scripts... and mentions rc0.d to rc6.d... you want to tell it /etc is the directory - since that's where we just created the temporary directories.

So... run through the prompts, answer the questions according to your preferences, etc... until you get to the part where it asks you if you want to run vmware-config.pl. DO NOT choose to run this now - you need to start the script manually with arguments. The setup should quit after you decline to run vmware-config.pl

I choose to install the binaries in /usr/local/bin - so we want to run vmware-config.pl from /usr/local/bin now. This might run OK if /usr/local/bin happens to be in your PATH setting, but I just 'cd' to /usr/local/bin in case it matters.

The extra --compile switch above forces vmware-config.pl to compile fresh modules for your system. If you forget the switch... it might appear that everything will work OK - modules are loaded without complaints, etc... but on *my* system, the pre-compiled modules segfault on startup and shutdown - and among other things... VMware isn't going to work.

(Just use the --compile switch to increase your chances for success)

Run through the remainder of the prompts, etc... until the script eventually finishes.

Back to Slackware reality

Once you are done running the install/config scripts - you probably want to make some minor changes to fit the Slackware/BSD scenario.

Copy the vmware script in /etc/init.d to /etc/rc.d/rc.vmware and make it executable.

Add a few lines to /etc/rc.d/rc.local to set up VMware when you boot the computer

(In /etc/rc.d/rc.local)

Now... you can go back and get rid of the temporary /etc/init.d, /etc/rc[0-6].d fixes.

Final adjustments...

If you decided to go with the vmware group suggestion... you might want to make adjustments to restrict VMware execution to members of that group.

I decided to set up a vmware directory in /usr/local and set similar permissions... before we actually run VMware for the first time.

Options for Guest Operating Systems under VMware...

When you fire up VMware for the first time, the VMware Configuration Wizard pops up... and you need to tell VMware a few things about your existing/planned setup for your guest operating system.

(The guest operating system is the operating system that will run in VMware, and the host operating system is Linux in this case)

If you currently have a dual-boot setup on your system, it is possible to boot your 'other' operating system with VMware. This works fine in my experience... and the only real adjustment to make is in setting up your video to use the VMware FIFO SVGA driver.

The machine I'm using right now is 100% Linux - so I'll explain the 'virtual' hard-drive setup now... and I'll plan on writing more when I go into work again ('real' dual-boot Win98/Linux machine there).

VMware Configuration Wizard... virtual hard-drive guest system

Just to be consistent with my own hints above... I'm no longer running as root... and I've reverted to a user account that is a member of the vmware group I created earlier. You might need to log out and log back in for the group membership to kick in...

Keep going through CD-ROM choice, floppy...

Last dialog... Done

VMware Configuration Wizard... existing physical disk guest system

The installation for a 'real' physical disk is very similar to the 'virtual' disk setup - with a couple of exceptions.

You'll need to uninstall/remove your old video drivers... and configure the video to use the VMware FIFO SVGA driver as mentioned in the virtual disk installation notes above. Apply Windows knowledge here - if you're having trouble... ask a friend who knows for help.

The biggest difference for a 'real' physical disk installation lies in the fact that you need read/write access to some of the partitions where the existing guest OS is installed.

I have LILO installed on the MBR... and configured the MBR with read-only access. The remainder of the partitions will potentially involve adjustments of Linux permissions... or a bit of thought about which filesystems you really need to access in the virtual machine.

Worst case... you might get frustrated and decide that you just want to run VMware as root, but I don't see this as a solution. More than likely... you'll want to make some adjustments to your /etc/fstab and allow user mounting and read/write access to specific filesystems.

Unfortunately, VMware considers read/write access to a whole disk when you run through the configuration wizard to set up a configuration to use an existing physical disk. Please understand that you are creating potential security hazards if you grant read/write access to an entire physical disk (/dev/hda, etc...).

A best case scenario would probably be to have your Linux and Windows installations on separate physical disks... but if this can't be achieved, follow along with the previous warnings in mind ;-)

First of all... some adjustments to /etc/fstab would be helpful to allow regular users to mount the related partition(s).

Now we can start up VMware and run the Configuration Wizard...

Again... assuming you read the notes about the virtual disk setup before the existing physical disk discussion... we have a /usr/local/vmware directory with root.vmware, 770 permissions.

If you upgrade your kernel...

If you happen to upgrade the kernel on your system... you'll need to build new modules for things to work correctly again -

Best case... you'll just need to run 'vmware-config.pl --compile' - but if you find yourself in more trouble... you might want to keep reading for other tips.

Assuming you got rid of /etc/rc0-6.d and /etc/init.d after you were done with the install - you'll just need to restore a couple of things temporarily before you run vmware-config.pl --compile (again)

Now you need to copy /etc/rc.d/rc.vmware to /etc/init.d/vmware and make a couple of minor adjustments in the form of symlinks.

The 'start' (S##vmware) and 'stop' (K##vmware) values above aren't really important... but the vmware-config.pl script still looks for /etc/init.d/vmware, /etc/rc3.d, and /etc/rc6.d when it tries to stop/start the vmnet and vmmon services.

So... you're ready to run vmware-config.pl --compile again -

I just 'cd' to /usr/local/bin and run it from there -

You just need to run through the questions for Samba and dhcpd one more time... realizing that you don't need to change anything. The most important part of the vmware-config.pl script is just building the modules for your new kernel.

Finally... when you're done running the script - you can clean up the temporary directories in /etc

Before you get rid of /etc/init.d/vmware - I'm assuming that your system is consistent with the rest of the tips here... and you already had /etc/rc.d/rc.vmware in place from your initial install (and the short addition to /etc/rc.d/rc.local mentioned earlier)

You should probably just copy /etc/init.d/vmware to /etc/rc.d/rc.vmware - just in case they made any changes to the script.

Then... go ahead and get rid of /etc/init.d

I believe that the vmware-config.pl script reloads the vmnet and vmmon modules -

but I've never bothered to check if all the other services get restarted too. If you don't know what I'm talking about here... doing something like -

Anyway - depending on how you have your vmware installation configured - you might notice more or less services running. If you don't see any services running - running the script in /etc/rc.d/rc.vmware to stop/start all the vmware stuff again wouldn't be a bad idea.

Now start up everything again...

(Remember the script is expecting 'start' and 'stop' parameters in a 'SysV' style... and we just named it 'rc.vmware' to be consistent with the other stuff in /etc/rc.d)

So... all of the modules *and* services should be loaded/restarted now

Last thing you might want to do...

to update the module dependencies in /lib/modules/<kernel #>/modules.dep

VMware with an XFS filesystem

If you happen to be using an XFS-capable kernel and an XFS filesystem - you'll probably notice a complaint related to filesystem locking when you try to start up VMware. The fix - just do what it suggests... and add the 'host.FSSupportLocking1 = 0x58465342' line to /etc/vmware/config (or wherever you happend to put the global configuration file) I'm not sure if the value above is constant... so just use the line it spits out on your system.

(Things should work fine the next time you start VMware... after you make the addition to the config file)