attach_iso_to_vm
Mount an ISO file from a datastore to a VM's CD-ROM drive. Replaces existing ISO or adds new CD-ROM on IDE controller for powered on or off VMs.
Instructions
[WRITE] Mount a datastore ISO into a VM's virtual CD-ROM drive.
Reconfigures the existing CD-ROM (replacing any currently mounted ISO) or adds a new CD-ROM on the VM's IDE controller if none exists; fails with a clear message if the VM has no IDE controller. Works whether the VM is powered on or off — the device is set connected and start-connected. Find ISO files first with browse_datastore using pattern "*.iso". Audited to ~/.vmware/audit.db.
Args: vm_name: Exact VM name as shown in vCenter inventory. iso_ds_path: Full datastore path in bracket format, e.g. "[datastore1] iso/ubuntu-22.04.iso" (datastore name in brackets, then the path relative to the datastore root). target: vCenter/ESXi target name from config.yaml; omit to use the default target.
Returns: Status string confirming attachment, or a VM-not-found / no-IDE-controller error.
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": {
"vm_name": "<vm_name>",
"iso_ds_path": "<iso_ds_path>"
},
"name": "attach_iso_to_vm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| vm_name | Yes | ||
| iso_ds_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |