LXD-installing Managing lxc-Containes

preparing system and installing LXD

if it’s needed as it for som new systems run:

##KERNEL UPGRADE $sudo apt-get install linux-image-generic

$sudo apt-get install software-properties-common

$sudo apt-get install python-software-properties

##and then add any repo you want

sudo add-apt-repository ppa:foo/bar

Installing LXD

sudo apt-add-repository ppa:ubuntu-lxc/stable
sudo apt update
sudo apt dist-upgrade
sudo apt install lxd
##now time for configuring LXD
sudo lxd init 
##most of it yes, change any conf you need like btrfs FOR STORAGE BACKEND.
.. 
##To reconfigure the bridge and add some ipv4
sudo dpkg-reconfigure -p medium lxd

##Or go through the whole LXD step by step setup (see below) with:

sudo lxd init


 

 

Management of LXC containers. 

#add remote image server to download images from

$ sudo lxc remote add lxc images.linuxcontainers.org

#install container from an image, choose distro system ARCH NAME etc.

$ sudo lxc launch lxc:debian/jessie/i386 debianSRV1

$ sudo lxc stop debianSRV1

#install anything on container with EXEC Command.

##like installing an upstart-bin.

$ sudo lxc exec CONTAINERNAME — apt-get -y install upstart-bin upstart-sysv

Running Google chrome in a container

##https://stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/

lxc-create -t download -n precise-gui -- -d ubuntu -r precise -a i386