From a60f1f9fae552d2b7f69a9b9206ee37d79b8dbe5 Mon Sep 17 00:00:00 2001 From: Mat Date: Sat, 6 Nov 2021 22:08:05 +0100 Subject: [PATCH] lxc-network, lxc-profile: add page (#7280) --- pages/linux/lxc-network.md | 28 ++++++++++++++++++++++++++++ pages/linux/lxc-profile.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 pages/linux/lxc-network.md create mode 100644 pages/linux/lxc-profile.md diff --git a/pages/linux/lxc-network.md b/pages/linux/lxc-network.md new file mode 100644 index 000000000..6e9686982 --- /dev/null +++ b/pages/linux/lxc-network.md @@ -0,0 +1,28 @@ +# lxc network + +> Manage networks for LXD containers. +> More information: . + +- List all available networks: + +`lxc network list` + +- Show the configuration of a specific network: + +`lxc network show {{network_name}}` + +- Add a running instance to a specific network: + +`lxc network attach {{network_name}} {{container_name}}` + +- Create a new managed network: + +`lxc network create {{network_name}}` + +- Set a bridge interface of a specific network: + +`lxc network set {{network_name}} bridge.external_interfaces {{eth0}}` + +- Disable NAT for a specific network: + +`lxc network set {{network_name}} ipv{{4}}.nat false` diff --git a/pages/linux/lxc-profile.md b/pages/linux/lxc-profile.md new file mode 100644 index 000000000..84ee0938c --- /dev/null +++ b/pages/linux/lxc-profile.md @@ -0,0 +1,28 @@ +# lxc profile + +> Manage profiles for LXD containers. +> More information: . + +- List all available profiles: + +`lxc profile list` + +- Show the configuration of a specific profile: + +`lxc profile show {{profile_name}}` + +- Edit a specific profile in the default editor: + +`lxc profile edit {{profile_name}}` + +- Edit a specific profile importing the configuration values from a file: + +`lxc profile edit {{profile_name}} < {{config.yaml}}` + +- Launch a new container with specific profiles: + +`lxc launch {{container_image}} {{container_name}} --profile {{profile1}} --profile {{profile2}}` + +- Change the profiles of a running container: + +`lxc profile assign {{container_name}} {{profile1,profile2}}`