mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 13:35:24 +02:00
lxc-network, lxc-profile: add page (#7280)
This commit is contained in:
parent
3c3d11345a
commit
a60f1f9fae
2 changed files with 56 additions and 0 deletions
28
pages/linux/lxc-network.md
Normal file
28
pages/linux/lxc-network.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# lxc network
|
||||
|
||||
> Manage networks for LXD containers.
|
||||
> More information: <https://linuxcontainers.org/lxd/docs/master/networks>.
|
||||
|
||||
- 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`
|
28
pages/linux/lxc-profile.md
Normal file
28
pages/linux/lxc-profile.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# lxc profile
|
||||
|
||||
> Manage profiles for LXD containers.
|
||||
> More information: <https://linuxcontainers.org/lxd/docs/master/profiles>.
|
||||
|
||||
- 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}}`
|
Loading…
Add table
Reference in a new issue