Cisco IOS-XE TransferImage
Certified
Enterprise Edition
Copy an image to the bootflash of a Cisco IOS-XE device
Cisco IOS-XE TransferImage
Copy an image to the bootflash of a Cisco IOS-XE device
The device pulls the image itself (copy <url> bootflash: ), so it must reach the image host over HTTP, HTTPS
or SCP. TFTP is not supported: it is far too slow for a 1 GB image. The copy is followed by verify /sha512
(or /md5) against expectedHash.
The task is idempotent: when the file is already on bootflash with the expected hash, nothing is copied.
Credentials in the URL are masked in logs; a password containing @ is refused because the device URL
parser cannot handle it.
type: io.kestra.plugin.ee.cisco.iosxe.TransferImageExamples
Copy and verify a 17.12 image
id: cisco_iosxe_transfer_image
namespace: company.network
tasks:
- id: transfer
type: io.kestra.plugin.ee.cisco.iosxe.TransferImage
host: core1.example.net
username: automation
password: "{{ secret('CISCO_PASSWORD') }}"
enableSecret: "{{ secret('CISCO_ENABLE_SECRET') }}"
hostKeyFingerprint: "{{ secret('CORE1_HOST_KEY_FINGERPRINT') }}"
imageUrl: https://images.example.net/cisco/cat9k_iosxe.17.12.03.SPA.bin
expectedHash: "{{ secret('CAT9K_17_12_03_SHA512') }}"
Installation
This Enterprise plugin requires an Enterprise image and access to the plugin registry. Install it with the following command:
kestractl plugins get io.kestra.plugin.ee:plugin-ee-cisco --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
Properties
expectedHash *string
Expected hash of the image
Hexadecimal SHA-512 digest, or MD5 with verifyAlgorithm: MD5.
host *string
Device host name or IP address
imageUrl *string
Image URL
http://, https:// or scp://.
For SCP, put the credentials in the URL: scp://user: password@host/path.
username *string
Username
The account must have privilege 15, or an enableSecret to reach it.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150commandTimeout string
PT2MDefault timeout of a single command
1 second to 1 hour, default 2 minutes. Tasks that run long operations (copy, install) have their own timeout properties.
connectTimeout string
PT30STCP and SSH connect timeout
1 second to 5 minutes, default 30 seconds.
copyTimeout string
PT1HTimeout of the transfer
The documentation gives no transfer limit. 1 second to 24 hours, default 1 hour.
disableHostKeyVerification booleanstring
falseDisable SSH host key verification
Explicit opt-out: the device identity is no longer verified, which exposes the credentials to a man-in-the-middle. Use for labs only.
enableSecret string
Enable secret
Used to enter privileged EXEC mode when the login lands in user EXEC mode (host> prompt).
hostKeyFingerprint string
SHA256 fingerprint of the device SSH host key
Format SHA256: abc..., as printed by ssh-keygen -lf. Host key verification is on by default, so this
property is required unless disableHostKeyVerification is true. Cisco IOS-XE offers RSA host keys.
image string
Destination file name on bootflash
Defaults to the last segment of the URL.
installTimeout string
PT30MTimeout of the install, copy or verify command itself
1 second to 24 hours, default 30 minutes.
password string
Password
Required unless privateKey is set.
port integerstring
22SSH port
1 to 65535, default 22.
privateKey string
SSH private key
PEM content of the private key.
Used instead of password when set.
privateKeyPassphrase string
Passphrase of the private key
verifyAlgorithm string
SHA512SHA512MD5Hash algorithm
SHA512 (default, supported since IOS-XE 16.5.1) or MD5.
Outputs
copySkipped boolean
Copy skipped
True when the file was already on bootflash with the expected hash, so nothing was copied.
imageFile string
Image file
File name of the image on bootflash.
sizeBytes integer
0Size of the file on bootflash in bytes