Appendix: QNX Container Manager Client Utility (qcmctl)

Commands

The command hierarchy of the qcmctl organizes into three sub-commands: image, pod, and container.

The structure of the commands is designed to closely resemble the APIs of the qcmgr resource manager interface.

# use qcmctl
qcmctl - QNX Container Manager Client Tool

Usage:
   qcmctl COMMAND SUBCOMMAND

Commands:
   help
   image
   pod
   container

Image Subcommands:
   help
   pull
   import
   list
   status
   remove

Pod Subcommands:
   help
   create
   list
   status
   remove

Container Subcommands:
   help
   create
   list
   start
   status
   stop
   remove
   exec
   logs

Run 'qcmctl COMMAND SUBCOMMAND' with '-h' or '--help' to view command specific usage

Refer to each sub-command's section below for details on how to invoke the command and the supported arguments.

Image Subcommands

Subcommands for qcmctl image

Pull
The image pull command allows the user to download an image from a image registry while providing the necessary credentials for access.
Note:
The image name assumes a latest tag if the tag isn'tspecified.
NAME:
   qcmctl image pull - Download an image from a container registry

USAGE:
   qcmctl image pull [options] <image-uri[:tag|@digest]>

OPTIONS:
   -t, --token <string>      - Base64 encoded authorization bearer token for authentication with the registry.
                               Mutually exclusive with username/password
   -u, --user <string>       - Username to use for basic authentication with the registry
   -p, --passwd <string>     - Password to use for basic authentication with the registry
   -s, --user-file <path>    - File containing the username for basic authentication with the registry
   -a, --passwd-file <path>  - File containing the password for basic authentication with the registry
   -O, --outformat <string>  - Set to 'table' for table format with column headers (default).
                               Set to 'json' for JSON formatted output
                               Set to 'json-auto' for a more readable JSON output with new lines and spaces
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# PASS=$(cat <passwd-file>)
# qcmctl image pull --user AWS --passwd $PASS 974227173803.dkr.ecr.us-east-1.amazonaws.com/hello-container:v0
sha256:cab3e5f365175ce5057ae80fcffe0673941af61f93099e9f519c79d4b96c4572

# qcmctl image pull -s /tmp/aws-user.out -a /tmp/aws-pass.out 974227173803.dkr.ecr.us-east-1.amazonaws.com/hello-container:v0
sha256:cab3e5f365175ce5057ae80fcffe0673941af61f93099e9f519c79d4b96c4572
Import
The image import command allows the user to import an already downloaded image from a .tar file.
NAME:
   qcmctl image import - Import an image from an OCI tarball

USAGE:
   qcmctl image import <image-path>

OPTIONS:
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
   -n, --name <reg/repo>     - Import the image with given name
                               This is a mandatory argument
Example invocation:
# qcmctl image import hello-container.tar
sha256:3888e9ffcb9184df72f142afb82f7a15ae19de03673a52409e8e5cbd7d49a0fe
List
The image list command allows the user to display all available images in the local store.
NAME:
   qcmctl image list - Display all container images in the local store

USAGE:
   qcmctl image list [options]

OPTIONS:
   -O, --outformat <string>  - Set to 'table' for table format with column headers (default).
                               Set to 'json' for JSON formatted output
                               Set to 'json-auto' for a more readable JSON output with new lines and spaces
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# qcmctl image list
REPOSITORY                                                                   TAG   IMAGE ID       CREATED               SIZE
974227173803.dkr.ecr.us-east-1.amazonaws.com/hello-container-x86_64-qnx800   v0    cab3e5f36517   2025-03-11T15:56:55   1.76MB
Note:
The image ID is shown in its truncated form (12-characters). You can use either the full image ID, truncated image ID or image name in all commands that require an identifier.
Status
The image status command allows the user to display the status of an image from the local store.
NAME:
   qcmctl image status - Display the status of an image in the local store

USAGE:
   qcmctl image status [options] <image-id>

OPTIONS:
   -O, --outformat <string>  - Set to 'table' for table format with column headers (default).
                               Set to 'json' for JSON formatted output
                               Set to 'json-auto' for a more readable JSON output with new lines and spaces
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# qcmctl image status sha256:e641cbe1e671873b11299dda7d33f9db8c4207aa2238189bbe4291a133a92d97
FIELD        VALUE
Image ID     e641cbe1e671
Tags         371024669235.dkr.ecr.us-east-1.amazonaws.com/hello-container-x86_64-qnx800:v10
Digests      371024669235.dkr.ecr.us-east-1.amazonaws.com/hello-container-x86_64-qnx800@sha256:baf479bc6f28d8b05e5d2ea760f4cc78eacc7591586ade4ccd686d7b18810ee0
Repository   371024669235.dkr.ecr.us-east-1.amazonaws.com/hello-container-x86_64-qnx800
Size         1.76MB
Remove
The image remove command allows the user to remove an image from the local store.
NAME:
   qcmctl image remove - Remove an image from the local store

