---
title: Health
description: "The daemon's liveness answer. bootstrapped is the useful field."
---

```python
@final
class Health
```

The daemon's liveness answer. `bootstrapped` is the useful field.

## Constructor

`Health` declares no `__new__` or `__init__`, so it is not constructed directly: an instance comes back from another call in this package.

## Properties

### `available_bytes`

```python
available_bytes: int | None
```

Bytes available to an unprivileged writer, or `None` when free space could not be
measured.

`None` is deliberately distinct from zero: unmeasurable is not full, and a monitor
that conflated them would page on a missing `statvfs`.

### `bootstrapped`

```python
bootstrapped: bool
```

Whether the run hook has landed and the control API is open.

### `busy`

```python
busy: bool
```

Whether any exec is still running.

For an orchestrator *outside* the VM deciding whether to keep it alive. The
platform measures idleness by inbound traffic through the endpoint proxy, which
terminates outside the guest, so an in-guest keepalive cannot reset the idle
timer — polling this from outside is both the traffic and the decision. An exec
that exited and is awaiting an ack is not busy.

### `execs`

```python
execs: int
```

How many execs are registered, in any phase. `busy` false with a non-zero count
is a VM holding unacked output somebody still has to collect.

### `hooks`

```python
hooks: list[HookObservation]
```

Every lifecycle-hook invocation the daemon observed, oldest first, each with its
workload handler's outcome when the image carries one.

The hook routes are reachable over loopback from inside the guest, so a workload
can add entries; the earliest are the platform's.

### `hooks_dropped`

```python
hooks_dropped: int
```

How many hook invocations the daemon's log cap dropped.

### `identity_degraded`

```python
identity_degraded: bool
```

Whether any startup identity repair step failed — a duplicate machine-id or
boot\_id still in place from the shared image.

### `identity_repaired`

```python
identity_repaired: bool
```

False when identity repair was switched off by config. Separate from `degraded` so
a monitor can tell "opted out" from "nothing to do".

### `identity_steps`

```python
identity_steps: list[IdentityStep]
```

Each identity-repair step and its outcome. Empty until the run hook repairs this
VM's identity.

### `image_env_keys`

```python
image_env_keys: int | None
```

How many variables the daemon's image-environment snapshot holds, or `None` when it
holds none. `None` is also what a daemon built before `inherit_image_env` reports,
and such a daemon ignores that flag; the values are never reported.

### `reserve_bytes`

```python
reserve_bytes: int | None
```

Bytes that must stay free before a write is refused. Zero means the guard is off.

### `under_pressure`

```python
under_pressure: bool | None
```

Whether a write would be refused right now. Precomputed by the daemon so every
consumer applies the same comparison the write path does.

### `version`

```python
version: str
```

The daemon's own version, distinct from the protocol version.

## Special methods

### `__repr__`

```python
def __repr__() -> str
```

## Provenance

This page is generated from `bindings/microvms-py/microvms.pyi` by Griffe 2.3.0, run from `site/scripts/gen-reference.mjs` on every `pnpm run sync`, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding's Rust source, then regenerate the declarations with `mise run stubs`. `mise run stubs:check` fails when the committed file no longer matches the source.