vm_guest_download
Download a file from a VM to a local path, with optional overwrite control. Requires VMware Tools running in the guest OS.
Instructions
[WRITE] Download a file from a VM and write it to a local path.
Reads from the guest, writes the local filesystem — the write is why this is not a read tool. Returns a status string. Requires VMware Tools running in the guest OS. Use vm_guest_upload for the reverse direction; to capture command output use vm_guest_exec_output instead — it redirects and downloads for you.
Refuses a destination that already exists unless overwrite=True, and never writes through a symlink or over a directory. Pick a path that does not exist yet rather than passing overwrite=True by default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Optional vCenter/ESXi target name from config. | |
| vm_name | Yes | Target VM name. | |
| password | No | Guest OS password. | |
| username | Yes | Guest OS account to run as. Required — there is no default, so a call can never act as root without choosing root. | |
| overwrite | No | True replaces an existing file at local_path (default False). | |
| guest_path | Yes | File path inside the guest to download. | |
| local_path | Yes | Local destination path, including the file name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |