lxc-wait(1)

πŸ’– lxc-wait(1) β€” wait for a specific container state πŸ’–

🌸 NAME 🌸

lxc-wait β€” wait for a specific container state. πŸŽ€

✨ SYNOPSIS ✨

lxc-wait {-n name} {-s states}

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so lxc-wait literally waits for a specific container state before it exits β€” and bestie, that is highkey useful for scripting. It’s giving β€œhold the group chat until the vibe check passes” energy, no cap. πŸ’…βœ¨

πŸŽ€ OPTIONS πŸŽ€

  • -s, --state states β€” specify the container state(s) to wait for. The container states can be ORed to specify several states. 🌈
  • -t, --timeout timeout β€” wait timeout seconds for the desired state to be reached. ⏳

πŸ’… COMMON OPTIONS πŸ’…

These options are common to most of lxc commands β€” iykyk. πŸ’–

  • -?, -h, --help β€” print a longer usage message than normal. πŸ™‹
  • --usage β€” give the usage message. πŸ“œ
  • -q, --quiet β€” mute on. 🫒
  • -P, --lxcpath=PATH β€” use an alternate container path. The default is /var/lib/lxc. πŸ“
  • -o, --logfile=FILE β€” output to an alternate log FILE. The default is no log. πŸ“
  • -l, --logpriority=LEVEL β€” set log priority to LEVEL. The default log priority is ERROR. Possible values are: FATAL, ALERT, CRIT, WARN, ERROR, NOTICE, INFO, DEBUG, TRACE. πŸ”₯ Note that this option is setting the priority of the events log in the alternate log file. It does not affect the ERROR events log on stderr. ⚠️
  • -n, --name=NAME β€” use container identifier NAME. The container identifier format is an alphanumeric string. 🏷️
  • --rcfile=FILE β€” specify the configuration file to configure the virtualization and isolation functionalities for the container. 🧚 This configuration file, if present, will be used even if there is already a configuration file present in the previously created container (via lxc-create). πŸ’–
  • --version β€” show the version number. πŸ‘‘

πŸ“ EXAMPLES πŸ“

lxc-wait -n foo -s RUNNING

exits when 'RUNNING' is reached. βœ…

lxc-wait -n foo -s 'RUNNING|STOPPED'

exits when 'RUNNING' or 'STOPPED' state is reached. βœ…

πŸ’€ DIAGNOSTIC πŸ’€

  • The container was not found β€” the specified container was not created before with the lxc-create command. 🫠

πŸ¦‹ SEE ALSO πŸ¦‹


Signing off from the lxc-wait(1) manual page, dated 2026-05-01. πŸ’…βœ¨

πŸ“¦ where this page comes from