lxc 컨테이너를 시작하려고 할 때 오류가 발생합니다. 그런데 저는 LXD를 사용하고 있습니다. 내가 직면한 오류는 다음과 같습니다.
ubuntu@ubuntu-blade1:~$ sudo lxc start test
error: Error calling 'lxd forkstart test /var/lib/lxd/containers /var/log/lxd/test/lxc.conf': err='exit status 1'
Try `lxc info --show-log test` for more info
로그를 확인해 보니 다음과 같은 내용이 있었습니다.
Log:
lxc 20160721110431.287 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 3
lxc 20160721110431.287 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 8
lxc 20160721110431.290 INFO lxc_container - lxccontainer.c:do_lxcapi_start:797 - Attempting to set proc title to [lxc monitor] /var/lib/lxd/containers test
lxc 20160721110431.290 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 8
lxc 20160721110431.291 INFO lxc_lsm - lsm/lsm.c:lsm_init:48 - LSM security driver AppArmor
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .reject_force_umount # comment this to allow umount -f; not recommended.
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for reject_force_umount action 0
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for reject_force_umount action 0
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .[all].
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .kexec_load errno 1.
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for kexec_load action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for kexec_load action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .open_by_handle_at errno 1.
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for open_by_handle_at action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for open_by_handle_at action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .init_module errno 1.
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for init_module action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for init_module action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .finit_module errno 1.
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for finit_module action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for finit_module action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .delete_module errno 1.
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for delete_module action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for delete_module action 327681
lxc 20160721110431.291 INFO lxc_seccomp - seccomp.c:parse_config_v2:456 - Merging in the compat seccomp ctx into the main one
lxc 20160721110431.291 INFO lxc_conf - conf.c:run_script_argv:367 - Executing script '/usr/bin/lxd callhook /var/lib/lxd 1 start' for container 'test', config section 'lxc'
lxc 20160721110431.291 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 3
lxc 20160721110431.291 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 8
lxc 20160721110431.293 INFO lxc_monitor - monitor.c:lxc_monitor_sock_name:178 - using monitor sock name lxc/d78a9d7e97b4b375//var/lib/lxd/containers
lxc 20160721110431.307 DEBUG lxc_start - start.c:setup_signal_fd:289 - sigchild handler set
lxc 20160721110431.308 DEBUG lxc_console - console.c:lxc_console_peer_default:469 - no console peer
lxc 20160721110431.308 INFO lxc_start - start.c:lxc_init:488 - 'test' is initialized
lxc 20160721110431.308 INFO lxc_confile - confile.c:config_idmap:1500 - read uid map: type u nsid 0 hostid 100000 range 65536
lxc 20160721110431.308 DEBUG lxc_start - start.c:__lxc_start:1326 - Not dropping cap_sys_boot or watching utmp
lxc 20160721110431.308 INFO lxc_confile - confile.c:config_idmap:1500 - read uid map: type g nsid 0 hostid 100000 range 65536
lxc 20160721110431.308 INFO lxc_start - start.c:resolve_clone_flags:1013 - Cloning a new user namespace
lxc 20160721110431.309 ERROR lxc_conf - conf.c:instantiate_veth:2595 - failed to attach 'veth4IAQLB' to the bridge 'lxdbr0': Operation not permitted
lxc 20160721110431.354 ERROR lxc_conf - conf.c:lxc_create_network:2872 - failed to create netdev
lxc 20160721110431.354 ERROR lxc_start - start.c:lxc_spawn:1080 - failed to create the network
lxc 20160721110431.354 ERROR lxc_start - start.c:__lxc_start:1353 - failed to spawn 'test'
lxc 20160721110431.354 INFO lxc_conf - conf.c:run_script_argv:367 - Executing script '/usr/share/lxcfs/lxc.reboot.hook' for container 'test', config section 'lxc'
lxc 20160721110431.857 INFO lxc_conf - conf.c:run_script_argv:367 - Executing script '/usr/bin/lxd callhook /var/lib/lxd 1 stop' for container 'test', config section 'lxc'
lxc 20160721110431.992 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - command get_cgroup failed to receive response
lxc 20160721110431.992 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - command get_cgroup failed to receive response
lxc 20160721110431.994 INFO lxc_confile - confile.c:config_idmap:1500 - read uid map: type u nsid 0 hostid 100000 range 65536
lxc 20160721110431.994 INFO lxc_confile - confile.c:config_idmap:1500 - read uid map: type g nsid 0 hostid 100000 range 65536
lxc 20160721110505.512 INFO lxc_confile - confile.c:config_idmap:1500 - read uid map: type u nsid 0 hostid 100000 range 65536
lxc 20160721110505.512 INFO lxc_confile - confile.c:config_idmap:1500 - read uid map: type g nsid 0 hostid 100000 range 65536
lxc 20160721110505.520 INFO lxc_confile - confile.c:config_idmap:1500 - read uid map: type u nsid 0 hostid 100000 range 65536
lxc 20160721110505.520 INFO lxc_confile - confile.c:config_idmap:1500 - read uid map: type g nsid 0 hostid 100000 range 65536
답변1
구성에 lxdbr0이 있는지 확인할 수 있나요? LXD에서 제공하는 서버 외에 이 시스템에 DNS 또는 DHCP 서버가 설치되어 있습니까? dnsmasq를 설치한 이후에도 동일한 문제가 발생했으며 sudo apt-get remove dnsmasq
이제 재부팅한 후 모든 것이 잘 작동합니다. LXD 브리지가 실행되도록 재구성해야 할 수도 있습니다 sudo dpkg-reconfigure -p medium lxd
.제본설치 후에는 이를 제거하고 LXD 브리지를 재구성해야 할 수도 있습니다.