{"id":551,"date":"2019-11-27T18:51:19","date_gmt":"2019-11-27T10:51:19","guid":{"rendered":"http:\/\/h2.wjxy.net.cn:8081\/?p=551"},"modified":"2023-10-04T06:33:00","modified_gmt":"2023-10-03T22:33:00","slug":"proxmox-ve-%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.wjxy.net.cn\/?p=551","title":{"rendered":"Proxmox VE \u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"\n<p>Proxmox VE\u662f\u4e00\u4e2a\u7cfb\u7edf\uff0c\u4e13\u95e8\u7528\u4f5c\u7ba1\u7406\u865a\u62df\u673a<br>http:\/\/pve.proxmox.com\/wiki\/Downloads<br>https:\/\/pve.proxmox.com\/wiki\/Category:HOWTO<\/p>\n\n\n\n<p>\u5b89\u88c5<br>&nbsp;&nbsp; &nbsp;iso\u5b89\u88c5\uff0c\u5c31\u50cf\u5b89\u88c5ubuntu\u7cfb\u7edf<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;1\uff0cinstall<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;2, \u63a5\u4e0b\u6765\u662f\u4e00\u4e2a\u534f\u8bae\uff0c\u9009\u62e9\u6211\u540c\u610f\uff0c\u7136\u540e\u4e0b\u4e00\u6b65\u3002<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;3, \u586b\u5199root\u5bc6\u7801\u548c\u7ba1\u7406\u5458\u7684\u8054\u7edc\u90ae\u7bb1<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;4, \u586b\u5199\u4e3b\u673a\u540d\u548c\u672c\u673a\u7f51\u7edc\uff0cIP\u4fe1\u606f&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;(!!\u4e3b\u673a\u540d\u5f00\u5934\u4e0d\u80fd\u76f8\u540c\uff0c\u5728\u505a\u96c6\u7fa4\u7684\u65f6\u5019\u4f1a\u52a0\u4e0d\u8fdb\u53bb\u8282\u70b9)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u4f8b\uff1amaster.pev<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;worker01.pev<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;worker02.pev<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u7cfb\u7edf\u542f\u52a8\u540e\uff0c\u7cfb\u7edf\u4f1a\u7528\u7b2c\u4e00\u4e2a.\u4e4b\u524d\u4f5c\u4e3a\u4e3b\u673a\u540d\uff0c\u5982\u679c\u76f8\u540c\uff0c\u53ef\u80fd\u4f1a\u53d1\u751f\u51b2\u7a81\u5bfc\u81f4\u52a0\u4e0d\u5230\u96c6\u7fa4\u8282\u70b9<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;5, \u5b89\u88c5\u5b8c\u6210reboot<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>\u8bbf\u95ee:&nbsp;<br>&nbsp;&nbsp; &nbsp;https:\/\/192.168.20.15:8006 \u5230\u8fbe\u767b\u9646\u9875\u9762\uff0c\u4f7f\u7528root\u548c\u5bc6\u7801\u767b\u9646,\u53ef\u9009\u62e9\u4e2d\u6587<br>&nbsp;&nbsp; &nbsp;\u4e5f\u53ef\u4ee5\u63a1\u7528\u6587\u5b57\u6a21\u5f0f\u7684 ssh \u767b\u5165 proxmox \u4e3b\u6a5f\u3001 \u4ee5 debian \u7684\u6307\u4ee4\u7ba1\u7406\u7cfb\u7d71\u3001 \u4ee5 vzctl \u6307\u4ee4\u7ba1\u7406 OpenVZ container<\/p>\n\n\n\n<p>\u521b\u5efaVM<br>&nbsp;&nbsp; &nbsp;\u5c31\u662f\u666e\u901a\u7684\u865a\u62df\u673a\uff0c\u4e0b\u8f7d\u7684ISO\u6587\u4ef6\u653e\u5165\u670d\u52a1\u5668\/var\/lib\/vz\/template\/iso\u76ee\u5f55<br>\u521b\u5efaCT<br>&nbsp;&nbsp; &nbsp;ct\u5c31\u662f\u5229\u7528openvz\u865a\u62df\u6280\u672f\u521b\u5efa\u7684\u865a\u62df\u673a\uff0c\u7cfb\u7edf\u6a21\u677f\u53ef\u4ee5\u5230OpenVZ\u5b98\u7f51\u53bb\u4e0b\u8f7d,\u4ee5tar.gz\u540e\u7f00\uff0c\u653e\u5165\u670d\u52a1\u5668\/var\/lib\/vz\/template\/cache\u76ee\u5f55<br>&nbsp;&nbsp; &nbsp;opvenvz<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u662f\u57fa\u4e8eLinux\u5185\u6838\u7684\u865a\u62df\u5316\u6280\u672f<br>&nbsp;&nbsp; &nbsp;<br>\u8fd0\u884c pveversion -v \u547d\u4ee4\u4ee5\u68c0\u67e5\u5404\u79cd\u8f6f\u4ef6\u5305\u7684\u7248\u672c<\/p>\n\n\n\n<p>qm\u00a0\u00a0 \u00a0\u865a\u62df\u673a\u7ba1\u7406\u547d\u4ee4<br>\u00a0\u00a0 \u00a0https:\/\/pve.proxmox.com\/wiki\/Manual:_qm<br>\u00a0\u00a0 \u00a0qm list \u865a\u62df\u673a\u5217\u8868<br>\u00a0\u00a0 \u00a0qm clone &lt;vmid> &lt;newid> [OPTIONS] \u00a0\u514b\u9686<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-description string<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-format \u00a0 \u00a0(qcow2 | raw | vmdk)<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-full \u00a0 \u00a0 \u00a0boolean \u00a0 (default=0) \u00a0\u5b8c\u5168\u514b\u9686<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-name \u00a0 \u00a0 \u00a0string \u00a0\u540d\u5b57<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-snapname \u00a0string \u00a0<br>\u00a0\u00a0 \u00a0qm config &lt;vmid> [OPTIONS] \u00a0\u83b7\u53d6\u914d\u7f6e\u6587\u4ef6<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-current \u00a0 boolean \u00a0 (default=0) \u00a0\u5f53\u524d\u7684<br>\u00a0\u00a0 \u00a0qm destroy &lt;vmid> [OPTIONS] \u00a0\u6467\u6bc1<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-skiplock \u00a0boolean \u00a0\u5f3a\u5236<\/p>\n\n\n\n<p>    qm snapshot   &lt;vmid> &lt;snapshotname>  [OPTIONS] <br>\u00a0\u00a0 \u00a0qm delsnapshot &lt;vmid> &lt;snapshotname> [OPTIONS] \u00a0\u5220\u9664\u5feb\u7167<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-force \u00a0 \u00a0 boolean \u5f3a\u5236<br>\u00a0\u00a0 \u00a0qm resize &lt;vmid> &lt;disk> &lt;size> [OPTIONS] \u00a0\u786c\u76d8\u6269\u5bb9<br>\u00a0\u00a0 \u00a0qm rollback &lt;vmid> &lt;snapname> \u00a0\u56de\u6eda<br>\u00a0\u00a0 \u00a0qm unlock &lt;vmid> \u89e3\u9501<br>\u00a0\u00a0 \u00a0qm set &lt;vmid> [OPTIONS] \u8bbe\u7f6e<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-autostart boolean \u00a0 (default=0) \u00a0\u5d29\u6e83\u540e\u81ea\u52a8\u542f\u52a8<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-onboot \u00a0 \u00a0boolean \u00a0 (default=0) \u4e3b\u673a\u5f00\u673a\u542f\u52a8(0\u662f\u4e0d\u542f\u52a8)<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-kvm \u00a0 \u00a0 \u00a0boolean \u00a0 (default=1) \u652f\u6301kvm\u865a\u62df\u5316<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-lock \u00a0 \u00a0 \u00a0(backup | migrate | rollback | snapshot) \u00a0\u9501\u5b9a\u4e0d\u80fd\u505a(\u5907\u4efd|\u8fc1\u79fb|\u56de\u6eda|\u5feb\u7167)<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-protection boolean \u00a0(default=0) \u00a0\u8bbe\u7f6e\u4fdd\u62a4\uff0c\u9884\u9632remove\u6b64\u865a\u62df\u673a<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-reboot \u00a0 \u00a0boolean \u00a0 (default=1) \u00a0\u8bbe\u7f6e\u4e3a0\u91cd\u542f<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-skiplock \u00a0boolean \u00a0\u5f3a\u5236\uff08Ignore locks on root\uff09<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-serial[n] (\/dev\/.+|socket) \u589e\u52a0serial\u767b\u9646\u65b9\u5f0f<br>\u00a0\u00a0 \u00a0qm migrate vmid nodename<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u8fc1\u79fb\u673a\u5668<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-online<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-force<br>\u00a0\u00a0 \u00a0qm shutdown &lt;vmid> [OPTIONS]<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-forceStop boolean \u00a0 (default=0) \u786e\u4fdd\u5173\u95ed<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-skiplock \u00a0boolean<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-timeout \u00a0 integer (0 &#8211; N)<br>\u00a0\u00a0 \u00a0qm snapshot &lt;vmid> &lt;snapname> [OPTIONS] \u00a0\u505a\u5feb\u7167<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-description string \u00a0\u63cf\u8ff0<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-vmstate \u00a0 boolean \u4fdd\u5b58vm\u63cf\u8ff0<br>\u00a0\u00a0 \u00a0qm start &lt;vmid> [OPTIONS]<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-skiplock \u00a0boolean<br>\u00a0\u00a0 \u00a0qm stop &lt;vmid> [OPTIONS]<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-skiplock \u00a0boolean<br>\u00a0\u00a0 \u00a0qm suspend &lt;vmid> [OPTIONS] \u00a0\u6682\u505c\u865a\u62df\u673a<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-skiplock \u00a0boolean<br>\u00a0\u00a0 \u00a0qm status &lt;vmid> [OPTIONS]<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0-verbose \u00a0 boolean \u00a0\u8be6\u7ec6\u8f93\u51fa<br>\u00a0\u00a0 \u00a0qm terminal &lt;vmid> [OPTIONS] \u00a0<br>\u00a0\u00a0 \u00a0qm monitor &lt;vmid> \u00a0\u8fdb\u5165\u76d1\u793a\u5668\u63a5\u53e3<br>\u00a0\u00a0 \u00a0qm wait &lt;vmid> [OPTIONS] \u7b49\u5f85vm\u505c\u6b62<br>\u00a0\u00a0 \u00a0<br>\u00a0\u00a0 \u00a0<br>\u5229\u7528serial\u767b\u9646<br>\u00a0\u00a0 \u00a0https:\/\/pve.proxmox.com\/wiki\/Serial_Terminal<br>\u00a0\u00a0 \u00a0vi \/etc\/pve\/qemu-server\/101.conf \u00a0101\u662f\u865a\u62df\u673a\u7684\u5e8f\u53f7(qm list),\u589e\u52a0\uff1aseria[0-3]<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0[PENDING]<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0serial0: socket<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u6216\u8005\u5728\u4e3b\u673a\u4e0a\u7528\u547d\u4ee4\u589e\u52a0<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0qm set 101 -serial0 socket<br>\u00a0\u00a0 \u00a0reboot<br>\u00a0\u00a0 \u00a0dmesg | grep ttyS<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0[ \u00a0 \u00a00.457814] 00:0a: ttyS0 at I\/O 0x3f8 (irq = 4) is a 16550A<br>\u00a0\u00a0 \u00a0vi \/etc\/default\/grub<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0GRUB_CMDLINE_LINUX=&#8221;quiet console=tty0 console=ttyS0&#8243;<br>\u00a0\u00a0 \u00a0\u66f4\u65b0grub<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# debian based<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0update-grub<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0# redhat based<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0grub2-mkconfig &#8211;output=\/boot\/grub2\/grub.cfg<br>\u00a0\u00a0 \u00a0\u767b\u9646<br>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0qm terminal &lt;VMiD>\u00a0<\/p>\n\n\n\n<p>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;***\u6ca1\u9a8c\u8bc1***&nbsp;&nbsp; &nbsp;<br>\u522a\u9664 Proxmox VE Cluster \u8a2d\u5b9a<br>&nbsp;&nbsp; &nbsp;\u8bb0\u4f4f\u8981\u5148\u5907\u4efd<br>&nbsp;&nbsp; &nbsp;\u78ba\u8a8d\u6240\u6709node\u7686\u79fb\u9664cluster<br>&nbsp;&nbsp; &nbsp;master \u53ca\u5404\u500bnode \u57f7\u884c\u4ee5\u4e0b\u6307\u4ee4\uff1a<br>&nbsp;&nbsp; &nbsp;1.\u505c\u6b62 cluster sync \u670d\u52d9<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\/etc\/init.d\/pvemirror stop<br>&nbsp;&nbsp; &nbsp;2.\u505c\u6b62 tunnel service \u670d\u52d9<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\/etc\/init.d\/pvetunnel stop<br>&nbsp;&nbsp; &nbsp;3.\u522a\u9664 cluster \u8a2d\u5b9a\u6a94<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rm \/etc\/pve\/cluster.cfg<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rm -rf \/etc\/pve\/master<br>&nbsp;&nbsp; &nbsp;4.\u522a\u9664\u76f8\u95dc\u7684ssh\u8a2d\u5b9a\u5167\u5bb9<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rm \/root\/.ssh\/known_hosts<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;***\u6ca1\u9a8c\u8bc1***<br>\u96c6\u7fa4\uff1a<br>&nbsp;&nbsp; &nbsp;\u5728A\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u540d\u5b57\u53ebmaster\u7684\u96c6\u7fa4(\u4e3b\u8282\u70b9)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pvecm create master<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u5728\u8fd9\u91cc\u6211\u505a\u4e86\u5728hosts\u91cc\u52a0\u5165B\u670d\u52a1\u5668\u7684hosts\u6620\u5c04<br>&nbsp;&nbsp; &nbsp;\u5728B\u670d\u52a1\u5668\u4e0a\u52a0\u5165master\u8282\u70b9<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pvecm add 192.168.20.20<br>&nbsp;&nbsp; &nbsp;\u67e5\u770b\u96c6\u7fa4\u7684\u72b6\u6001<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pvecm nodes<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pvecm status<br>&nbsp;&nbsp; &nbsp;\u9020\u6210\u7121\u6cd5\u52a0\u5165\u96c6\u53e2\u7684\u539f\u56e0\u6709\u5169\u500b\uff1a<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;1\uff0c\u7bc0\u9ede\u81ea\u8eab\u5df2\u7d93\u96b8\u5c6c\u65bc\u67d0\u4e00\u96c6\u53e2<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;2\uff0c\u65b0\u7684\u96c6\u53e2\u672c\u8eab\u5df2\u7d93\u6709\u8a72\u7bc0\u9ede\u7684\u8cc7\u6599<br>&nbsp;&nbsp; &nbsp;\u589e\u52a0\u8282\u70b9\uff08\u5148\u5220\u9664\u624d\u80fd\u589e\u52a0\uff09\uff1a<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u8bb0\u4f4f\u8981\u5148\u5907\u4efd\u5220\u9664\u7684\u6570\u636e\uff0c\u540e\u8def\uff01\uff01\uff01\uff01<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u5148\u5728\u96c6\u7fa4\u4e0a\u64cd\u4f5c\uff1a<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u5148\u8981\u5220\u9664\u8282\u70b9\u4e0a\u7684kvm\u865a\u62df\u673a<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pvecm delnode nodename<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u5982\u679c\u63d0\u793a\uff1acluster not ready &#8211; no quorum?<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u6267\u884c\uff1apvecm e 1 &nbsp; #\u544a\u77e5\u53ea\u6709\u4e00\u4e2a\u8282\u70b9\u5728\u7ebf<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u540e\u767b\u9646\u8282\u70b9\u64cd\u4f5c\uff1a<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u5148\u5220\u9664(\u8fd9\u91cc\u628a\u6240\u6709\u7684\u8282\u70b9\u4fe1\u606f\u90fd\u5220\u6389\u4e86)\uff1a<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\/etc\/init.d\/pve-cluster stop<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rm -rf \/etc\/corosync\/*<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rm -rf \/var\/lib\/pve-cluster\/*<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rm -rf \/var\/lib\/corosync\/*<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;reboot<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u542f\u52a8\u540e\u767b\u9646\u8282\u70b9\u6dfb\u52a0<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pvecm add \u96c6\u7fa4\u540d<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;\u5220\u9664\u96c6\u7fa4\uff1a<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\/etc\/init.d\/pve-cluster stop<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rm -rf \/etc\/corosync\/*<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rm -rf \/var\/lib\/pve-cluster\/*<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rm -rf \/var\/lib\/corosync\/*<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\/etc\/init.d\/pve-cluster start<br>ha<br>&nbsp;&nbsp; &nbsp;2.0\u7248\u672c\u7684\u914d\u7f6e<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;http:\/\/www.anjing.me\/1417.html<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;http:\/\/my.oschina.net\/kisops\/blog\/161599<br>&nbsp;&nbsp; &nbsp;4.x\u7248\u672cha\u5f88\u7b80\u5355<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u5728ha\u754c\u9762\u628a\u673a\u5668\u52a0\u8fdb\u6765\uff0c\u4f46\u662f\u673a\u5668\u8981\u5b89\u88c5\u5728\u5171\u4eab\u5b58\u50a8\u4e0a\u9762\uff0c<br>\u5171\u4eab\u5b58\u50a8<br>&nbsp;&nbsp; &nbsp;ceph<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u5728pve web\u754c\u9762\u6dfb\u52a0rbd storage<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ID\u4e3a\u81ea\u5b9a\u4e49<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pool \u5c31\u662f\u4e00\u4e2a\u903b\u8f91\u5377<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;mon host \u76d1\u63a7\u5668\u670d\u52a1\u5668\uff0c\u53ea\u80fd\u7528ip\uff0c\u591a\u4e2a\u7528,\u76f8\u9694<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;username \u9ed8\u8ba4admin ,\u6ca1\u641e\u61c2\u8fd9\u4e2a\u54ea\u4e2a\u7528\u6237<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;KRBD &nbsp;\u5982\u679c\u662f\u865a\u62df\u673a(lxc,kvm)\u7528\uff0c\u52fe\u4e0a\u8fd9\u4e2a\uff0c\u4e0d\u7136\u4f1a\u62a5failed: exit code 1<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u6dfb\u52a0\u540e\u4ee5\u4e0b\u6587\u4ef6\u4f1a\u6709\u53d8\u5316<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;cat \/etc\/pve\/storage.cfg<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;rbd: ceph #ID<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;monhost 192.168.20.151,192.168.20.152,192.168.20.154&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;content images &nbsp;#\u5b58\u50a8\u6587\u4ef6\u7c7b\u578b<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pool rbd&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;username admin<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;krbd<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;nodes base03,base02<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u6dfb\u52a0\u8ba4\u8bc1<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;mkdir \/etc\/pve\/priv\/ceph<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;scp xx<a href=\"https:\/\/my.oschina.net\/qhe9\" target=\"_blank\" rel=\"noreferrer noopener\">@xx<\/a>:xx\/ceph.client.admin.keyring .\/<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u66f4\u6539ceph.client.admin.keyring\u7684\u540d\u5b57\uff0c\u6539\u4e3a\uff1aID+.keyring<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u4f8b\u521b\u5efa\u4e00\u4e2aID\u662fceph\u7684storage \uff0c\u6587\u4ef6\u547d\u540d\u4e3aceph.keyring<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u5230\u4e9b\u754c\u9762\u4e0a\u5c31\u53ef\u4ee5\u770b\u5230\u8fd9\u4e2astorage\u7684\u4e00\u4e9b\u72b6\u6001\u4e86<br>\u66f4\u6362\u7f51\u7edc\u73af\u5883(\u6362ip)<br>&nbsp; &nbsp; vi \/etc\/network\/interfaces<br>&nbsp;&nbsp; &nbsp;vi \/etc\/hosts<br>&nbsp;&nbsp; &nbsp;&gt; .ss\/know_hosts<br>&nbsp;&nbsp; &nbsp;vi \/var\/lib\/pve-cluster\/config.db (\u91cd\u8981)<br>&nbsp;&nbsp; &nbsp;\u67e5\u770b \/etc\/pve\/corosync.conf\u662f\u6b63\u786e\u7684<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>\u6587\u4ef6<br>&nbsp;&nbsp; &nbsp;\/etc\/pve\/corosync.conf &nbsp;\u8bb0\u5f55\u5404\u8282\u70b9\u7684\u4fe1\u606f\uff0c\u5982\u679c\u4e0d\u5c5e\u4e8e\u67d0\u4e2a\u8282\u70b9\uff0c\u4e0d\u4f1a\u6709\u8fd9\u4e2a\u6587\u4ef6<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;nodelist<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u8fd9\u91cc\u662f\u771f\u6b63\u7684\u8282\u70b9\u8054\u5408\u8282\u70b9\u4fe1\u606f<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u6709\u65f6\u5019pvecm node\u547d\u4ee4\u8f93\u51fa\u7684\u4fe1\u606f\u4e0d\u5bf9\uff0c\u5c31\u8981\u770b\u8fd9\u91cc\uff0cpvecm node\u7684\u4fe1\u606f\u5982\u679c\u6ca1\u6709\u66f4\u65b0\uff0c\u76ee\u524d\u53ea\u6709\u91cd\u542f\u89e3\u51b3<br>&nbsp;&nbsp; &nbsp;\/etc\/pve\/node\/** &nbsp;\u4e0b\u9762\u662f\u5168\u8282\u70b9\u7684\u4e00\u4e9b\u6587\u4ef6\uff0cpve-ssl.key\u662f\u8ba4\u8bc1\u6587\u4ef6\uff0c\u6ca1\u6709\u8fd9\u4e2a\u6587\u4ef6\u4f1a\u767b\u9646\u4e0d\u4e0aweb\u754c\u9762\u6216\u8005\u96c6\u7fa4\u65e0\u6cd5\u64cd\u4f5c\u8fd9\u4e2a\u8282\u70b9<br>&nbsp;&nbsp; &nbsp;\/etc\/pve\/authkey.pub &nbsp;\u8fd9\u4e2a\u662f\u5bc6\u94a5\u6587\u4ef6\uff0c\u6bcf\u4e2a\u8282\u70b9\u4e0a\u90fd\u548c\u96c6\u7fa4\u7684\u670d\u52a1\u5668\u6587\u4ef6\u5185\u5bb9\u4e00\u6837<br>&nbsp;&nbsp; &nbsp;\/etc\/pve\/storage.cfg &nbsp;\u5b58\u50a8\u8bbe\u5907\u8bb0\u5f55\u6587\u4ef6<\/p>\n\n\n\n<p>\u9519\u8bef\uff1a<br>&nbsp;&nbsp; &nbsp;\u521a\u521b\u5efa\u542f\u52a8\u865a\u62df\u673a\u5b89\u88c5\u7684\u65f6\u5019\u63d0\u793a\uff1a<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Proxmox Error: start failed: command &#8216;\/usr\/bin\/kvm&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u89e3\u51b3\u628akvm\u865a\u62df\u5316\u53bb\u6389\uff1aProxmox&gt;Options&gt; KVM hardware virtualization = No<br>&nbsp;&nbsp; &nbsp;\u52a0\u5165\u96c6\u7fa4\u63d0\u793aauthentication key already exists<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\u53ef\u7528pvecm add 192.168.20.20 -force &nbsp; -force\u5f3a\u5236\u8986\u76d6\u52a0\u5165\u8282\u70b9\uff0c\u7136\u540e\/etc\/init.d\/pve-cluster restart<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Proxmox VE\u662f\u4e00\u4e2a\u7cfb\u7edf\uff0c\u4e13\u95e8\u7528\u4f5c\u7ba1\u7406\u865a\u62df\u673ahttp:\/\/pve.proxmox.com\/wiki\/Do [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"_links":{"self":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/551"}],"collection":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=551"}],"version-history":[{"count":3,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/551\/revisions"}],"predecessor-version":[{"id":554,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/551\/revisions\/554"}],"wp:attachment":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}