From 4b0de5008d326c2bcccbadbb4080dfaea425b9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Tue, 7 Jul 2015 02:53:08 +0200 Subject: [PATCH] Add lxc client configuration. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: René Jochum --- content/post/lxd-getting-started.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/content/post/lxd-getting-started.md b/content/post/lxd-getting-started.md index 434322a..ee58c52 100644 --- a/content/post/lxd-getting-started.md +++ b/content/post/lxd-getting-started.md @@ -11,11 +11,13 @@ tags: --- This is what i do to install and configure lxd. +#### Install and configure it on the container host + Install **lxd**: sudo apt-add-repository -y ppa:ubuntu-lxc/stable sudo apt-get update - sudo apt-get install lxd + sudo apt-get install lxd lxd-client Give root one subuid and subgid: @@ -32,7 +34,7 @@ Restart **lxd**: Set the remote authentication password: - lxc config set core.trust_password <your-password-here> + lxc config set core.trust_password Change the default profile network interface: @@ -40,7 +42,7 @@ Change the default profile network interface: Create an image: - lxd-images import lxc ubuntu trusty amd64 --alias trusty64 --alias ubuntu/trusty/amd64 + lxd-images import lxc ubuntu trusty amd64 --alias trusty64 --alias ubuntu/trusty --alias ubuntu/trusty/amd64 Create the container "trusty64" from the image "ubuntu/trusty/amd64" you just made: @@ -50,6 +52,22 @@ Show the log if the above failed: lxc info trusty64 --show-log +#### On your own box/client + +Install lxd-client + + sudo apt-add-repository -y ppa:ubuntu-lxc/stable + sudo apt-get update + sudo apt-get install lxd-client + +Add a remote for the server you just configured: + + lxc remote add https://:8443 --accept-certificate # enter the password you've set above here. + +See if the remote works: + + lxc list : + Usefull Links: - [LXD README.md](https://github.com/lxc/lxd#machine-setup) - [LXD CMD specs](https://github.com/lxc/lxd/blob/master/specs/command-line-user-experience.md)