Skip to content

Instantly share code, notes, and snippets.

@tnamao
Created May 20, 2014 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnamao/dba6db794c0af1958ee2 to your computer and use it in GitHub Desktop.
Save tnamao/dba6db794c0af1958ee2 to your computer and use it in GitHub Desktop.
$ sudo apt-get update
$ sudo apt-get -yV upgrade
$ sudo shutdown -r now
$ sudo apt-get install lxc
$ sudo apt-get install lxctl
$ sudo lxc-stop -n sample
$ sudo lxc-clone sample sample2
$ sudo lxc-destory -n sample2
$ sudo lxc-create -t ubuntu -n sample
$ sudo lxc-ls
sample
$ sudo lxc-start -n sample
$ ls -l /home
$ shutdown -h now
$ sudo lxc-start -n sample -d
$ sudo lxc-info -n sample
Name: sample
State: RUNNING
PID: 19509
IP: 10.0.3.238
CPU use: 5.69 seconds
BlkIO use: 288.00 KiB
Memory use: 5.71 MiB
Link: vethJQ4W3V
TX bytes: 3.00 KiB
RX bytes: 2.21 KiB
Total bytes: 5.21 KiB
$ sudo lxc-console -n sample
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment