> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/chaos-engineering/faults/chaos-fault-categories/vmware/linux/vmware-network-rate-limit.md).

# VMware network rate limit

VMware network rate limit is a VMware chaos fault that caps egress bandwidth on the network interface `NETWORK_INTERFACE` of the Linux VM `VM_NAME` to `NETWORK_BANDWIDTH` (with optional `BURST` and `LIMIT`) for `TOTAL_CHAOS_DURATION` seconds, then removes the cap. The fault uses VMware Tools (Guest Operations API) to apply the rule inside the guest as `VM_USER_NAME`.

Use this fault to test how a workload on a VMware-hosted VM behaves when bandwidth is constrained: whether streaming/transfer workloads degrade gracefully, whether retries amplify the slowdown, and whether monitoring detects the regression within the alerting SLA.

{% hint style="info" %}
**RUN YOUR FIRST EXPERIMENT**

If you have not configured the chaos infrastructure yet, go to [Quickstart](/resilience-testing/chaos-engineering/new-to-chaos-engineering/quickstart.md) to install the chaos infrastructure and run an experiment end to end.
{% endhint %}

***

### Use cases <a href="#use-cases" id="use-cases"></a>

* **Constrained bandwidth:** When bandwidth is throttled, does the workload degrade inside the SLA?
* **Replication backlog:** Does database replication catch up after the cap is removed?
* **Backup window:** Does a backup job complete within the maintenance window when bandwidth halves?

***

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* **VMware Tools** running on the guest.
* **`tc` (iproute2)** installed inside the guest. Go to [VMware Linux binary installation](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/vmware/linux/binary-installation.md).
* **Sudo for `tc`:** `VM_USER_NAME` can run `tc qdisc` on `NETWORK_INTERFACE`.
* **vCenter chaos role:** per [VMware permissions](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/vmware/permissions.md).

***

### Supported environments <a href="#supported-environments" id="supported-environments"></a>

| Platform                                                                      | Support status |
| ----------------------------------------------------------------------------- | -------------- |
| Linux VMs hosted on vSphere / vCenter (any distro with VMware Tools and `tc`) | Supported      |
| Windows VMs                                                                   | Not supported  |

***

### Permissions required <a href="#permissions-required" id="permissions-required"></a>

**On vCenter.** Map `GOVC_USERNAME` to the chaos role described in [VMware permissions](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/vmware/permissions.md). The role needs Guest Operations (Program execution, Modifications, Queries).

**On the guest OS.** `VM_USER_NAME` must be able to run `tc qdisc` on `NETWORK_INTERFACE`.

***

### Authentication <a href="#authentication" id="authentication"></a>

| Layer    | Tunables                                                      |
| -------- | ------------------------------------------------------------- |
| vCenter  | `GOVC_URL`, `GOVC_USERNAME`, `GOVC_PASSWORD`, `GOVC_INSECURE` |
| Guest OS | `VM_USER_NAME`, `VM_PASSWORD`                                 |

Store each credential as a text secret in [Harness Secret Manager](/harness-ai/use-harness-platform/secrets/add-use-text-secrets.md) and reference the secret identifier when configuring the experiment.

***

### Fault tunables <a href="#fault-tunables" id="fault-tunables"></a>

**Required parameters**

| Tunable        | Description                                     | Default    |
| -------------- | ----------------------------------------------- | ---------- |
| `VM_NAME`      | Name of the target VM as it appears in vCenter. | (required) |
| `VM_USER_NAME` | OS user account on the target VM.               | (required) |
| `VM_PASSWORD`  | Password for `VM_USER_NAME`.                    | (required) |

**Rate-limit parameters**

| Tunable             | Description                                               | Default |
| ------------------- | --------------------------------------------------------- | ------- |
| `NETWORK_INTERFACE` | Name of the interface to throttle.                        | `eth0`  |
| `NETWORK_BANDWIDTH` | Bandwidth cap with unit (for example `1mbit`, `512kbit`). | `1mbit` |
| `BURST`             | Maximum burst size with unit (for example `2kb`).         | `""`    |
| `LIMIT`             | Queue limit in bytes (for example `20mb`).                | `""`    |
| `PEAK_RATE`         | Peak rate for the bucket (for example `1mb`).             | `""`    |
| `MIN_BURST`         | Minimum chunk size with unit (for example `1540`).        | `""`    |

