lxc-create(1)
π lxc-create(1) β the manual page, bestie π
okay so welcome to the lxc-create(1) page β this is the one that makes containers happen, and we're gonna get through it together π«Άβ¨
πΈ NAME πΈ
lxc-create β creates a container π
β¨ SYNOPSIS β¨
like, the whole shape of it is:
lxc-create {-n name} [-f config_file] {-t template} [-B backingstore]
[-- template-options]
π¦ DESCRIPTION π¦
okay so lxc-create creates a system object where the configuration information is stored and where user information can be stored. The identifier name is used to specify the container to be used with the different lxc commands. no cap π«Ά
The object is literally a directory created in /var/lib/lxc and identified by its name. very demure, very contained π
The object is the definition of the different resources an application can use or can see. The more the configuration file contains information, the more the container is isolated and the more the application is jailed. it's giving layers of boundaries β¨
If the configuration file config_file is not specified, the container will be created with the default isolation: processes, sysv ipc and mount points.
π OPTIONS π
these are the main-character flags, bestie:
-f,--config config_fileβ Specify the configuration file to configure the virtualization and isolation functionalities for the container.-t,--template templateβ template is the short name of an existing'lxc-template'script that is called bylxc-create, eg. busybox, debian, fedora, ubuntu or sshd. Refer to the examples in/usr/share/lxc/templatesfor details of the expected script structure. Alternatively, the full path to an executable template script can also be passed as a parameter."none"can be used to forcelxc-createto skip rootfs creation.-B,--bdev backingstoreβ backingstore is one of'dir','lvm','loop','btrfs','zfs','rbd', or'best'. The default is'dir', meaning that the container root filesystem will be a directory under/var/lib/lxc/container/rootfs. This backing store type allows the optional--dir ROOTFSto be specified, meaning that the container rootfs should be placed under the specified path, rather than the default. (The'none'backingstore type is an alias for'dir'.)
If 'btrfs' is specified, then the target filesystem must be btrfs, and the container rootfs will be created as a new subvolume. This allows snapshotted clones to be created, but also causes rsync --one-filesystem to treat it as a separate filesystem.
If backingstore is 'lvm', then an lvm block device will be used and the following further options are available:
--lvname lvname1β will create an LV namedlvname1rather than the default, which is the container name.--vgname vgname1β will create the LV in volume groupvgname1rather than the default,lxc.--thinpool thinpool1β will create the LV as a thin-provisioned volume in the pool namedthinpool1rather than the default,lxc.--fstype FSTYPEβ will create anFSTYPEfilesystem on the LV, rather than the default, which isext4.--fssize SIZEβ will create a LV (and filesystem) of sizeSIZErather than the default, which is1G.
If backingstore is 'loop', you can use --fstype FSTYPE and --fssize SIZE as 'lvm'. The default values for these options are the same as 'lvm'.
If backingstore is 'rbd', then you will need to have a valid configuration in ceph.conf and a ceph.client.admin.keyring defined. You can specify the following options :
--rbdname RBDNAMEβ will create a blockdevice namedRBDNAMErather than the default, which is the container name.--rbdpool POOLβ will create the blockdevice in the pool namedPOOL, rather than the default, which is'lxc'.--rbduser RBDUSERβ will specify the ceph userRBDUSERcreating the blockdevice, rather than the default, which is'admin'.
If backingstore is 'best', then lxc will try, in order, btrfs, zfs, lvm, and finally a directory backing store.
-- template-optionsβ This will pass template-options to the template as arguments. To see the list of options supported by the template, you can runlxc-create -t TEMPLATE -h.
π COMMON OPTIONS π
These options are common to most of lxc commands.
-?,-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 logFILE. The default is no log.-l,--logpriority=LEVELβ Set log priority toLEVEL. The default log priority isERROR. 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 identifierNAME. 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.
π DIAGNOSTIC π
The container already exists
As the message mentions, you try to create a container but there is a container with the same name. You can use the lxc-ls command to list the available containers on the system.
π SEE ALSO π
go read these too, bestie:
lxc(7)lxc-create(1)lxc-copy(1)lxc-destroy(1)lxc-start(1)lxc-stop(1)lxc-execute(1)lxc-console(1)lxc-monitor(1)lxc-wait(1)lxc-cgroup(1)lxc-ls(1)lxc-info(1)lxc-freeze(1)lxc-unfreeze(1)lxc-attach(1)lxc.conf(5)
π that's a wrap on the lxc-create(1) page β date 2026-05-01, manual name lxc-create(1), mwah πβ¨
π¦ where this page comes from
- alpine 3.24: lxc-doc 7.0.0-r0 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms