### Start a container Source: https://man.vpsadminos.org/man8/osctl.8.html Starts the specified container. ```bash osctl ct start myct01 ``` -------------------------------- ### Example Console Commands Source: https://man.vpsadminos.org/man8/osctl.8.html Sample JSON commands for sending keys and resizing the terminal. ```json {"keys": "Cg=="}\n {"keys": "Cg==", "rows": 25, "cols": 80}\n {"rows": 50, "cols": 120}\n ``` -------------------------------- ### Install zpool into osctld Source: https://man.vpsadminos.org/man8/osctl.8.html Registers a zpool with the osctld daemon. ```bash osctl pool install tank ``` -------------------------------- ### Filter Expression Examples Source: https://man.vpsadminos.org/man1/test-runner.1.html Demonstrates various ways to filter test scripts using tags, labels, and logical operators. ```bash test-runner ls --filter 'tag=ci && tag!=manual' test-runner test --filter 'tag=ci && (tag=vps || tag=storage)' test-runner test -t ci --filter 'runtime!=long && (tag=vps || tag=storage)' ./test-runner.sh test -t ci --filter 'tag=vps || tag=storage' ./test-runner.sh ls --filter 'tag=ci && runtime!=long' ``` -------------------------------- ### Create a new container Source: https://man.vpsadminos.org/man8/osctl.8.html Initializes a new container with a specified distribution. ```bash osctl ct new --distribution alpine myct01 ``` -------------------------------- ### Configure SSH for Migration Source: https://man.vpsadminos.org/man8/vpsadminos-convert.8.html Generate and authorize SSH keys to allow the OpenVZ node to communicate with the vpsAdminOS node. ```bash openvz-node $ ssh-keygen openvz-node $ cat ~/.ssh/id_rsa.pub ``` ```bash vpsadminos-node $ osctl migration authorized-keys add ``` -------------------------------- ### Export and Import simfs/ploop Containers Source: https://man.vpsadminos.org/man8/vpsadminos-convert.8.html Commands to export a container from an OpenVZ node and import it into a vpsAdminOS node. ```bash openvz-node $ vpsadminos-convert vz6 export 101 ct-101.tar ``` ```bash vpsadminos-node $ osctl ct import ct-101.tar ``` -------------------------------- ### Migrate simfs/ploop Container Source: https://man.vpsadminos.org/man8/vpsadminos-convert.8.html Initiate migration of a simfs or ploop container using rsync. ```bash openvz-node $ vpsadminos-convert vz6 migrate now 101 vpsadminos-node ``` -------------------------------- ### Define container devices via JSON Source: https://man.vpsadminos.org/man8/osctl.8.html The format required for replacing container device configurations via standard input. ```json { "devices": [ { "dev_name": , "type": block|char, "major": , "minor": , "mode": , "inherit": true|false } ... ] } ``` -------------------------------- ### Migrate ZFS Container Source: https://man.vpsadminos.org/man8/vpsadminos-convert.8.html Initiate migration of a container stored on ZFS using ZFS streams. ```bash openvz-node $ vpsadminos-convert vz6 migrate now \ --zfs \ --zfs-dataset vz/private/101 \ --zfs-subdir private \ 101 vpsadminos-node ``` -------------------------------- ### NFS Server Directory Structure Source: https://man.vpsadminos.org/man8/osctl-exportfs.8.html Displays the directory layout for configured NFS servers under /run/osctl/exportfs. ```text /run/osctl/exportfs ├── rootfs/ ├── runsvdir/ └── servers/ ``` -------------------------------- ### Server directory structure Source: https://man.vpsadminos.org/man8/osctl-exportfs.8.html The layout of a server directory managed by osctl-exportfs. ```text ├── runsv/ ├── shared/ ├── state/ ├── config.yml ├── exports ├── lock └── [pid] ``` -------------------------------- ### Export Container from ZFS Source: https://man.vpsadminos.org/man8/vpsadminos-convert.8.html Export a container stored on a ZFS dataset using ZFS streams. ```bash openvz-node $ vpsadminos-convert vz6 export \ --zfs \ --zfs-dataset vz/private/101 \ --zfs-subdir private \ 101 ct-101.tar ``` -------------------------------- ### osctl ct console Source: https://man.vpsadminos.org/man8/osctl.8.html Sends JSON commands to the container console to write data or resize the terminal window. ```APIDOC ## osctl ct console ### Description Accepts JSON commands on standard input to interact with a container console. Commands are separated by line breaks. ### Request Body - **keys** (string) - Optional - Base64 encoded data to be written to the console. - **rows** (number) - Optional - Number of terminal rows. - **cols** (number) - Optional - Number of terminal columns. ### Request Example {"keys": "Cg==", "rows": 25, "cols": 80} ``` -------------------------------- ### Debugging Commands Source: https://man.vpsadminos.org/man8/osctl.8.html Internal debugging commands for inspecting threads and locks in osctld. ```text debug threads ls ``` ```text debug locks ls [-v] ``` ```text debug locks show id ``` -------------------------------- ### JSON Console Command Structure Source: https://man.vpsadminos.org/man8/osctl.8.html The structure for JSON commands accepted by osctl ct console via standard input. ```json { "keys": base64 encoded data, "rows": number of terminal rows, "cols": number of terminal columns } ``` -------------------------------- ### Add bridged veth interface Source: https://man.vpsadminos.org/man8/osctl.8.html Configures a new bridged network interface for a container. ```bash osctl ct netif new bridge --link lxcbr0 myct01 eth0 ``` -------------------------------- ### Broadcast custom events Source: https://man.vpsadminos.org/man8/osctl.8.html Broadcasts custom events through osctld, requiring JSON-encoded input on a single line. ```json { "events": [ { "type": "mytype"; "opts": { "myoption": 123 } } ] } ``` -------------------------------- ### Replace cgroup parameters via JSON Source: https://man.vpsadminos.org/man8/osctl.8.html Replaces all configured cgroup parameters for a container using a JSON input format. ```json { "parameters": [ { "version": , "subsystem": , "parameter": , "value": [ values ] } ... ] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.