我正在尝试在 OpenVZ 中托管的 VPN 上运行 LXC,我尝试过使用多种图像风格 ubuntu 来执行此操作。centos,debian ......没有运气。LXC 安装正确,但是由于网络原因容器无法启动,这似乎与接口的桥接有关!
有没有人遇到过类似的问题?有谁知道这是否是 OpenVZ 的限制?
从全新的 ubuntu 14.04 安装开始:
sudo apt-get update
sudo apt-get install lxc
sudo lxc-create -n p1 -t ubuntu
sudo lxc-start -n p1 --logfile log.txt
cat log.txt
lxc-start 1434379565.265 ERROR lxc_conf - conf.c:instantiate_veth:2949 - failed to create veth pair (vethP4LPC8 and vethO6MP73): Operation not supported
lxc-start 1434379565.265 ERROR lxc_conf - conf.c:lxc_create_network:3261 - failed to create netdev
lxc-start 1434379565.265 ERROR lxc_start - start.c:lxc_spawn:826 - failed to create the network
lxc-start 1434379565.265 ERROR lxc_start - start.c:__lxc_start:1080 - failed to spawn 'p1'
lxc-start 1434379565.265 ERROR lxc_start_ui - lxc_start.c:main:342 - The container failed to start.
lxc-start 1434379565.265 ERROR lxc_start_ui - lxc_start.c:main:346 - Additional information can be obtained by setting the --logfile and --logpriority options.
并尝试:
sudo brctl addbr lxcbr0
add bridge failed: Invalid argument