... | ... | @@ -2,21 +2,21 @@ |
|
|
|
|
|
```bash
|
|
|
// list containers
|
|
|
# lxc list
|
|
|
$ lxc list
|
|
|
// launch a new container
|
|
|
# lxc launch images:ubuntu/16.04 mycontainer # ubuntu here, but anything goes
|
|
|
$ lxc launch images:ubuntu/16.04 mycontainer # ubuntu here, but anything goes
|
|
|
// launch a shell in the container (or any other tool)
|
|
|
# lxc exec mycontainer /bin/bash
|
|
|
$ lxc exec mycontainer /bin/bash
|
|
|
// snapshots
|
|
|
# lxc snapshot mycontainer init
|
|
|
# zfs list -r -t snapshot m18/lxd
|
|
|
$ lxc snapshot mycontainer init
|
|
|
$ zfs list -r -t snapshot m18/lxd
|
|
|
// we break the container - dont do this!
|
|
|
# lxc exec mycontainer -- /bin/find /etc -delete
|
|
|
# lxc exec mycontainer -- /bin/ls /etc
|
|
|
$ lxc exec mycontainer -- /bin/find /etc -delete
|
|
|
$ lxc exec mycontainer -- /bin/ls /etc
|
|
|
/bin/ls: cannot access '/etc': No such file or directory
|
|
|
# lxc restore mycontainer init
|
|
|
$ lxc restore mycontainer init
|
|
|
// everything is fine again
|
|
|
# lxc exec mycontainer -- /bin/ls /etc
|
|
|
$ lxc exec mycontainer -- /bin/ls /etc
|
|
|
```
|
|
|
|
|
|
Docs: https://github.com/lxc/lxd/blob/master/doc/index.md
|
... | ... | |