# vmware/open-vm-tools architecture

> Architecture diagram of the GitHub repository vmware/open-vm-tools, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vmware/open-vm-tools
- Repository: https://github.com/vmware/open-vm-tools

## Overview

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: [`open-vm-tools/lib`](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/lib) (Foundation libs), [`open-vm-tools/services/vmtoolsd`](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/vmtoolsd) (vmtoolsd), [`open-vm-tools/lib/rpcChannel`](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/lib/rpcChannel) (RPC channel), [`open-vm-tools/modules`](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/modules) (Kernel modules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_services["User space"]
  node_n_vmtoolsd["vmtoolsd<br/>daemon orchestrator"]
  node_n_plugin_mgr["Plugin mgr<br/>daemon core<br/>[pluginMgr.c]"]
  node_n_tools_rpc["Tools RPC<br/>daemon rpc<br/>[toolsRpc.c]"]
  node_n_plugins["Plugins<br/>feature modules"]
  node_n_dndcp["DnD/CP<br/>clipboard transfer"]
  node_n_resolution["Resolution<br/>desktop resize"]
  node_n_vmbackup["VM backup<br/>quiesce plugin"]
  node_n_container["Container info<br/>discovery plugin"]
  node_n_gueststore["GuestStore<br/>data plugin"]
  node_n_hgfsfuse["HGFS FUSE<br/>fuse client"]
  node_n_vmblockfuse["VMBlock FUSE<br/>fuse client"]
  node_n_toolbox["Toolbox<br/>cli utility"]
end

subgraph group_grp_libs["Shared libs"]
  node_n_rpchost["RPC channel<br/>guest-host transport"]
  node_n_foundation["Foundation libs<br/>shared runtime"]
  node_n_hgfslib["HGFS libs<br/>shared fs libs"]
  node_n_deploypkg["DeployPkg<br/>deployment lib"]
  node_n_appmonitor["App monitor<br/>monitoring lib"]
  node_n_guestlib["GuestLib<br/>guest metrics lib"]
end

subgraph group_grp_kernel["Kernel space"]
  node_n_modules["Kernel modules<br/>drivers"]
  node_n_vmmemctl["vmmemctl<br/>balloon driver"]
  node_n_vmxnet["vmxnet<br/>network driver"]
  node_n_vmblock["vmblock<br/>fs driver"]
end

subgraph group_grp_vgauth["VGAuth"]
  node_n_vgauth["VGAuth<br/>auth service"]
end

node_n_vmtoolsd -->|"loads"| node_n_plugin_mgr
node_n_vmtoolsd -->|"serves"| node_n_tools_rpc
node_n_plugin_mgr -->|"hosts"| node_n_plugins
node_n_plugins -->|"use transport"| node_n_rpchost
node_n_plugins -->|"use shared libs"| node_n_foundation
node_n_dndcp -->|"RPC"| node_n_rpchost
node_n_dndcp -->|"utils"| node_n_foundation
node_n_resolution -->|"X/OS utils"| node_n_foundation
node_n_vmbackup -->|"quiesce"| node_n_deploypkg
node_n_vmbackup -->|"utils"| node_n_foundation
node_n_container -->|"utils"| node_n_foundation
node_n_container -->|"RPC"| node_n_rpchost
node_n_gueststore -->|"utils"| node_n_foundation
node_n_hgfsfuse -->|"protocol"| node_n_hgfslib
node_n_hgfsfuse -->|"channel"| node_n_rpchost
node_n_vmblockfuse -->|"mounts"| node_n_vmblock
node_n_toolbox -->|"controls"| node_n_vmtoolsd
node_n_toolbox -->|"uses"| node_n_foundation
node_n_vgauth -->|"auth RPC"| node_n_rpchost
node_n_vgauth -->|"shared base"| node_n_foundation
node_n_modules -->|"contains"| node_n_vmmemctl
node_n_modules -->|"contains"| node_n_vmxnet
node_n_modules -->|"contains"| node_n_vmblock
node_n_vmtoolsd -.->|"auth boundary"| node_n_vgauth
node_n_vmtoolsd -.->|"shared folders"| node_n_hgfsfuse
node_n_vmtoolsd -.->|"blocking"| node_n_vmblockfuse

click node_n_vmtoolsd "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/vmtoolsd"
click node_n_plugin_mgr "https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/services/vmtoolsd/pluginMgr.c"
click node_n_tools_rpc "https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/services/vmtoolsd/toolsRpc.c"
click node_n_plugins "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins"
click node_n_dndcp "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/dndcp"
click node_n_resolution "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/resolutionSet"
click node_n_vmbackup "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/vmbackup"
click node_n_container "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/containerInfo"
click node_n_gueststore "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/guestStore"
click node_n_hgfsfuse "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/vmhgfs-fuse"
click node_n_vmblockfuse "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/vmblock-fuse"
click node_n_toolbox "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/toolbox"
click node_n_vgauth "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/vgauth"
click node_n_rpchost "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/lib/rpcChannel"
click node_n_foundation "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/lib"
click node_n_hgfslib "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/lib/hgfs"
click node_n_deploypkg "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/libDeployPkg"
click node_n_appmonitor "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/libappmonitor"
click node_n_guestlib "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/libguestlib"
click node_n_modules "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/modules"
click node_n_vmmemctl "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/modules/shared/vmmemctl"
click node_n_vmxnet "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/modules/shared/vmxnet"
click node_n_vmblock "https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/modules/shared/vmblock"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_n_vmtoolsd,node_n_plugin_mgr,node_n_tools_rpc,node_n_plugins,node_n_dndcp,node_n_resolution,node_n_vmbackup,node_n_container,node_n_gueststore,node_n_hgfsfuse,node_n_vmblockfuse,node_n_toolbox toneBlue
class node_n_rpchost,node_n_foundation,node_n_hgfslib,node_n_deploypkg,node_n_appmonitor,node_n_guestlib toneAmber
class node_n_modules,node_n_vmmemctl,node_n_vmxnet,node_n_vmblock toneMint
class node_n_vgauth toneRose
```

## Components

### User space

Daemon, plugins, utilities, and FUSE clients

- [vmtoolsd](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/vmtoolsd): daemon orchestrator · Central guest daemon that loads plugins, runs the main loop, and dispatches VMware RPC-driven work. · `open-vm-tools/services/vmtoolsd`
- [Plugin mgr](https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/services/vmtoolsd/pluginMgr.c): daemon core · Plugin loading and service registration inside vmtoolsd. · `open-vm-tools/services/vmtoolsd/pluginMgr.c`
- [Tools RPC](https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/services/vmtoolsd/toolsRpc.c): daemon rpc · Daemon-side RPC/service plumbing used by plugins and external requests. · `open-vm-tools/services/vmtoolsd/toolsRpc.c`
- [Plugins](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins): feature modules · 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](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/dndcp): clipboard transfer · Drag-and-drop and copy-paste subsystem with guest-side transport, UI, and file transfer logic. · `open-vm-tools/services/plugins/dndcp`
- [Resolution](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/resolutionSet): desktop resize · Screen resolution and display adaptation plugins for X11/RandR/KMS-style environments. · `open-vm-tools/services/plugins/resolutionSet`
- [VM backup](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/vmbackup): quiesce plugin · Guest quiescing and backup coordination with script and state-machine logic. · `open-vm-tools/services/plugins/vmbackup`
- [Container info](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/containerInfo): discovery plugin · Container/service discovery plugin that integrates with containerd gRPC and optional Docker access. · `open-vm-tools/services/plugins/containerInfo`
- [GuestStore](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/guestStore): data plugin · GuestStore access path for retrieving and publishing guest data. · `open-vm-tools/services/plugins/guestStore`
- [HGFS FUSE](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/vmhgfs-fuse): fuse client · User-space shared folders client path built around FUSE transport and HGFS request handling. · `open-vm-tools/vmhgfs-fuse`
- [VMBlock FUSE](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/vmblock-fuse): fuse client · User-space file-blocking client and mount helper for vmblock integration. · `open-vm-tools/vmblock-fuse`
- [Toolbox](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/toolbox): cli utility · Administrative command-line front end for guest operations and configuration. · `open-vm-tools/toolbox`

### Shared libs

Reusable runtime and protocol libraries

- [RPC channel](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/lib/rpcChannel): guest-host transport · Backdoor, socket, vsock, and VMX RPC transport wrappers used for guest-host communication. · `open-vm-tools/lib/rpcChannel`
- [Foundation libs](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/lib): shared runtime · Common utilities for logging, files, strings, processes, memory, Unicode, config, and platform abstraction. · `open-vm-tools/lib`
- [HGFS libs](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/lib/hgfs): shared fs libs · Shared HGFS protocol, naming, and server/client helper libraries used by shared-folder implementations. · `open-vm-tools/lib/hgfs`
- [DeployPkg](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/libDeployPkg): deployment lib · Package deployment and guest customization support shared by deployPkg features. · `open-vm-tools/libDeployPkg`
- [App monitor](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/libappmonitor): monitoring lib · Application monitoring support library used by appInfo-related guest feature code. · `open-vm-tools/libappmonitor`
- [GuestLib](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/libguestlib): guest metrics lib · 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](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/modules): drivers · Guest kernel drivers for vmblock, vmmemctl, and vmxnet/vmxnet3 across supported platforms. · `open-vm-tools/modules`
- [vmmemctl](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/modules/shared/vmmemctl): balloon driver · Memory ballooning driver for guest memory reclamation. · `open-vm-tools/modules/shared/vmmemctl`
- [vmxnet](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/modules/shared/vmxnet): network driver · Virtual network driver family including vmxnet and vmxnet3 definitions. · `open-vm-tools/modules/shared/vmxnet`
- [vmblock](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/modules/shared/vmblock): fs driver · Kernel-side file blocking and shared-folder related semantics. · `open-vm-tools/modules/shared/vmblock`

### VGAuth

Guest authentication subsystem

- [VGAuth](https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/vgauth): auth service · Guest authentication daemon, libraries, and verification logic for privileged guest operations. · `open-vm-tools/vgauth`

## Connections

- 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.
