LXC.INIT(1)

πŸ“¦
version 5.21.6 Β· 2 versions
, in opensuse-leap 16.0

πŸ’– 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 with help or --help to 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 --project flag 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 --project and 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