Skip to main content

Trident Command Line Interface Documentation

Usage:

trident [OPTIONS] <COMMAND>

Argument summary:

Commands:
install Initiate an install of Azure Linux
update Start or continue an A/B update from an
existing install
commit Detect whether an install or update
succeeded, and update the boot order
accordingly
rebuild-raid Rebuild software RAID arrays managed by
Trident
get Query the current state of the system
diagnose Generate diagnostic information and create a
support bundle
validate Validate the provided Host Configuration
offline-initialize Initialize for a system that wasn't
installed by Trident
rollback Trigger a manual rollback to previous state
help Print this message or the help of the given
subcommand(s)

Options:
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]
-V, --version
Print version

Subcommands

install

Initiate an install of Azure Linux

Usage:

trident install [OPTIONS] [CONFIG]

Argument summary:

Arguments:
[CONFIG] The new configuration to apply [default:
/etc/trident/config.yaml]

Options:
--allowed-operations [<ALLOWED_OPERATIONS>...]
Comma-separated list of operations that Trident will be
allowed to perform [default: stage,finalize] [possible
values: stage, finalize]
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]
-s, --status <STATUS>
Path to save the resulting Host Status
-e, --error <ERROR>
Path to save an eventual fatal error
--multiboot
Allow Trident to perform a multiboot install

Argument Details

<CONFIG>

The new configuration to apply

Default: /etc/trident/config.yaml

--allowed_operations <ALLOWED_OPERATIONS>

Comma-separated list of operations that Trident will be allowed to perform

Possible values:

  • stage
  • finalize

Default: stage,finalize

--status <STATUS>

Path to save the resulting Host Status

--error <ERROR>

Path to save an eventual fatal error

--multiboot <MULTIBOOT>

Allow Trident to perform a multiboot install

--verbosity <VERBOSITY>

Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]

Default: DEBUG

update

Start or continue an A/B update from an existing install

Usage:

trident update [OPTIONS] [CONFIG]

Argument summary:

Arguments:
[CONFIG] The new configuration to apply [default:
/etc/trident/config.yaml]

Options:
--allowed-operations [<ALLOWED_OPERATIONS>...]
Comma-separated list of operations that Trident will be
allowed to perform [default: stage,finalize] [possible
values: stage, finalize]
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]
-s, --status <STATUS>
Path to save the resulting Host Status
-e, --error <ERROR>
Path to save an eventual fatal error

Argument Details

<CONFIG>

The new configuration to apply

Default: /etc/trident/config.yaml

--allowed_operations <ALLOWED_OPERATIONS>

Comma-separated list of operations that Trident will be allowed to perform

Possible values:

  • stage
  • finalize

Default: stage,finalize

--status <STATUS>

Path to save the resulting Host Status

--error <ERROR>

Path to save an eventual fatal error

--verbosity <VERBOSITY>

Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]

Default: DEBUG

commit

Detect whether an install or update succeeded, and update the boot order accordingly

Usage:

trident commit [OPTIONS]

Argument summary:

Options:
-s, --status <STATUS>
Path to save the resulting Host Status
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]
-e, --error <ERROR>
Path to save an eventual fatal error

Argument Details

--status <STATUS>

Path to save the resulting Host Status

--error <ERROR>

Path to save an eventual fatal error

--verbosity <VERBOSITY>

Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]

Default: DEBUG

rebuild-raid

Rebuild software RAID arrays managed by Trident

Usage:

trident rebuild-raid [OPTIONS]

Argument summary:

Options:
-c, --config <CONFIG>
The new configuration to work from
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]
-s, --status <STATUS>
Path to save the resulting HostStatus
-e, --error <ERROR>
Path to save an eventual fatal error

Argument Details

--config <CONFIG>

The new configuration to work from

--status <STATUS>

Path to save the resulting HostStatus

--error <ERROR>

Path to save an eventual fatal error

--verbosity <VERBOSITY>

Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]

Default: DEBUG

get

Query the current state of the system

Usage:

trident get [OPTIONS] [KIND]

Argument summary:

Arguments:
[KIND] What data to retrieve [default: status] [possible values:
configuration, status, last-error, rollback-chain,
rollback-target]

Options:
-o, --outfile <OUTFILE>
Path to save the resulting output
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]

Argument Details

<KIND>

What data to retrieve

Possible values:

  • configuration
  • status
  • last-error
  • rollback-chain
  • rollback-target

Default: status

--outfile <OUTFILE>

Path to save the resulting output

--verbosity <VERBOSITY>

Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]

Default: DEBUG

diagnose

Generate diagnostic information and create a support bundle

Usage:

trident diagnose [OPTIONS] --output <OUTPUT>

Argument summary:

Options:
-o, --output <OUTPUT>
Path where the support bundle will be saved
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]
--journal
Whether to include full system journal and dmesg output
--selinux
Whether to include SELinux audit log

Argument Details

--output <OUTPUT> (REQUIRED)

Path where the support bundle will be saved

--journal <JOURNAL>

Whether to include full system journal and dmesg output

--selinux <SELINUX>

Whether to include SELinux audit log

--verbosity <VERBOSITY>

Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]

Default: DEBUG

validate

Validate the provided Host Configuration

Usage:

trident validate [OPTIONS] [CONFIG]

Argument summary:

Arguments:
[CONFIG] Path to a Host Configuration file [default:
/etc/trident/config.yaml]

Options:
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]

Argument Details

<CONFIG>

Path to a Host Configuration file

Default: /etc/trident/config.yaml

--verbosity <VERBOSITY>

Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]

Default: DEBUG

offline-initialize

Initialize for a system that wasn't installed by Trident

Usage:

trident offline-initialize [OPTIONS] [HS_PATH]

Argument summary:

Arguments:
[HS_PATH] Path to a Host Status file (deprecated)

Options:
--lazy-partitions [<LAZY_PARTITIONS>...]
Provide lazy partition information overrides for `-b`
partitions
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]
--disk <DISK>
Provide disk path [default: /dev/sda]
--history-path <HISTORY_PATH>
Provide path for history.json

Argument Details

<HS_PATH>

Path to a Host Status file (deprecated)

If not provided, Trident will infer one based on the state of the system and history information left by Image Customizer.

Conflicts with:

  • --lazy_partitions <LAZY_PARTITIONS>

--lazy_partitions <LAZY_PARTITIONS>

Provide lazy partition information overrides for -b partitions

This is a comma-separated list of <b-partition-name>:<b-partition-partuuid> pairs.

Conflicts with:

  • <HS_PATH>

--disk <DISK>

Provide disk path

Default: /dev/sda

Conflicts with:

  • <HS_PATH>

--history_path <HISTORY_PATH>

Provide path for history.json

Conflicts with:

  • <HS_PATH>

--verbosity <VERBOSITY>

Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]

Default: DEBUG

rollback

Trigger a manual rollback to previous state

Usage:

trident rollback [OPTIONS]

Argument summary:

Options:
--check
Check operation that would be performed
-v, --verbosity <VERBOSITY>
Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
[default: DEBUG]
--runtime
Invoke rollback only if next available rollback is runtime
rollback. If allowed-operations is specified, this argument
is only applicable for stage operation and will be ignored
for finalize
--ab
Invoke next available A/B rollback. If allowed-operations is
specified, this argument is only applicable for stage
operation and will be ignored for finalize
--allowed-operations [<ALLOWED_OPERATIONS>...]
Comma-separated list of operations that Trident will be
allowed to perform [default: stage,finalize] [possible
values: stage, finalize]
-s, --status <STATUS>
Path to save the resulting Host Status
-e, --error <ERROR>
Path to save an eventual fatal error

Argument Details

--check <CHECK>

Check operation that would be performed

--runtime <RUNTIME>

Invoke rollback only if next available rollback is runtime rollback. If allowed-operations is specified, this argument is only applicable for stage operation and will be ignored for finalize

Conflicts with:

  • --ab <AB>

--ab <AB>

Invoke next available A/B rollback. If allowed-operations is specified, this argument is only applicable for stage operation and will be ignored for finalize

Conflicts with:

  • --runtime <RUNTIME>

--allowed_operations <ALLOWED_OPERATIONS>

Comma-separated list of operations that Trident will be allowed to perform

Possible values:

  • stage
  • finalize

Default: stage,finalize

--status <STATUS>

Path to save the resulting Host Status

--error <ERROR>

Path to save an eventual fatal error

--verbosity <VERBOSITY>

Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE]

Default: DEBUG

help

Print this message or the help of the given subcommand(s)

Usage:

trident help [COMMAND]

Argument summary:

Commands:
install Initiate an install of Azure Linux
update Start or continue an A/B update from an
existing install
commit Detect whether an install or update
succeeded, and update the boot order
accordingly
rebuild-raid Rebuild software RAID arrays managed by
Trident
get Query the current state of the system
diagnose Generate diagnostic information and create a
support bundle
validate Validate the provided Host Configuration
offline-initialize Initialize for a system that wasn't
installed by Trident
rollback Trigger a manual rollback to previous state
help Print this message or the help of the given
subcommand(s)