LXC.INIT(1)
π lxc-init π
okay bestie, welcome to the page from the LXD - Command line client(1) manual β it's all about lxc-init, and it's giving βCreate instances from imagesβ main character energy β¨. here's the whole thing, no cap π«Ά.
π NAME π
lxc-init β Create instances from images
πΈ SYNOPSIS πΈ
lxc init [:] [:][] [flags]
yes bestie, that synopsis is literally that β copy it exact, don't come for me π .
π¦ DESCRIPTION π¦
Description: Create instances from images β that's the whole vibe of this command, fr fr.
β¨ OPTIONS β¨
-c,--config=[]β config key/value to apply to the new instance π-d,--device=[]β new key/value to apply to a specific device π--empty[=false]β create an empty instance β¨-e,--ephemeral[=false]β ephemeral instance π¦-n,--network=""β network name π--no-profiles[=false]β create the instance with no profiles applied π-p,--profile=[]β profile to apply to the new instance π-s,--storage=""β storage pool name πΎ--target=""β cluster member name π--target-project=""β project to create the instance in (if different from--project) π«Ά-t,--type=""β instance type β--vm[=false]β create a virtual machine π₯
π OPTIONS INHERITED FROM PARENT COMMANDS π
--debug[=false]β show all debug messages π--force-local[=false]β force using the local unix socket π-h,--help[=false]β print help π--project=""β override the source project π-q,--quiet[=false]β don't show progress information π€«--sub-commands[=false]β use withhelpor--helpto view sub-commands π§-v,--verbose[=false]β show all information messages π£--version[=false]β print version number π·οΈ
π EXAMPLE π
okay, examples time β these are the exact commands, bestie:
lxc init ubuntu:24.04 u1
Create a container (but do not start it) π
lxc init ubuntu:24.04 u1 < config.yaml
Create a container with configuration from config.yaml π
lxc init ubuntu:24.04 v1 --vm -c limits.cpu=4 -c limits.memory=4GiB
Create a virtual machine with 4 vCPUs and 4GiB of RAM π₯
lxc init ubuntu:24.04 v1 --vm -c limits.cpu=2 -c limits.memory=8GiB -d root,size=32GiB
Create a virtual machine with 2 vCPUs, 8GiB of RAM and a root disk of 32GiB πΎ
β οΈ note bestie: The--projectflag sets the project for both the image remote and the instance remote. If the image remote is a public remote (e.g.simplestreams) then this project is ignored by the image remote. If the image remote is another LXD server, specify the source project for the image remote with--projectand the instance remote with--target-project(if different from--project).
π SEE ALSO π
lxc(1) β go check it out, bestie π.
π HISTORY π
22-Aug-2026 Auto generated by spf13/cobra
mwah π source/version: Auto generated by spf13/cobra; date: Aug 2026; and yes, it's the LXD - Command line client(1) manual. byeee π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: lxd 5.21.6-bp160.1.1 Β· AGPL-3.0-only AND Apache-2.0
- opensuse-leap 16.0: lxd 5.21.6-bp160.1.1 Β· AGPL-3.0-only AND Apache-2.0
- opensuse-leap 16.0: lxd 5.21.6-bp160.1.1 Β· AGPL-3.0-only AND Apache-2.0
- opensuse-leap 16.0: lxd 5.21.6-bp160.1.1 Β· AGPL-3.0-only AND Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms