[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Slackware as a VMWare Guest

Introduction

These instructions apply to ESXi 5.5. It's highly likely they also apply to other versions of VMWare, unfortunately you have a lot to choose from taking into account Workstation, Fusion and even Player and I can't test them all. These instructions refer to Slackware 64-bit 14.2 as the guest, and assume Fluxbox WM.

VM Creation Options

Creating a virtual machine is pretty standard. If you want you can choose VMXNET3 as network interface card because Slackware supports that out of the box, and should give about 15% performance boost in some workloads. Alternatively you can play it safe and just use e1000. Don't choose paravirtualised disk controller which is often 'helpfully' selected by default for Linux: either SATA or LSI Logic SAS should work fine.

Guest Additions Install

Install of VMWare tools doesn't work without some fiddling. First of all, eject the virtual CD-ROM by (as root) typing:

# eject

Now you can 'Install VMWare tools' in the ESXi management interface. This will simply 'insert' the CD with the software, because Slackware won't auto-run anything unless you've set that up.

# mount /dev/dvd /mnt/dvd
# cd /usr/src
# tar xvf /mnt/dvd/vmware-tools-distrib.tar.gz

You may find the file is called something other than vmware-tools-distrib.tar.gz, there should only be one tarball.

Before we do anything else, we have one little patch to apply. Save this to a file called /usr/src/vmware.patch:

diff --git a/bin/vmware-config-tools.pl b/bin/vmware-config-tools.pl
index 9f64614..e14cb0d 100755
--- a/bin/vmware-config-tools.pl
+++ b/bin/vmware-config-tools.pl
@@ -4162,7 +4162,7 @@ sub setup32or64Symlinks {
 
 # Install a pam.d vmtoolsd file on all but Solaris.
   if (vmware_product() ne 'tools-for-solaris' && ($open_vm_compat == 0)) {
-     install_symlink($pamdfile, '/etc/pam.d/vmtoolsd');
+#     install_symlink($pamdfile, '/etc/pam.d/vmtoolsd');
   }
 
   if (vmware_product() eq 'tools-for-linux') {

Now patch the source:

# cd vmware-tools-distrib
# patch -p1 < ../vmware.patch

And finally run the installer:

bash-4.3# ./vmware-install.pl 
warning: Generating 12 missing index(es), please wait...
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files? 
[/usr/bin] 

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc/rc.d] 

What is the directory that contains the init scripts? 
[/etc/rc.d/init.d] 

In which directory do you want to install the daemon files? 
[/usr/sbin] 

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

The path "/usr/lib/vmware-tools" does not exist currently. This program is 
going to create it, including needed parent directories. Is this what you want?
[yes] 

In which directory do you want to install the common agent library files? 
[/usr/lib] 

In which directory do you want to install the common agent transient files? 
[/var/lib] 

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 

The installation of VMware Tools 10.0.9 build-3917699 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes] 

Initializing...

Making sure services for VMware Tools are stopped.

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:[ OK ]
   VMware User Agent (vmware-user):[ OK ]
   Unmounting HGFS shares:[ OK ]
   Guest filesystem driver:[ OK ]

sh: : command not found
The module vmci has already been installed on this system by another installer 
or package and will not be modified by this installer.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another 
installer or package and will not be modified by this installer.

The VMware Host-Guest Filesystem allows for shared folders between the host OS 
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 
to enable this feature? [no] yes

The vmxnet driver is no longer supported on kernels 3.3 and greater. Please 
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

The vmblock enables dragging or copying files between host and guest in a 
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[no] yes

VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?
[no] 


Disabling timer-based audio scheduling in pulseaudio.

Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed 
if you want to enable Common Agent (caf). [yes] 

Do you want to enable Common Agent (caf)? [yes] 


Detected X server version 1.18.3


Distribution provided drivers for Xorg X server are used.

Skipping X configuration because X drivers are not included.

Creating a new initrd boot image for the kernel.
Nothing found at location /boot/initrd-tree, so we will create an
initrd directory structure there... done.

Now cd to /boot/initrd-tree and install some modules in your
module directory (lib/modules/4.4.14).  Then see init
for more information (there are a few other files to edit).
Finally, run mkinitrd again once the initrd-tree is ready,
and /boot/initrd.gz will be created from it.

Generating the key and certificate files.
Successfully generated the key and certificate files.
   Checking acpi hot plug[ OK ]

Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:[ OK ]

   Guest operating system daemon:[ OK ]

   VGAuthService:[ OK ]

   Common Agent:[ OK ]

The configuration of VMware Tools 10.0.9 build-3917699 for Linux for this 
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take 
effect.

You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and 
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

Found VMware Tools CDROM mounted at /mnt/dvd. Ejecting device /dev/sr0 ...

bash-4.3# 

I've enabled only two options that are by default disabled: Host-Guest Filesystem and vmblock. All other options are as per the default. I've included the complete typescript so you can compare with your own execution.

Guest Additions Configuration

Display

By this point, if you are in X, you won't see much effect from VMWare Tools. The first thing to do is run:

# vmware-user

Your display may flicker somewhat. In fact your display may end up being complete garbage. If it does, try to re-size the display window. It should then correct itself and you'll then find the X screen resizes appropriately as you change it's dimensions. You probably want to add vmware-user somewhere to start on login or when your X session starts.

Clipboard

At this point, copying between host and guest clipboards has been enabled, however with ESXi you may find it hasn't been configured at the Virtual Machine level. Follow the VMWare instructions to get it enabled.

Sources

 howtos:misc:virtualisation:vmware_guest ()