2025-01-21 05:55:23 +03:00
|
|
|
# lxc-create
|
|
|
|
|
|
|
|
> Create linux containers.
|
|
|
|
> More information: <https://linuxcontainers.org/lxc/getting-started>.
|
|
|
|
|
|
|
|
- Create a container interactively in `/var/lib/lxc/`:
|
|
|
|
|
2025-03-01 09:52:02 +02:00
|
|
|
`sudo lxc-create --name {{container}} --template download`
|
2025-01-21 05:55:23 +03:00
|
|
|
|
|
|
|
- Create a container in a target directory:
|
|
|
|
|
2025-03-01 09:52:02 +02:00
|
|
|
`sudo lxc-create --lxcpath {{/path/to/directory/}} --name {{container}} --template download`
|
2025-01-21 05:55:23 +03:00
|
|
|
|
|
|
|
- Create a container passing options to a template:
|
|
|
|
|
2025-03-01 09:52:02 +02:00
|
|
|
`sudo lxc-create --name {{name}} --template download -- --dist {{distro-name}} --release {{release-version}} --arch {{arch}}`
|