[lxc-users] live migration using lxd 0.6

KATOH Yasufumi karma at jazz.email.ne.jp
Wed Apr 8 12:06:48 UTC 2015


Hi,

>>> On Fri, 27 Mar 2015 18:36:22 +0900
    in message   "Re: [lxc-users] live migration using lxd 0.4"
                  I wrote:

> Thanks for your reply and detailed description!! I will try it next
> week.

I tried live migration using lxd 0.6, and work fine!! :-D

* OS: Ubuntu Trusty x 2
    * source host: lxd01
    * destination host: lxd02
* LXD: Install from lxd-git-master PPA
  $ dpkg-query --show lxd
  lxd	0.6-0ubuntu1~ubuntu14.04.1~ppa1

1. remove lxcfs
  apt-get remove lxcfs
2. set password (both hosts)
  lxc config set password hogehoge
3. get image on lxd01
  lxd-images import lxc ubuntu trusty amd64 --alias ubuntu
4. add remotes on lxd01
  lxc remote add lxd01 lxd01:8443
  lxc remote add lxd02 lxd02:8443
5. copy & edit profile
  lxc config profile copy default criu
  lxc config profile edit criu
  name: criu
  config:
    raw.lxc: |
      lxc.tty=0
      lxc.console=none
      lxc.cgroup.devices.deny=c 5:1 rwm
    security.privileged: "true"
  devices: {}
6. copy profile
  lxc config profile copy lxd01:criu lxd02:criu
7. create container on lxd01
  lxc init ubuntu ct01
8. apply profile on lxd01
  lxc config profile apply ct01 criu
9. start container on lxd01
  lxc start ct01
  lxc list
  +------+---------+------+------+
  | NAME |  STATE  | IPV4 | IPV6 |
  +------+---------+------+------+
  | ct01 | RUNNING |      |      |
  +------+---------+------+------+
10. migrate container
  lxc move lxd01:ct01 lxd02:ct01
  $ lxc list lxd02:
  +------+---------+------+------+
  | NAME |  STATE  | IPV4 | IPV6 |
  +------+---------+------+------+
  | ct01 | RUNNING |      |      |
  +------+---------+------+------+

Thanks!!




More information about the lxc-users mailing list