documentation profile Management

This commit is contained in:
2022-10-08 01:08:50 +01:00
parent d00bbb38ea
commit ebe48d2e4e

View File

@@ -39,14 +39,16 @@ lxc exec $containername bash
### Exec multiple commands
lxc exec $containername -- bash -c "apt update -y && apt upgrade -y"
```bash
lxc exec "container name" -- bash -c "apt update -y && apt upgrade -y"
```
### delete a container
```bash
lxc rm containername
lxc rm "container name"
#if force required
lxc rm containername --force
lxc rm "container name" --force
```
### Configuration
@@ -54,5 +56,35 @@ lxc rm containername --force
Edit
```bash
lxc config edit $CONTAINER_NAME
lxc config edit "container name"
```
Set value
```bash
#Example
lxc config set "container name" "security.nesting" "true"
```
### Profile Management
```bash
lxc profile remove "container name" "profile name to remote"
lxc profile assign "container name" "profile name to assign"
```
## Profiles
### macvlan only
1) create copy from default
2) edit new profile
```bash
devices:
eth0:
nictype: macvlan
parent: "physical ethernet name"
type: nic
```