1

When installing RHEL 7/CentOS 7 as a VMware ESX guest, the installer (Anaconda) automatically detects the virtualization host, then install the appropriate tools (open-vm-tools and open-vm-tools-desktop, also known as the VMware Tools). [for those who have acces to Red Hat portal, I have also opened a discussion https://access.redhat.com/discussions/2770061 ].

It is certainly nice to install open-vm-tools automatically since it enable many features (with few dependencies).

Unfortunately, anaconda also install the package open-vm-tools-desktop which has a lot of dependencies (Xwindow and GTK library, etc). Not so useful, and not desirable on a small, secured, headless server.

I tried to explicitly explicitly remove open-vm-tools-desktop in Kickstart %packages section without success:

%packages
-open-vm-tools-desktop

How to prevent RHEL 7 from installing open-vm-tools-desktop ?

2

Red Hat and CentOS don't provide a lot of information on how this work. I found two Solution/Workaround. This is a new feature, in since EL7.2 as far as I can tell, it's known as Platform-specific packages are now installed automatically based on the used virtualization platform (BZ#884385), it's new in anaconda-19.31.123-1.el7 /RHBA-2015:0312-4

Why is it installed / How that work ?

This is a feature implemented by Add platform specific group selection (#884385) (look for get_platform_groupid in Anaconda source code ).

The way it work is that anaconda execute systemd-detect-virt to detect the virtualisation or container host (vmware, qemu, kvm, microsoft... docker, lxc, openvz...) then adds a YUM group named platform-$VIRTNAME

List the (special/hidden) groups:

$ yum group list hidden -v "@platform*" | grep "^ "
   Platform Development (platform-devel)
   VMware platform specific packages (platform-vmware)

Show the group content:

$ yum group info platform-vmware
Group: VMware platform specific packages
 Group-Id: platform-vmware
 Description: Virtualization utilities and drivers for VMware
 Default Packages:
   open-vm-tools
   open-vm-tools-desktop

Solution 1: Prevent from installing

Simply add @platform-vmware --nodefaults in the %packages section of your kickstart.

Make sure you don't put a dash at the begining of the line, as it won't prevent the group from being installed. You can still add a line open-vm-tools to install that package only !

Kickstart snippet example:

%packages
## Workaround to prevent automatic installation 
## of package open-vm-tools-desktop (an X11 library) 
## http://serverfault.com/q/815356/238995
## https://access.redhat.com/discussions/2770061
## Note: DON'T put a dash at the begining of the line !
## The way it works, is that it instructs Anaconda to install
## the "Mandatory" package from the YUM group 'platform-vmware',
## but not the "Defaults" and "Optional".
## Since this group has no Mandatory package... it actually
## install .. nothing !
@platform-vmware --nodefaults
#Optionaly, install this if needed:
#open-vm-tools

The way it works, is that it instructs Anaconda to install the "Mandatory" package(s) from the YUM group platform-vmware, but not the "Defaults" and "Optional" package(s). Since this group has no Mandatory package... it actually install nothing !

Workaround: Purge the packages by hand,

Purge the packages by hand. Be carefully, as it may uninstall other packages, so double check before pressing yes ! (and fine tune the list if needed)

/usr/bin/yum erase open-vm-tools-desktop harfbuzz libthai libtiff mesa-libgbm mesa-libglapi libXxf86vm libxshmfence libdrm libpng mesa-libEGL libXau libXft mesa-libGL pixman atk cairo gdk-pixbuf2 hicolor-icon-theme libxcb libXcomposite libXcursor libXdamage libXfixes libXrender pango pangommatkmm cairomm gtk2 gtkmm24 libX11 libXext libXi libXinerama libXrandr libXtst glibmm24 graphite2 libX11-common 

Other solutions tried, but not working:

  • explicitly remove @platform-vmware in Kickstart %packages section.
  • explicitly remove open-vm-tools-desktop in Kickstart %packages section

Diagnostic / Anaconda's log

Look for a tring like this in Anaconda's `packaging.log:

INFO packaging: Adding platform group platform-vmware

Other platforms reported by systemd-detect-virt aren't supported yet, and may report:

INFO packaging: Platform group kvm not available.
INFO packaging: Platform group microsoft not available.
INFO packaging: Platform group oracle not available.
INFO packaging: Platform group xen not available.
INFO packaging: Platform group qemu not available.
INFO packaging: Platform group zvm not available.
INFO packaging: Platform group bhyve not available.
  • To purge the packages manually, it would be better to run yum erase open-vm-tools-desktop and then yum autoremove, as opposed to listing all the dependencies explicitly. – AdmiralNemo Jan 13 '17 at 21:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.