set_vdi_machine_maintenance
Enable or disable maintenance mode for VMware Horizon VDI machines to drain them from new sessions. First preview the affected machines and users, then confirm to apply.
Instructions
[WRITE] Enter (enabled=True) or exit (False) maintenance mode for machine(s).
Maintenance drains the machine (no new sessions). A bare call returns blast_radius (machine ids, states, assigned users) and changes nothing; confirm=True applies. A machine whose state cannot be read is refused. Show blast_radius to the user and wait for their decision. Do not set confirm=True on your own because the user asked for this earlier: they have not seen the blast radius yet. Audited.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"machine_ids": "<machine_ids>",
"enabled": "<enabled>"
},
"name": "set_vdi_machine_maintenance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Horizon target from config.yaml; omit to use the default. | |
| confirm | No | False (default) returns the blast radius and changes nothing. True applies it. | |
| enabled | Yes | True enters maintenance; False exits. | |
| machine_ids | Yes | Machine ids (from list_vdi_machines). |