How vmware/open-vm-tools works
1. What this repository is
open-vm-tools is the guest-side half of VMware Tools: a mixed user-space and kernel-space codebase that runs inside Linux, Solaris, and FreeBSD guests to expose VMware-specific integration features to the hypervisor and host-side tooling.
2. Top-level runtime split
The architecture divides into:
- system daemon and services in services/
- shared libraries in lib*/
- kernel modules/drivers in modules/
- command-line utilities like vmtoolsd, toolbox, rpctool, hgfsclient, checkvm
- support services such as vgauth, vmhgfs-fuse, vmblock-fuse, and wrapper launchers
3. Core control plane: vmtoolsd
services/vmtoolsd is the central user-space daemon. It initializes the runtime, loads plugins through the plugin manager, runs the main loop, and provides the RPC/service plumbing that most guest features hang off of. This is the primary orchestration boundary in the repo.
4. Plugin-based feature model
Most guest features are implemented as plugins under services/plugins/. Examples include:
- power management and scripts
- guest info collection
- time sync
- drag-and-drop / copy-paste
- screen resolution management
- backup/quiescing
- guest store and guest data publisher
- app/service/container discovery
- component manager / Salt setup
- VIX command execution
The daemon loads these at runtime, so the feature set is modular rather than hardwired.
5. Host/guest communication layer
The repo’s key integration boundary is the VMware guest RPC channel. Shared code under lib/rpc*, lib/backdoor, lib/rpcChannel, lib/rpcIn, lib/rpcOut, and lib/rpcVmx wraps the transport mechanisms used to communicate with VMware host-side components. Some features use backdoor I/O directly; others use socket/vsock-style channels where available.
6. Shared foundation libraries
The lib/ tree contains reusable building blocks that support nearly all higher-level components:
- logging, errors, messaging, panic handling
- file/path/process/auth helpers
- data structures and utility code
- Unicode, encoding, JSON, random, time, and string helpers
- platform abstraction layers for POSIX/Linux/Solaris/FreeBSD differences
- guest-facing protocol definitions and XDR/gRPC-related helpers
These libraries form the internal platform layer used by both daemons and utilities.
7. Kernel-space drivers and filesystem integration
modules/ contains the guest kernel drivers:
- vmblock for file blocking semantics used by shared folders/file operations
- vmmemctl ballooning driver for memory reclamation
- vmxnet / vmxnet3 virtual network drivers
- vmhgfs on Solaris and shared vmblock/vmmemctl code
These modules are the low-level path to performance-sensitive virtualization features and are distinct from the user-space plugins.
8. Shared folders architecture
Shared folders are implemented in two layers:
- kernel or platform-specific code in modules/*/vmhgfs / vmblock
- user-space FUSE-based tools in vmhgfs-fuse, vmblock-fuse, and vmblockmounter
The repository reflects a transition from kernel driver-based shared folders toward the FUSE client path, with libhgfs and lib/hgfs* providing common HGFS protocol/file handling logic.
9. Guest authentication and identity services
vgauth/ implements a separate authentication stack for guest operations. It includes:
- a service daemon
- client libraries
- common crypto/cert/user-check logic
- Linux/POSIX-specific implementation code
This subsystem is a security boundary: it authenticates guest-initiated actions before they are accepted by VMware tooling or host-requested operations.
10. Specialized feature subsystems
Several features are implemented as self-contained subsystems with their own internal libraries:
- libDeployPkg and the deployPkg plugin for guest customization/package deployment
- libappmonitor and the appInfo plugin for application monitoring
- libguestStoreClient / guestStore plugin for GuestStore access
- gdp plugin for guest data publishing
- containerInfo plugin, which talks to containerd via gRPC and optionally Docker via libcurl
- resolution plugins that use X11/RandR/Wayland-adjacent code for desktop resizing
These subsystems often have their own protocol parsers, OS adapters, and runtime dependencies.
11. Utilities and user-facing entry points
The command-line tools are thin front ends over the shared libraries and daemon services:
- toolbox for guest administration tasks
- rpctool for RPC interaction/debugging
- hgfsclient for shared-folder inspection
- checkvm and vmwgfxctrl for VM detection/graphics control
- vmware-user-suid-wrapper and similar wrappers to launch desktop integration components with elevated or constrained privileges
These tools are entry points for operators and desktop session startup, not core orchestration.
12. Build, packaging, and portability boundaries
The repo is organized with GNU Autotools (configure.ac, many Makefile.am files) and platform-specific subtrees for Linux, Solaris, FreeBSD, and shared code. This structure matters architecturally: most features are compiled conditionally by platform and optional package, and runtime behavior depends heavily on available guest OS facilities such as X11, D-Bus/GIO, FUSE, gRPC, and kernel interfaces.
13. Cross-cutting data flow
Typical flows look like this:
- host requests or VMware events enter through RPC/backdoor channels
- vmtoolsd dispatches to a plugin
- plugins call shared libraries for platform/file/process/auth utilities
- if needed, plugins or daemons invoke kernel modules, FUSE clients, or external services like containerd/Docker/X11
- results are reported back to the host or persisted in guest state/guest variables
This is the central architecture pattern repeated across the repo.
14. Tests and support scripts
tests/ provides targeted validation for debug, plugin, vmblock, and RPC behaviors. scripts/ and pam/ contain deployment and session-integration helpers, while udev/ and desktop integration files wire the guest services into the OS. These are supporting edges around the main runtime, not primary business logic.
Main entry points: lib Foundation libs · vmtoolsd vmtoolsd · rpcChannel RPC channel · modules Kernel modules
Components 23
User space
Daemon, plugins, utilities, and FUSE clients
- vmtoolsd · Central guest daemon that loads plugins, runs the main loop, and dispatches VMware RPC-driven work.
open-vm-tools/services/vmtoolsd - Plugin mgr · Plugin loading and service registration inside vmtoolsd.
open-vm-tools/services/vmtoolsd/pluginMgr.c - Tools RPC · Daemon-side RPC/service plumbing used by plugins and external requests.
open-vm-tools/services/vmtoolsd/toolsRpc.c - Plugins · Runtime-loaded guest feature implementations such as power, time sync, guest info, DnD, resolution, backup, guest store, discovery, and VIX.
open-vm-tools/services/plugins - DnD/CP · Drag-and-drop and copy-paste subsystem with guest-side transport, UI, and file transfer logic.
open-vm-tools/services/plugins/dndcp - Resolution · Screen resolution and display adaptation plugins for X11/RandR/KMS-style environments.
open-vm-tools/services/plugins/resolutionSet - VM backup · Guest quiescing and backup coordination with script and state-machine logic.
open-vm-tools/services/plugins/vmbackup - Container info · Container/service discovery plugin that integrates with containerd gRPC and optional Docker access.
open-vm-tools/services/plugins/containerInfo - GuestStore · GuestStore access path for retrieving and publishing guest data.
open-vm-tools/services/plugins/guestStore - HGFS FUSE · User-space shared folders client path built around FUSE transport and HGFS request handling.
open-vm-tools/vmhgfs-fuse - VMBlock FUSE · User-space file-blocking client and mount helper for vmblock integration.
open-vm-tools/vmblock-fuse - Toolbox · Administrative command-line front end for guest operations and configuration.
open-vm-tools/toolbox
Shared libs
Reusable runtime and protocol libraries
- RPC channel · Backdoor, socket, vsock, and VMX RPC transport wrappers used for guest-host communication.
open-vm-tools/lib/rpcChannel - Foundation libs · Common utilities for logging, files, strings, processes, memory, Unicode, config, and platform abstraction.
open-vm-tools/lib - HGFS libs · Shared HGFS protocol, naming, and server/client helper libraries used by shared-folder implementations.
open-vm-tools/lib/hgfs - DeployPkg · Package deployment and guest customization support shared by deployPkg features.
open-vm-tools/libDeployPkg - App monitor · Application monitoring support library used by appInfo-related guest feature code.
open-vm-tools/libappmonitor - GuestLib · Guest-side metrics and environment library consumed by guest tools and helpers.
open-vm-tools/libguestlib
Kernel space
Guest drivers and filesystem modules
- Kernel modules · Guest kernel drivers for vmblock, vmmemctl, and vmxnet/vmxnet3 across supported platforms.
open-vm-tools/modules - vmmemctl · Memory ballooning driver for guest memory reclamation.
open-vm-tools/modules/shared/vmmemctl - vmxnet · Virtual network driver family including vmxnet and vmxnet3 definitions.
open-vm-tools/modules/shared/vmxnet - vmblock · Kernel-side file blocking and shared-folder related semantics.
open-vm-tools/modules/shared/vmblock
VGAuth
Guest authentication subsystem
- VGAuth · Guest authentication daemon, libraries, and verification logic for privileged guest operations.
open-vm-tools/vgauth
Connections 26
- vmtoolsd → Plugin mgr: loads · Initializes and manages runtime plugin loading.
- vmtoolsd → Tools RPC: serves · Exposes guest RPC handling and service dispatch.
- Plugin mgr → Plugins: hosts · Loads feature plugins at runtime.
- Plugins → RPC channel: use transport · Plugins communicate with VMware host-side components through RPC/backdoor wrappers.
- Plugins → Foundation libs: use shared libs · Plugins depend on common utilities, logging, process, file, and platform support.
- DnD/CP → RPC channel: RPC · Clipboard and drag-and-drop traffic uses guest-host transport layers.
- DnD/CP → Foundation libs: utils · Uses shared string, file, thread, and logging foundations.
- Resolution → Foundation libs: X/OS utils · Resolution handling relies on platform and desktop integration support.
- VM backup → DeployPkg: quiesce · Backup and quiesce workflows can coordinate with deployment and snapshot-style helpers.
- VM backup → Foundation libs: utils · Uses common state, process, and file helpers.
- Container info → Foundation libs: utils · Uses shared runtime libraries and JSON/protocol helpers.
- Container info → RPC channel: RPC · Container discovery is surfaced through guest-host RPC interfaces.
- GuestStore → Foundation libs: utils · GuestStore client features build on common helper libraries.
- HGFS FUSE → HGFS libs: protocol · FUSE client reuses shared HGFS naming and protocol logic.
- HGFS FUSE → RPC channel: channel · Shared-folder requests travel over guest-host channels/backdoor abstractions.
- VMBlock FUSE → vmblock: mounts · User-space mount helper bridges to vmblock semantics.
- Toolbox → vmtoolsd: controls · Administrative CLI interacts with daemon-exposed services and state.
- Toolbox → Foundation libs: uses · Thin CLI over the shared runtime libraries.
- VGAuth → RPC channel: auth RPC · Authentication service uses guest-host communication paths for validation and control.
- VGAuth → Foundation libs: shared base · Authentication code depends on common utilities and platform abstractions.
- Kernel modules → vmmemctl: contains · Kernel module family includes the ballooning driver.
- Kernel modules → vmxnet: contains · Kernel module family includes virtual NIC drivers.
- Kernel modules → vmblock: contains · Kernel module family includes shared-folder blocking support.
- vmtoolsd → VGAuth: auth boundary · Daemon-side features can rely on guest authentication before privileged operations.
- vmtoolsd → HGFS FUSE: shared folders · Daemon/plugin flows may coordinate with the user-space HGFS client path.
- vmtoolsd → VMBlock FUSE: blocking · Desktop and file-transfer features may coordinate with vmblock user-space support.