Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

#lxc.net.0.type = empty
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.link = lxcbr0
lxc.net.0.hwaddr = fe:0d:e4:0:xx:xx
#lxc.net.0.veth.mode = bridge
lxc.net.0.ipv4.address = 10.0.3.10/24


lxc.rootfs.path = dir:/lxc/guest
lxc.signal.halt = SIGRTMIN+3
lxc.signal.reboot = SIGTERM
lxc.uts.name = "busybox"
lxc.tty.max = 1
lxc.pty.max = 1

lxc.cgroup.devices.allow = c *:* m
lxc.cgroup.devices.allow = b *:* m


lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed
lxc.mount.entry = /sys/kernel/security sys/kernel/security none ro,bind,optional 0 0

lxc.cgroup.devices.allow = c 116:* rwm
lxc.cgroup.devices.allow = c 13:* rwm
lxc.cgroup.devices.allow = c 226:* rwm
lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=dir

lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry = /dev/tty3 dev/tty3 none bind,optional,create=file
lxc.mount.entry = /dev/input dev/input none bind,optional,create=dir

lxc.mount.entry = /run/platform/display mnt/tmp none bind,optional,create=dir
lxc.environment = XDG_RUNTIME_DIR=/home/0/tmp
lxc.mount.entry = /run/udev/data run/udev/data none bind,optional,create=dir

lxc.mount.entry = /sys/fs/smackfs sys/fs/smackfs none bind 0 0
lxc.mount.entry = /etc/smack etc/smack none bind,optional,create=dir

  • weston起動のために、udevをコピーする。
    • cp /run/udev/data/c226\:1 /lxc/guest/home/0
    • cp /run/udev/data/c13\:* /lxc/guest/home/0
  • guest側のweston.serviceを修正する。
    • 以下を追加
      ExecStartPre=+/bin/mkdir -p /run/udev/data
      ExecStartPre=+/bin/cp /home/0/c13:64 /run/udev/data/
      ExecStartPre=+/bin/cp /home/0/c13:65 /run/udev/data/
      ExecStartPre=+/bin/cp /home/0/c13:66 /run/udev/data/

    • ttyをtty3に変更

      TTYPath=/dev/tty3
      UtmpIdentifier=tty3

      ExecStart=/usr/bin/weston --tty=3 --idle-time=0  --log=/run/platform/display/weston.log

3. Guest コンテナを起動する

  • lxc-startで起動、ログイン

    • lxc-start -n guest 
    • lxc-attach -n guest