USAGE:
   qcmctl image remove <image-id>

OPTIONS:
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (default: /dev/containers/qcmgr).
Example invocation:
# qcmctl image remove sha256:350b164e7ae1dcddeffadd65c76226c9b6dc5553f5179153fb0e36b78f2a5e06

Pod Subcommands

Subcommands for qcmctl pod

Create
The pod create command allows the user to create a pod sandbox environment for running containers. A pod sandbox configuration file is required; for the format, refer to Appendix: Pod Sandbox Configuration.
NAME
   qcmctl pod create - Create a pod sandbox

USAGE:
   qcmctl pod create [options]

OPTIONS:
   -I, --injson <file>       - File path containing the pod sandbox configuration in JSON.
                               This is a mandatory argument
   -O, --outformat <string>  - Set to 'table' for table format with column headers (default).
                               Set to 'json' for JSON formatted output
                               Set to 'json-auto' for a more readable JSON output with new lines and spaces
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
   -n, --name <string>       - Create pod with given name (overrides configuration)
Example invocation:
# qcmctl pod create -I /tmp/podsandbox-config.json
1c9351f553bdb7a51b39914ea24ad77b6ecb84283ccd6fd9561a15463c44c391
List
The pod list command allows the user to display all pods on the system.
NAME:
   qcmctl pod list - Display all pod sandboxes

USAGE:
   qcmctl pod list [options]

OPTIONS:
   -O, --outformat <string>  - Set to 'table' for table format with column headers (default).
                               Set to 'json' for JSON formatted output
                               Set to 'json-auto' for a more readable JSON output with new lines and spaces
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# qcmctl pod list
NAME        POD ID       STATE   CREATED
podsandbox1 1c9351f553bd Ready   2025-04-26 11:37:37
Note:
The pod ID is shown in the example is in truncated form (12-characters). You can use either the full pod ID, truncated pod ID or pod name (full or partial) in all commands that require an identifier.
Status
The pod status command allows the user to view the details of an existing pod.
NAME:
   qcmctl pod status - Get the status of a pod sandbox

USAGE:
   qcmctl pod status [options] <pod-id>

OPTIONS:
   -O, --outformat <string>  - Set to 'table' for table format with column headers (default).
                               Set to 'json' for JSON formatted output
                               Set to 'json-auto' for a more readable JSON output with new lines and spaces
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# qcmctl pod status podsandbox1
FIELD        VALUE
Name         podsandbox1
Pod ID       1c9351f553bdb7a51b39914ea24ad77b6ecb84283ccd6fd9561a15463c44c391
State        Ready
IP Address   172.17.0.4
Hostname
Created      2025-04-26 11:37:37
Containers   0
Remove
The pod remove command allows the user to delete a pod sandbox.
Note:
All containers under this pod must be removed before removing the pod.
NAME:
   qcmctl pod remove - Delete a pod sandbox and cleanup any containers in the sandbox

USAGE:
   qcmctl pod remove <pod-name-or-id>

OPTIONS:
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# qcmctl pod remove podsandbox1

Container Subcommands

Subcommands for qcmctl container

Create
The container create command allows the user to create a container in a pod sandbox. A container configuration file is required; for the format details, refer to Appendix: Container Configuration. If the pod name or identifier is provided, then the pod_sandbox_id field in the container configuration is ignored.
NAME:
   qcmctl container create - Create a container in a pod sandbox

USAGE:
   qcmctl container create [options]

OPTIONS:
   -I, --injson <file>       - File path containing the container configuration in JSON.
                               This is a mandatory argument
   -O, --outformat <string>  - Set to 'table' for table format with column headers (default).
                               Set to 'json' for JSON formatted output
                               Set to 'json-auto' for a more readable JSON output with new lines and spaces
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
   -n, --name <string>       - Create container with given name (overrides configuration)
   -p, --pod <name-or-id>    - Create container using given pod (overrides configuration)
Example invocation:
# qcmctl container create -I /tmp/container-config.json -p pod1
95c4d59554183251af5eb21242c5e38c6493fff3013387a9f4e5f4c6fe9fd8f1
List
The container list command allows the user to display all containers on the system.
NAME:
   qcmctl container list - Display all containers

USAGE:
   qcmctl container list [options]

OPTIONS:
   -O, --outformat <string>  - Set to 'table' for table format with column headers (default).
                               Set to 'json' for JSON formatted output
                               Set to 'json-auto' for a more readable JSON output with new lines and spaces
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# qcmctl container list
NAME         CONTAINER ID   STATE     CREATED
container1   95c4d5955418   Created   2025-05-28 09:13:31
Note:
The container ID is shown in the example is in truncated form (12-characters). You can use either the full container ID, truncated container ID or container name (full or partial) in all commands that require an identifier.
Start
The container start command allows the user to start a created container.
NAME:
   qcmctl container start - Start a created container

