[lxc-users] Overlayfs Snapshot Clones

jan.zeller at id.unibe.ch jan.zeller at id.unibe.ch
Wed May 25 13:48:18 UTC 2016


Hi all,

I am using 

# lxc-info --version
2.0.1

and try to create a LXC like this :

# lxc-create --template download -n Alpine-3.3.x --bdev overlayfs -- --dist alpine --release 3.3 --arch amd64 

which works like a charm.

Then I create a snapshot clone :
# lxc-copy --name=Alpine-3.3.x --newname=test --snapshot

# lxc-ls -f
NAME         STATE   AUTOSTART GROUPS IPV4 IPV6 
Alpine-3.3.x STOPPED 0         -      -    -    
test         STOPPED 0         -      -    -    


Starting the freshly created snapshot clone named 'test' fails :

# lxc-start --name test --logpriority=debug --logfile=/var/log/lxc/test.log

# cat /var/log/lxc/test.log
      lxc-start 20160525153840.984 INFO     lxc_start_ui - lxc_start.c:main:264 - using rcfile /var/lib/lxc/test/config
      lxc-start 20160525153840.984 WARN     lxc_confile - confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored.  It will soon become an error.
      lxc-start 20160525153840.986 INFO     lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 4
      lxc-start 20160525153840.990 INFO     lxc_container - lxccontainer.c:do_lxcapi_start:797 - Attempting to set proc title to [lxc monitor] /var/lib/lxc test
      lxc-start 20160525153840.991 INFO     lxc_utils - utils.c:setproctitle:1460 - setting cmdline failed - Invalid argument
      lxc-start 20160525153840.991 INFO     lxc_lsm - lsm/lsm.c:lsm_init:48 - LSM security driver nop
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .reject_force_umount  # comment this to allow umount -f;  not recommended.
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for reject_force_umount action 0
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts

      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for reject_force_umount action 0
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts

      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .[all].
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .kexec_load errno 1.
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for kexec_load action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for kexec_load action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .open_by_handle_at errno 1.
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for open_by_handle_at action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for open_by_handle_at action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .init_module errno 1.
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for init_module action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for init_module action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .finit_module errno 1.
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for finit_module action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for finit_module action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .delete_module errno 1.
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for delete_module action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for delete_module action 327681
      lxc-start 20160525153840.991 INFO     lxc_seccomp - seccomp.c:parse_config_v2:456 - Merging in the compat seccomp ctx into the main one
      lxc-start 20160525153840.991 DEBUG    lxc_start - start.c:setup_signal_fd:289 - sigchild handler set
      lxc-start 20160525153840.991 INFO     lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 4
      lxc-start 20160525153840.991 DEBUG    lxc_console - console.c:lxc_console_peer_default:469 - no console peer
      lxc-start 20160525153840.991 INFO     lxc_start - start.c:lxc_init:488 - 'test' is initialized
      lxc-start 20160525153840.992 DEBUG    lxc_start - start.c:__lxc_start:1326 - Not dropping cap_sys_boot or watching utmp
      lxc-start 20160525153840.992 INFO     lxc_monitor - monitor.c:lxc_monitor_sock_name:178 - using monitor sock name lxc/ad055575fe28ddd5//var/lib/lxc
      lxc-start 20160525153840.993 DEBUG    lxc_conf - conf.c:instantiate_veth:2614 - instantiated veth 'vethAUIW8N/vethVM68VP', index is '25'
      lxc-start 20160525153840.993 INFO     lxc_cgroup - cgroup.c:cgroup_init:68 - cgroup driver cgroupfs-ng initing for test
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.deny' set to 'a'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c *:* m'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'b *:* m'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:3 rwm'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:5 rwm'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:7 rwm'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 5:0 rwm'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 5:1 rwm'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 5:2 rwm'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:8 rwm'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:9 rwm'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 136:* rwm'
      lxc-start 20160525153840.994 DEBUG    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 10:229 rwm'
      lxc-start 20160525153840.994 INFO     lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1671 - cgroup has been setup
      lxc-start 20160525153841.023 DEBUG    lxc_conf - conf.c:lxc_assign_network:3048 - move '(null)' to '11683'
      lxc-start 20160525153841.023 INFO     lxcoverlay - bdev/lxcoverlay.c:ovl_mount:427 - overlayfs: mounted /var/lib/lxc/Alpine-3.3.x/rootfs onto /usr/lib/x86_64-linux-gnu/lxc options upperdir=/var/lib/lxc/test/delta0,lowerdir=/var/lib/lxc/Alpine-3.3.x/rootfs
      lxc-start 20160525153841.023 DEBUG    lxc_conf - conf.c:setup_rootfs:1215 - mounted 'overlayfs:/var/lib/lxc/Alpine-3.3.x/rootfs:/var/lib/lxc/test/delta0' on '/usr/lib/x86_64-linux-gnu/lxc'
      lxc-start 20160525153841.023 INFO     lxc_conf - conf.c:setup_utsname:843 - 'test' hostname has been setup
      lxc-start 20160525153841.043 DEBUG    lxc_conf - conf.c:setup_hw_addr:2145 - mac address '00:16:3e:70:03:73' on 'eth0' has been setup
      lxc-start 20160525153841.043 DEBUG    lxc_conf - conf.c:setup_netdev:2372 - 'eth0' has been setup
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:setup_network:2393 - network has been setup
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:mount_autodev:1072 - Mounting container /dev
      lxc-start 20160525153841.043 WARN     lxc_conf - conf.c:mount_autodev:1083 - No /dev in container.
      lxc-start 20160525153841.043 WARN     lxc_conf - conf.c:mount_autodev:1084 - Proceeding without autodev setup
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for proc on /usr/lib/x86_64-linux-gnu/lxc/proc doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for /usr/lib/x86_64-linux-gnu/lxc/proc/sys/net on /usr/lib/x86_64-linux-gnu/lxc/proc/tty doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for /usr/lib/x86_64-linux-gnu/lxc/proc/sys on /usr/lib/x86_64-linux-gnu/lxc/proc/sys doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for (null) on /usr/lib/x86_64-linux-gnu/lxc/proc/sys doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for /usr/lib/x86_64-linux-gnu/lxc/proc/tty on /usr/lib/x86_64-linux-gnu/lxc/proc/sys/net doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for /usr/lib/x86_64-linux-gnu/lxc/proc/sysrq-trigger on /usr/lib/x86_64-linux-gnu/lxc/proc/sysrq-trigger doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for (null) on /usr/lib/x86_64-linux-gnu/lxc/proc/sysrq-trigger doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for sysfs on /usr/lib/x86_64-linux-gnu/lxc/sys doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for /usr/lib/x86_64-linux-gnu/lxc/sys on /usr/lib/x86_64-linux-gnu/lxc/sys doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for (null) on /usr/lib/x86_64-linux-gnu/lxc/sys doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for sysfs on /usr/lib/x86_64-linux-gnu/lxc/sys/devices/virtual/net doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for /usr/lib/x86_64-linux-gnu/lxc/sys/devices/virtual/net/devices/virtual/net on /usr/lib/x86_64-linux-gnu/lxc/sys/devices/virtual/net doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:lxc_mount_auto_mounts:739 - Mount source or target for (null) on /usr/lib/x86_64-linux-gnu/lxc/sys/devices/virtual/net doesn't exist. Skipping.
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:mount_entry:1646 - failed to mount '/sys/fs/fuse/connections' on '/usr/lib/x86_64-linux-gnu/lxc/sys/fs/fuse/connections' (optional): No such file or directory
      lxc-start 20160525153841.043 INFO     lxc_conf - conf.c:mount_file_entries:1926 - mount points have been setup
      lxc-start 20160525153841.043 ERROR    lxc_conf - conf.c:lxc_mount_auto_mounts:781 - No such file or directory - error mounting /sys/fs/cgroup
      lxc-start 20160525153841.043 ERROR    lxc_conf - conf.c:lxc_setup:3747 - failed to setup the automatic mounts for 'test'
      lxc-start 20160525153841.043 ERROR    lxc_start - start.c:do_start:833 - failed to setup the container
      lxc-start 20160525153841.043 ERROR    lxc_sync - sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 3)
      lxc-start 20160525153841.043 WARN     lxc_conf - conf.c:lxc_delete_network:2909 - failed to remove interface 25 '(null)'
      lxc-start 20160525153841.043 ERROR    lxc_start - start.c:__lxc_start:1353 - failed to spawn 'test'
      lxc-start 20160525153841.075 INFO     lxc_conf - conf.c:run_script_argv:367 - Executing script '/usr/share/lxcfs/lxc.reboot.hook' for container 'test', config section 'lxc'
      lxc-start 20160525153841.577 WARN     lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - command get_cgroup failed to receive response
      lxc-start 20160525153846.583 ERROR    lxc_start_ui - lxc_start.c:main:344 - The container failed to start.
      lxc-start 20160525153846.583 ERROR    lxc_start_ui - lxc_start.c:main:346 - To get more details, run the container in foreground mode.
      lxc-start 20160525153846.583 ERROR    lxc_start_ui - lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.


What am I doing wrong ?

kind regards,

---

Jan 


More information about the lxc-users mailing list