$ lxc profile list +--------------------+---------+ NAME USED BY +--------------------+---------+ default1 +--------------------+---------+ hostbridgedprofile 0 +--------------------+---------+
$ lxc profile delete hostbridgedprofile Error: Profile is currently in use
配置容器网络接口(方法三)
重新初始化lxd,注意在有容器实例存在的情况下,重新初始化网络设置是可以的,但是已经存在的storage pool是不能改动的,当然可以添加新的storage pool
1 2 3 4 5 6 7 8 9 10
$ lxd init Would you like to use LXD clustering? (yes/no) \[default=no\]: Do you want to configure a new storage pool? (yes/no) \[default=yes\]: no Would you like to connect to a MAAS server? (yes/no) \[default=no\]: Would you like to create a new local network bridge? (yes/no) \[default=yes\]: no <=这里为no Would you like to configure LXD to use an existing bridge or host interface? (yes/no) \[default=no\]: yes <= 这里为yes Name of the existing bridge or host interface: br0 <= 这里输入主机桥接接口bro Would you like LXD to be available over the network? (yes/no) \[default=no\]: Would you like stale cached images to be updated automatically? (yes/no) \[default=yes\] Would you like a YAML "lxd init" preseed to be printed? (yes/no) \[default=no\]: