attach_iso_to_vm
Mount a datastore ISO into a VM's virtual CD-ROM drive, replacing any mounted ISO. Works on powered-on or powered-off VMs.
Instructions
[WRITE] Mount a datastore ISO into a VM's virtual CD-ROM drive.
Reconfigures the existing CD-ROM (replacing any mounted ISO) or adds one on the VM's IDE controller; fails with a clear message if the VM has no IDE controller. Works whether the VM is powered on or off. Find ISO paths first with browse_datastore using pattern "*.iso". Returns a status string confirming attachment, or a VM-not-found / no-IDE-controller error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | vCenter/ESXi target from config.yaml; omit for the default target. | |
| vm_name | Yes | Exact VM name as shown in vCenter inventory. | |
| iso_ds_path | Yes | Datastore path in bracket format, e.g. "[datastore1] iso/ubuntu-22.04.iso". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |