Archive

Posts Tagged ‘virtualization’

Install Latest Docker on Ubuntu Trusty 14.04 (LTS)

October 28th, 2014 No comments

From Docker’s site:

Ubuntu Trusty 14.04 (LTS) (64-bit)

Ubuntu Trusty comes with a 3.13.0 Linux kernel, and a docker.io package which installs Docker 0.9.1 and all its prerequisites from Ubuntu’s repository.

Note: Ubuntu (and Debian) contain a much older KDE3/GNOME2 package called docker, so the package and the executable are called docker.io.

Installation

To install the latest Ubuntu package (may not be the latest Docker release):

$ sudo apt-get update
$ sudo apt-get install docker.io
$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
$ sudo sed -i '$acomplete -F _docker docker'/etc/bash_completion.d/docker.io
$ source /etc/bash_completion.d/docker.io

If you’d like to try the latest version of Docker:

First, check that your APT system can deal with https URLs: the file /usr/lib/apt/methods/httpsshould exist. If it doesn’t, you need to install the package apt-transport-https.

[-e /usr/lib/apt/methods/https ]||{
  apt-get update
  apt-get install apt-transport-https
}

Then, add the Docker repository key to your local keychain.

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

Add the Docker repository to your apt sources list, update and install the lxc-docker package.

You may receive a warning that the package isn’t trusted. Answer yes to continue installation.

$ sudo sh -c "echo deb https://get.docker.com/ubuntu docker main
> /etc/apt/sources.list.d/docker.list"
$ sudo apt-get update
$ sudo apt-get install lxc-docker

Note:

There is also a simple curl script available to help with this process.

$ curl -sSL https://get.docker.com/ubuntu/ | sudo sh

To verify that everything has worked as expected:

$ sudo docker run -i -t ubuntu /bin/bash

Which should download the ubuntu image, and then start bash in a container.

Remove Stale virsh/libvirt Entries

August 4th, 2014 No comments

Sometime I’m in a hurry and delete a VM’s disk image before removing it from libvirt/virsh, which leaves a lingering, dead reference to that VM.
The following fixes this:

sudo virsh –connect qemu:///system undefine vm_to_be_removed

Replace vm_to_be_removed with your VM name.

Categories: Linux Tags: , , , ,

CentOS 6.2 and LXC

January 16th, 2013 No comments

Followed this recipe first, but got bogged down on the home-brew tools and very detailed guest config. However, this blog has the best description and config I’ve ever seen for bridge networking on CentOS – worked like a charm.
Finally got everything working with these (much simpler) instructions using a centos6 guest from the openvz template download site.

Categories: Linux Tags: , , , , , , , , ,

Headless Parallels

November 12th, 2012 No comments

Generally I like to run servers headless, as in with no display or console. In Parallels this is a little tricky, but doable from Terminal. However, Parallels Desktop must not be running. If you do launch Parallels while a Terminal-spawned VM is running, a console will automatically be created.

To see a list of available VM:

prlctl list -a

To launch a VM:

prlctl start vm_name