$ sudo lxd init Would you like to use LXD clustering? (yes/no) \[default=no\]: yes What name should be used to identify this node in the cluster? \[default=web\]: What IP address or DNS name should be used to reach this node? \[default=10.100.0.80\]: Are you joining an existing cluster? (yes/no) \[default=no\]: yes IP address or FQDN of an existing cluster node: 10.100.0.31 Cluster fingerprint: 79ec4bdfa32501a664b1adde03a2296f7d663a43676a422781668df1bec2ee12 You can validate this fingerprint by running "lxc info" locally on an existing node. Is this the correct fingerprint? (yes/no) \[default=no\]: yes Cluster trust password: All existing data is lost when joining a cluster, continue? (yes/no) \[default=no\] yes Would you like a YAML "lxd init" preseed to be printed? (yes/no) \[default=no\]:
集群管理 集群节点列表
1 2 3 4 5 6 7 8 9 10
$ lxc cluster list +---------+--------------------------+----------+--------+-------------------+ NAME URL DATABASE STATE MESSAGE +---------+--------------------------+----------+--------+-------------------+ vm02 https://10.100.0.33:8443 YES ONLINE fully operational +---------+--------------------------+----------+--------+-------------------+ vmsvr02 https://10.100.0.31:8443 YES ONLINE fully operational +---------+--------------------------+----------+--------+-------------------+ web https://10.100.0.80:8443 YES ONLINE fully operational +---------+--------------------------+----------+--------+-------------------+