![lxc/kvm 容器启动失败](https://linux22.com/image/864777/lxc%2Fkvm%20%E5%AE%B9%E5%99%A8%E5%90%AF%E5%8A%A8%E5%A4%B1%E8%B4%A5.png)
我已经准备好 MAAS+Juju 设置,并成功在特定机器上部署了一些 openstack charms。然后,我读到将这些 openstack charms 放在自己的容器中是安全且良好的做法。我尝试了
juju deploy --to lxc:14 --repository=/opt/charms local:trusty/keystone
魅力已成功添加,但juju stat
显示
"14":
agent-state: started
agent-version: 1.20.10
dns-name: slot13.maas
instance-id: /MAAS/api/1.0/nodes/node-9cf5e120-5625-11e4-b22e-a41f72f16283/
series: trusty
containers:
14/kvm/0:
agent-state-info: 'kvm container creation failed: exit status 1'
instance-id: pending
series: trusty
14/lxc/0:
agent-state-info: container failed to start
instance-id: pending
series: trusty
hardware: arch=amd64 cpu-cores=4 mem=32768M
我尝试使用 kvm 容器,结果相同(您甚至可以看到上面的错误。对于 KVM 容器,我确实在 BIOS 中启用了虚拟化技术)。
juju debug-log
节目
machine-14: 2014-11-05 06:31:12 ERROR juju.container.lxc clonetemplate.go:167 container failed to start: container failed to start
machine-14: 2014-11-05 06:31:12 ERROR juju.provisioner.lxc lxc-broker.go:97 failed to start container: container failed to start
machine-14: 2014-11-05 06:31:12 ERROR juju.provisioner provisioner_task.go:418 cannot start instance for machine "14/lxc/0": container failed to start
目标节点上的 /var/log/juju 中没有 service/charm(keystone) 特定日志。我希望放入容器中的所有服务都出现了这种情况,而不仅仅是 keystone 或 openstack 服务。
笔记lxc-create
:由于一些代理问题,我在目标节点上遇到了问题,我认为我的早期帖子解决了这个问题。但我在这个问题中描述的问题并没有消失。
编辑:我找到了容器故障日志,并将其粘贴在这里-
lxc-start 1415307100.508 INFO lxc_conf - mount points have been setup
lxc-start 1415307100.508 WARN lxc_conf - rootfs specified but no console found at '/usr/lib/x86_64-linux-gnu/lxc/dev/console'
lxc-start 1415307100.508 ERROR lxc_conf - No such file or directory - failed to create symlink for kmsg
lxc-start 1415307100.508 ERROR lxc_conf - failed to setup kmsg for 'juju-machine-14-lxc-1'
lxc-start 1415307100.508 INFO lxc_conf - 0 tty(s) has been setup
lxc-start 1415307100.508 ERROR lxc_conf - No such file or directory - Error creating /usr/lib/x86_64-linux-gnu/lxc/dev/fd
lxc-start 1415307100.508 ERROR lxc_conf - failed to setup /dev symlinks for 'juju-machine-14-lxc-1'
lxc-start 1415307100.508 ERROR lxc_start - failed to setup the container
lxc-start 1415307100.508 ERROR lxc_sync - invalid sequence number 1. expected 2
lxc-start 1415307100.508 WARN lxc_conf - failed to remove interface '(null)'
lxc-start 1415307100.540 ERROR lxc_start - failed to spawn 'juju-machine-14-lxc-1'
lxc-start 1415307100.540 WARN lxc_commands - command get_init_pid failed to receive response
lxc-start 1415307100.540 WARN lxc_cgmanager - do_cgm_get exited with error
lxc-start 1415307105.545 ERROR lxc_start_ui - The container failed to start.
lxc-start 1415307105.545 ERROR lxc_start_ui - To get more details, run the container in foreground mode.
lxc-start 1415307105.545 ERROR lxc_start_ui - Additional information can be obtained by setting the --logfile and --logpriority options.
第一个错误rootfs specified but no console found at '/usr/lib/x86_64-linux-gnu/lxc/dev/console'
确实是正确的,因为没有路径'/usr/lib/x86_64-linux-gnu/lxc/dev/console'
。目录结构以 '/usr/lib/x86_64-linux-gnu/lxc/' 结尾
答案1
我遇到了类似的错误。不完全相同,但解决方案是删除 lxcs。
rm -rf /var/lib/lxc/offending-container-xx
rm -rf /var/lib/juju/containers/offending-container-xx
如果有人遇到类似的错误,希望这会有所帮助。