VERSION:(8)

πŸ“¦
version 0.3.1 Β· 2 versions
  • 0.3.1 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.3.1 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

lxctl β€” utility to manage Linux Containers (LXC) 🫢

okay so bestie, this is the manual page for lxctl, from the VERSION:(8) section of the System Administration Utilities β€” and yes it manages Linux Containers, no cap πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

πŸ’œ Usage

lxctl [action] [vmname] [options]

that's the whole vibe: you pick an action, you point it at a vmname, and then you sprinkle on some options. iconic behavior honestly 🌸


🌈 OPTIONS 🌈

  • --help β€” prints a brief help message and exits 🫢 (short, sweet, slays)
  • --man β€” prints the manual page and exits πŸ“– (it's giving "read the docs, bestie")

πŸ“ start

Starts the container specified in the 1st argument πŸš€

Required arguments

  • vmname β€” name of the container

πŸ¦‹ stop

Stops the container specified in the 1st argument πŸ›‘

Required arguments

  • vmname β€” name of the container

πŸ‘‘ create

Creates a container ✨ (fresh out the box, main character energy)

Required arguments

  • vmname β€” name of the container

Optional arguments

  • --ipaddr β€” IP address of the machine
  • --mask/netmask β€” network mask of the machine
  • --defgw β€” default gateway of the machine
  • --dns β€” primary DNS server
  • --ostemplate β€” template name, by default it is lucid_amd64
  • --config β€” path to configuration file, by default /etc/lxc/<container name> is used
  • --root β€” path to root file system, by default /var/lib/lxctl/<container name> is used
  • --addpkg β€” list of additional packages (comma-separated)
  • --pkgopt β€” list of additional packet manager options (space-separated, but as one argument)
  • --rootsz β€” size of logical volume for root FS, by default it is 10G
  • --hostname β€” sets the hostname of the machine, by default <container name> is used
  • --searchdomain β€” set a custom searchdomain in /etc/resolv.conf
  • --macaddr β€” set the custom mac address of the container
  • --autostart β€” autostart container each reboot host machine
  • --no-save β€” do not save yaml config for new container, by default $CONF_PATH/vmname.yaml is used
  • --load β€” create container from yaml config
  • --debug β€” show more information about install process
  • --tz β€” set custom timezone (Europe/Moscow, UTC, etc)
  • --empty β€” create a clear container for migrate here

πŸ’€ set

Changes container parameters πŸ”§ (glow-up mode)

Required arguments

  • vmname β€” name of the container

Optional arguments

  • --rootsz β€” increment of size of logical volume for root FS
  • --ipaddr β€” IP address of the machine
  • --mask/netmask β€” network mask of the machine
  • --defgw β€” default gateway of the machine
  • --dns β€” primary DNS server
  • --hostname β€” sets the hostname of the machine
  • --searchdomain β€” set a custom searchdomain in /etc/resolv.conf
  • --macaddr β€” set the custom mac address of the container
  • --userpasswd user:passwd β€” sets password for given user
  • --onboot {yes,no} β€” makes container [do not] start at boot
  • --tz β€” set custom timezone (Europe/Moscow, UTC, etc)
  • --cpu-shares β€” sets the CPU share of the container
  • --cpus β€” sets the CPU cores of the container
  • --mem β€” sets the memory share of the container (in bytes!)
  • --io β€” sets the IO share of the container

🧊 freeze

Freezes container πŸ₯Ά

Required arguments

  • vmname β€” name of the container

unfreeze

Unfreezes container πŸ”₯ (thaw her out)

Required arguments

  • vmname β€” name of the container

🌸 list

Lists all containers πŸ“‹

Optional arguments

  • --ipaddr β€” display with IP addr
  • --hostname β€” display with hostname.
  • --cgroup β€” display with cgroup
  • --mount β€” display with mount point for rootfs
  • --diskspace β€” display with free/full size
  • --all β€” display all information
  • --raw β€” display only vmnames

🚚 migrate

Migrate container from localhost to remote host.

Required arguments

  • --vmname β€” container name
  • --tohost β€” to which host we should migrate

Optional arguments

  • --remuser β€” remote username for ssh
  • --remport β€” remote port for ssh
  • --remname β€” remote container name
  • --onboot β€” start on boot? 1 or 0
  • --userpasswd β€” 'user:password' formatted password for user
  • --clone β€” cloning, a little bit faster and softer then simple migration
  • --rootsz β€” remote root fs size
  • --afterstart β€” start local container again after migration
  • --cpus β€” cpus allocated to container
  • --cpu-shares β€” cpu time share of the container
  • --mem β€” memory limit of the container
  • --io β€” IO throughput
  • --ipaddr β€” IP of the remote container
  • --searchdomain β€” DNS search domain of the container
  • --netmask β€” network mask
  • --defgw β€” default gateway
  • --dns β€” DNS server

πŸͺ„ vz2lxc

Migrate VZ-container from remote host to local LXC container.

Required arguments

  • --vmname β€” container name
  • --fromhost β€” from which host we should migrate
  • --remname β€” remote container name

Optional arguments

  • --remuser β€” remote username for ssh
  • --remport β€” remote port for ssh
  • --onboot β€” start on boot? 1 or 0
  • --rootsz β€” remote root fs size
  • --afterstart β€” start local container again after migration
  • --cpus β€” cpus allocated to container
  • --cpu-shares β€” cpu time share of the container
  • --mem β€” memory limit of the container
  • --io β€” IO throughput

πŸ’– SEE ALSO πŸ’–

The full documentation for Version: is maintained as a Texinfo manual. If the info and Version: programs are properly installed at your site, the command

info Version:

should give you access to the complete manual. πŸ“šβœ¨


and that's the whole page, bestie!! this lil cutie is Version: 0.3.0, dated June 2012, hanging out in section VERSION:(8) of the System Administration Utilities πŸŽ€ go forth and container-ify, you got this πŸ«ΆπŸ’…

πŸ“¦ where this page comes from