LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

lxc-profile

manages configuration profiles for LXD containers and virtual machines

TLDR

List all available profiles
$ lxc profile list
copy
Show the configuration of a specific profile
$ lxc profile show [profile_name]
copy
Edit a specific profile in the default editor
$ lxc profile edit [profile_name]
copy
Create a new profile
$ lxc profile create [profile_name]
copy
Launch a new container with specific profiles
$ lxc launch [container_image] [container_name] -p [profile1] -p [profile2]
copy
Change the profiles of a running container
$ lxc profile assign [container_name] [profile1,profile2]
copy

SYNOPSIS

lxc profile command [options]

DESCRIPTION

lxc profile manages configuration profiles for LXD containers and virtual machines. Profiles define reusable sets of configuration options including resource limits, device mappings, network settings, and security policies.Containers can use multiple profiles, which are applied in order (later profiles override earlier ones). The default profile is automatically applied to new containers and typically includes basic network and storage configuration.Profile configuration uses YAML format, specifying options like CPU/memory limits, disk quotas, network interfaces, and GPU passthrough.

PARAMETERS

list

List all available profiles
show _profile_
Display the full configuration of a profile
edit _profile_
Open a profile for editing in the default editor
create _profile_
Create a new empty profile
delete _profile_
Remove a profile
copy _source_ _dest_
Copy a profile to a new name
rename _old_ _new_
Rename a profile
assign _instance_ _profiles_
Set the profiles for an instance (comma-separated list)
add _instance_ _profile_
Add a profile to an instance's existing profiles
remove _instance_ _profile_
Remove a profile from an instance
set _profile_ _key_ _value_
Set a profile configuration key
get _profile_ _key_
Get a profile configuration value
device add _profile_ _device_ _type_ [_options_]
Add a device to a profile
device remove _profile_ _device_
Remove a device from a profile

CAVEATS

Profile changes don't automatically apply to running containers; restart the container or reassign profiles to apply changes. Deleting a profile that's in use by containers will fail. The default profile cannot be deleted.

SEE ALSO

lxc(1), lxc-create(1), lxc-start(1), lxc-ls(1)

Copied to clipboard
Kai