USAGE:
   qcmctl container start <container-name-or-id>

OPTIONS:
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# qcmctl container start container1
CAUTION:
The maximum number of containers that simultaneously run depends on the system's available resources and the configured resource limits of the container (i.e., the rlimits of the container configuration file). If a container fails to start because you've reached a resource limit, increase the corresponding limit for the qrunc process. For example, to set RLIMIT_SIGEVENT_NP to 512 for the qrunc process, use -L 12:512:512 qrunc ... where 12 is the resource identifier for RLIMIT_SIGEVENT_NP, and the two values specify the soft and hard limits. For details, refer to the rlimits option in the Appendix: Container Configuration
Status
The container status command allows the user to view the details of an existing container.
NAME:
   qcmctl container status - Get the status of a container

USAGE:
   qcmctl container status [options] <container-id>

OPTIONS:
   -O, --outformat <string>  - Set to 'table' for table format with column headers (default).
                            Set to 'json' for JSON formatted output
                            Set to 'json-auto' for a more readable JSON output with new lines and spaces
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# qcmctl container status container1
FIELD       VALUE
Id          95c4d59554183251af5eb21242c5e38c6493fff3013387a9f4e5f4c6fe9fd8f1
Name        container1
State       Created
Created     2025-05-28 09:13:31
Stop Signal SIGTERM
Stop
The container stop command allows the user to stop a running container.
NAME:
   qcmctl container stop - Stop a running container

USAGE:
   qcmctl container stop [options] <container-name-or-id>

OPTIONS:
   -T, --timeout <value>     - Timeout in seconds to wait for the container to stop before forcibly
                               terminating it (default: 5).
                               A container defined stop signal or SIGTERM will initially be sent to the container,
                               followed by a SIGKILL if the container process does not exit within the specified
                               timeout.
                               Setting a timeout of 0 will send a SIGKILL immediately to the container.
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (default: /dev/containers/qcmgr).
Example invocation:
# qcmctl container stop container1 -T 10
Remove
The container remove command allows the user to delete a container.
Note:
The specified container must not be running.
NAME:
   qcmctl container remove - Delete a pod sandbox and cleanup any containers in the sandbox

USAGE:
   qcmctl container remove <container-name-or-id>

OPTIONS:
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Example invocation:
# qcmctl container remove container1
Exec
The container exec command allows the user to execute the specified command in a running container.
CAUTION:
Ensure that an appropriate timeout is set if the command to be executed may block. If the command fails to return, then it has to be manually slayed.
NAME:
   qcmctl container exec - Execute a command in a running container

USAGE:
   qcmctl container exec [options] <container-name-or-id> -- <command> [args]

OPTIONS:
   -T,  --timeout <value>     - Timeout in seconds to wait for output in synchronous mode (default: 0)
                                Setting a timeout of 0 effectively waits forever
   -i, --stdin                - Stream STDIN in interactive mode (default: false)

   -t, --tty                  - Allocate a pseudo-TTY in interactive mode (default: false)

   -U, --user <uid[:gid]>     - Run the command as the specified uid/gid inside the container

   -M, --mountpath <path>     - Mount path of the qcmgr resource manager (Default: /dev/containers/qcmgr).
Note:
In synchronous mode, the command output is only echoed to the terminal after the command exits. The maximum amount of output that can be buffered is 8KB. Once this limit is reached, the command is terminated.
Example invocation for a simple command:
# qcmctl container exec container1 -- /system/bin/ls /
Outputs:
etc
proc
system
usr
Example invocation for more complicated arguments:
# qcmctl container exec container1 -- /proc/boot/sh -c 'echo $OS_NAME'
   QNX
Note:
Ensure that an appropriate timeout is set if the command to be executed may block. If the command fails to return, then it has to be manually slayed.
Logs
The container logs command allows the user to output the container log file to the terminal. If the -f options is used, then qcmctl continues to output the logs until interrupted using CTRL-C.
NAME:
   qcmctl container logs -  Retrieve the logs of a container

USAGE:
   qcmctl container logs [options] <container-name-or-id>

OPTIONS:
   -f, --follow              - Optionally follow the log output
   -M, --mountpath <path>    - Mount path of the qcmgr resource manager (default: /dev/containers/qcmgr).
Example invocation for a simple command:
# qcmctl container logs container1
Hello from a QNX container!
Hello from a QNX container!
Hello from a QNX container!
Note:
If the command being executed uses buffered output and does not flush the output explicitly, then the output isn't be seen until the default buffer size bytes (1024) has outputted or the process exits.
Page updated: