LXC Cheatsheet

Create Container

sudo lxc-create --template [TEMPLATE NAME] --name [CONTAINER NAME]
Example:
sudo lxc-create --template ubuntu --name guest1

List Containers

sudo lxc-ls

Start A Container In Background (Daemon)

sudo lxc-start -d --name [CONTAINER NAME]

Attach To Container

sudo lxc-attach --name [CONTAINER NAME]
exit back out to the host with the "exit" command

Stop Container

sudo lxc-stop --name [CONTAINER NAME]

Clone Container

sudo lxc-clone [CONTAINER NAME] [NEW CONTAINER NAME]

No comments:

Post a Comment