**Chaos parameters**

| Tunable                | Description                                        | Default    |
| ---------------------- | -------------------------------------------------- | ---------- |
| `TOTAL_CHAOS_DURATION` | Total duration of the fault in seconds.            | `30`       |
| `CHAOS_INTERVAL`       | Delay in seconds between iterations.               | `10`       |
| `SEQUENCE`             | `parallel` or `serial`.                            | `parallel` |
| `RAMP_TIME`            | Wait period in seconds before and after the fault. | `0`        |

**vCenter authentication**

| Tunable         | Description                                           | Default |
| --------------- | ----------------------------------------------------- | ------- |
| `GOVC_URL`      | vCenter server URL.                                   | `""`    |
| `GOVC_USERNAME` | vCenter user mapped to the chaos role.                | `""`    |
| `GOVC_PASSWORD` | Password for `GOVC_USERNAME`.                         | `""`    |
| `GOVC_INSECURE` | Skip SSL certificate verification when set to `true`. | `true`  |

Tunables that apply to every fault are documented in [common tunables for all faults](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/common-tunables-for-all-faults.md).

***

### Fault execution in brief <a href="#fault-execution-in-brief" id="fault-execution-in-brief"></a>

Authenticates to vCenter, opens a Guest Operations session on `VM_NAME` as `VM_USER_NAME`, installs a token-bucket queueing discipline on `NETWORK_INTERFACE` that caps egress bandwidth at `NETWORK_BANDWIDTH` (with `BURST`, `LIMIT`, `PEAK_RATE`, `MIN_BURST` when set) for `TOTAL_CHAOS_DURATION` seconds, then removes the rule.

***

### Expected behavior during fault execution <a href="#expected-behavior-during-fault-execution" id="expected-behavior-during-fault-execution"></a>

* Egress throughput from `VM_NAME` is capped at `NETWORK_BANDWIDTH`.
* Large transfers slow down; replication may fall behind.
* After the duration ends, the cap is removed and throughput returns to baseline.

{% hint style="info" %}
**WHEN THE FAULT ENDS**

The chaos pod removes the `tc qdisc` rule via Guest Operations. Throughput returns to baseline within seconds.
{% endhint %}

#### Signals to watch <a href="#signals-to-watch" id="signals-to-watch"></a>

* **Throughput:** Use a Prometheus probe on `node_network_transmit_bytes_total`.
* **Replication lag:** Use a [command probe](/resilience-testing/chaos-testing/probes/command-probe.md) that reads the replication lag from your database.

***

### Verify the fault execution effect <a href="#verify-the-fault-execution-effect" id="verify-the-fault-execution-effect"></a>

1. **Inspect the qdisc on the guest.**

   ```bash
   sudo tc qdisc show dev eth0
   ```

   Look for the token-bucket filter with the configured rate.
2. **Run an iperf/scp transfer from the VM.**

   Throughput should be capped at `NETWORK_BANDWIDTH` during the window.

***

### Recovery and cleanup <a href="#recovery-and-cleanup" id="recovery-and-cleanup"></a>

* **End of duration:** The chaos pod removes the rule.
* **Abort:** Stopping the experiment also removes the rule.
* **Manual recovery:** `sudo tc qdisc del dev <NETWORK_INTERFACE> root`.

***

### Limitations <a href="#limitations" id="limitations"></a>

* **Egress only:** The cap applies to egress traffic only.
* **Single interface per run:** Repeat the fault for additional interfaces.
* **Unit format:** `NETWORK_BANDWIDTH` must include a `tc`-compatible unit (`kbit`, `mbit`, etc).

***

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>VMware network rate limit has no observable effect in Harness Chaos Engineering</summary>

Verify NETWORK\_INTERFACE matches the active interface inside the guest (ip a). Verify the workload actually transmits more than NETWORK\_BANDWIDTH before the cap. Verify VM\_USER\_NAME can run tc with sudo.

</details>

<details>

<summary>tc rule remains after the experiment</summary>

Run sudo tc qdisc del dev root inside the guest to remove lingering rules.

</details>

***

### Related faults <a href="#related-faults" id="related-faults"></a>

* [VMware network latency](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/vmware/linux/vmware-network-latency.md): Add latency instead of throttling bandwidth.
* [VMware network loss](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/vmware/linux/vmware-network-loss.md): Drop packets instead of throttling.
