{"id":2500,"date":"2021-10-14T15:29:27","date_gmt":"2021-10-14T22:29:27","guid":{"rendered":"https:\/\/www.xh86.me\/?p=2500"},"modified":"2021-10-14T15:29:27","modified_gmt":"2021-10-14T22:29:27","slug":"vsphere%e5%91%bd%e4%bb%a4%e5%8f%82%e6%95%b0%e4%bd%bf%e7%94%a8%e5%ad%a6%e4%b9%a0%e4%b8%80%e8%a7%88","status":"publish","type":"post","link":"https:\/\/www.xh86.me\/?p=2500","title":{"rendered":"vSphere\u547d\u4ee4\u53c2\u6570\u4f7f\u7528\u5b66\u4e60\u4e00\u89c8"},"content":{"rendered":"<p><strong>0x00 \u524d\u8a00\u63cf\u8ff0<\/strong><\/p>\n<p>\u63cf\u8ff0:VMware\u57fa\u7840\u8bbe\u65bd\u4e0a\u9700\u8981\u7684\u66f4\u591a\u865a\u62df\u5316\u7ba1\u7406\uff0c\u5173\u952e\u5728\u4e8e\u4efb\u52a1\u7684\u81ea\u52a8\u5316;\u867d\u7136VMware ESX\u4e3b\u673a\u53ef\u4ee5\u7ba1\u7406\u4e0evSphere\u5ba2\u6237\u7aef\u7528\u6237\u754c\u9762\uff0c\u6570\u636e\u4e2d\u5fc3\u7ba1\u7406\u5458\u5f80\u5f80\u559c\u6b22\u767b\u5f55\u5230VMware\u670d\u52a1\u63a7\u5236\u53f0\u548c\u4f7f\u7528ESX\u547d\u4ee4\u884c\u6765\u89e3\u51b3\uff0c\u5982\u7f51\u7edc\u914d\u7f6e\u95ee\u9898\u6216\u91cd\u65b0\u914d\u7f6e\u4e3b\u673a\u3002<\/p>\n<p>\u5173\u4e8eLinux\u7684\u800c\u4e00\u4e9b\u57fa\u7840\u547d\u4ee4\u6211\u5c31\u4e0d\u8bf4\u4e86\uff0c\u672c\u6587\u4e3b\u8981\u9488\u5bf9\u4e8e\u3000VMware ESX\u548cESXI\u7684\u7279\u5b9a\u547d\u4ee4\u8fdb\u884c\u8bb2\u89e3<\/p>\n<ul>\n<li>VMware ESX\u548cESXi\u7684\u547d\u4ee4\u53ef\u4ee5\u8fd0\u884c\u5728ESX\u670d\u52a1\u63a7\u5236\u53f0\uff08\u672c\u5730\u6216\u8fdc\u7a0b\u4f7f\u7528Secure Shell\uff09\u6216RCLI\uff08\u5728VMware Infrastructure 3\uff09\u548cvSphere CLI\u7684\uff08\u5728vSphere\uff09<\/li>\n<li>\u5728RCLI\u548cvSphere CLI\u4e2d \u6ce8\u610f\u5230\u5f88\u591a\u547d\u4ee4\u5df2\u66f4\u540d\u4e3avicfg\uff0c\u800c\u4e0d\u662fesxcfg -\uff08\u5373esxcfg &#8211; nics.pl\u548cvicfg &#8211; nics.pl\uff09,\u4e24\u4e2a\u547d\u4ee4\u90fd\u6267\u884c\u76f8\u540c\u7684\u529f\u80fd\u4f46VMware\u8bd5\u56fe\u4eceesxcfg\u8fc1\u79fb\u5230vicfg\u3002<\/li>\n<\/ul>\n<p><strong>0x01 \u5e38\u7528\u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u7531\u4e8e\u91c7\u7528\u4e86\u501f\u9274Linux\u7684\u5185\u6838(\u5b98\u65b9\u8bf4\u662f\u81ea\u7814\u5185\u6838),\u4f46\u662f\u4e0d\u5f00\u653e\u6e90\u4ee3\u7801\u8c01\u77e5\u9053\u5462\uff0c\u5176\u7cfb\u7edf\u5e26\u6709Linux\u5185\u6838\u76f8\u5173\u5473\u9053\uff0c\u5176\u91c7\u7528\u4e86BusyBox\u5de5\u5177\u7bb1\u91cc\u9762\u653e\u7f6e\u4e86\u5e38\u89c1\u7684Linux\u547d\u4ee4;<\/p>\n<p>EXSi \u64cd\u4f5c\u7cfb\u7edf\u547d\u4ee4\u4e00\u89c8:<\/p>\n<p># Linux\u5de5\u5177\u4e09\u5de8\u5934\u547d\u4ee4\u67e5\u627e\uff0c\u663e\u793a\u548c\u641c\u7d22\u6587\u4ef6\u3002<\/p>\n<p>find #\u627e\u51fa\u5177\u4f53\u7684\u6587\u4ef6<\/p>\n<p>grep #\u5728\u62fc\u63a5\u7684\u6240\u6709\u6587\u4ef6\u4e2d\u627e\u5230\u6240\u9700\u6587\u672c<\/p>\n<p>awk #\u5b57\u7b26\u5206\u5272\u4e0e\u6b63\u5219\u5339\u914d<\/p>\n<p># \u6587\u4ef6\u5185\u5bb9<\/p>\n<p>cat #\u663e\u793a\u6587\u4ef6\u5185\u5bb9<\/p>\n<p>tail #\u663e\u793a\u4e00\u4e2a\u6587\u672c\u7684\u6700\u540e\u90e8\u5206\u7684\u6587\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u8f93\u51fa\u5230\u76d1\u63a7\u5b9e\u65f6\u6587\u4ef6\u3001<\/p>\n<p>nano #\u7f16\u8f91\u6587\u672c\u6587\u4ef6(\u65b0\u624b\u63a8\u8350)<\/p>\n<p>vi #\u7f16\u8f91\u6587\u672c\u6587\u4ef6<\/p>\n<p># \u7528\u6237\u4e0e\u8fdb\u7a0b\u6743\u9650<\/p>\n<p>su #\u7528\u6237\u5207\u6362<\/p>\n<p>sudo #\u547d\u4ee4\u6743\u9650\u63a7\u5236\u548c\u9632\u6b62root\u5e10\u6237\u88ab\u4f7f\u7528<\/p>\n<p># \u8fdb\u7a0b\u670d\u52a1\u7ba1\u7406<\/p>\n<p>service #\u53ef\u4ee5\u542f\u52a8\u3001\u505c\u6b62\u548c\u91cd\u65b0\u542f\u52a8\u4e3b\u673a\u670d\u52a1\u5668\u4e0a\u7684\u670d\u52a1\uff08\u6216\u7a0b\u5e8f\uff09\u5e38\u89c1\u7684ESX\u670d\u52a1\u5305\u62ecMGMT\u7684\u548cVMware\u3001vmware-vpxa\u3001firewall\u3001vmware-hostd\u548cvmware Web Access\u3002<\/p>\n<p>ps #\u8fdb\u7a0b\u670d\u52a1\u67e5\u770b<\/p>\n<p>kill #\u5f3a\u884c\u7ec8\u6b62VM\u8fdb\u7a0b<\/p>\n<p># \u78c1\u76d8\u4e0e\u6587\u4ef6\u7cfb\u7edf\u67e5\u770b<\/p>\n<p>df #\u6587\u4ef6\u7cfb\u7edf\u663e\u793a(\u5b58\u50a8\u9ed8\u8ba4VMFS-5\u683c\u5f0f,\u7cfb\u7edf\u9ed8\u8ba4\u662fvfat\u683c\u5f0f)<\/p>\n<p>vdf #\u663e\u793a\u6587\u4ef6\u7cfb\u7edf\uff08\u5206\u533a\uff09\u7684\u8d44\u6599\uff0c\u5305\u62ec\u81ea\u7531\u7a7a\u95f4\u3002<\/p>\n<p># \u57fa\u672c\u7684\u7f51\u7edc\u6545\u969c\u6392\u9664\u547d\u4ee4<\/p>\n<p>ping #\u901a\u4fe1\u67e5\u770b<\/p>\n<p>vmkping #<\/p>\n<p># \u7cfb\u7edf\u914d\u7f6e\u5e38\u7528\u547d\u4ee4<\/p>\n<p>ntpq #\u4f7f\u7528 NTP Query \u5b9e\u7528\u7a0b\u5e8f ntpq \u8fdc\u7a0b\u67e5\u8be2 ESXi\/ESX \u4e3b\u673a\u7684 ntpd \u670d\u52a1\u3002<\/p>\n<p># ESXi \u670d\u52a1\u505c\u6b62\u4e0e\u91cd\u542f<\/p>\n<p>shutdown.sh<\/p>\n<p>services.sh {start,stop,restart}<\/p>\n<p>#####################<\/p>\n<p># VMware ESX\u548cESXi\u547d\u4ee4<\/p>\n<p>#####################<\/p>\n<p>vmware #ESXI\u76f8\u5173\u7248\u672c\u897f\u6089\u5c3c<\/p>\n<p>vmware-cmd # \u8d1f\u8d23\u7ba1\u7406\u548c\u68c0\u7d22\u865a\u62df\u673a\u4fe1\u606f\u3002\u5b83\u53ef\u4ee5\u6539\u53d8\u865a\u62df\u673a\u7535\u6e90\u72b6\u6001\u3001\u7ba1\u7406\u5feb\u7167\u3001\u6ce8\u518c\u548c\u6ce8\u9500\u7684\u7528\u6237\uff0c\u5e76\u68c0\u7d22\u548c\u8bbe\u7f6e\u5404\u79cd\u865a\u62df\u673a\u7684\u4fe1\u606f\u3002 \uff086.0\u6ca1\u6709\uff09<\/p>\n<p>vim-cmd #VMware\u7684vim &#8211; cmd\u662f\u4e00\u79cd\u903b\u8f91\u7684vimsh\uff0c\u80fd\u591f\u7b80\u5316vimsh\uff0c\u65e0\u9700\u77e5\u9053\u5f88\u591a\u524d\u7aef\u4ea4\u6362\u547d\u4ee4\u3002<\/p>\n<p>vmkfstools #\u53ef\u7528\u4e8e\u590d\u5236\u3001\u8f6c\u6362\u3001\u91cd\u547d\u540d\u3001\u8f93\u5165\u3001\u8f93\u51fa\u548c\u8c03\u6574\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u7684\u5927\u5c0f\u3002<\/p>\n<p>vm-support #\u4e00\u4e2a\u5f3a\u5927\u7684\u4fe1\u606f\u6536\u96c6\u5de5\u5177\uff0c\u5e38\u7528\u4e8e\u6545\u969c\u6392\u9664\u3002\u8be5\u547d\u4ee4\u6536\u96c6\u5927\u91cf\u4fe1\u606f\u3001\u65e5\u5fd7\u6587\u4ef6\uff0c\u5e76\u628a\u5f88\u591a\u547d\u4ee4\u4ee5\u5355\u4e00\u7684tgz\u5b58\u6863\u6587\u4ef6\u65b9\u5f0f\u8f93\u51fa\u3002\u5b83\u4e5f\u53ef\u4ee5\u7528\u6765\u663e\u793aVM\u7684\u4fe1\u606f\u4ee5\u53ca\u505c\u6b62\u6ca1\u6709\u54cd\u5e94\u7684\u865a\u62df\u673a\u3002<\/p>\n<p>esxtop #\u5b83\u63d0\u4f9b\u5b9e\u65f6\u7684CPU\u3001\u5185\u5b58\u3001\u786c\u76d8\u548c\u7f51\u7edc\u4f7f\u7528\u7684\u5386\u53f2\u8868\u73b0\u7684\u7edf\u8ba1\u6570\u5b57\u3002<\/p>\n<p>esxcfg-nics #\u89c2\u5bdf\u548c\u914d\u7f6e\u7269\u7406\u7f51\u7edc\u63a5\u53e3\u5361\uff08NIC\uff09\u3002\u5b83\u663e\u793a\u7f51\u5361\u72b6\u6001\u548c\u914d\u7f6e\u7684\u901f\u5ea6\u548c\u5168\u53cc\u5de5\u7f51\u5361\u3002<\/p>\n<p>esxcfg-vswitch #\u663e\u793a\u548c\u914d\u7f6e\u865a\u62df\u4ea4\u6362\u673a\u3002\u5b83\u662f\u5728vSphere\u4e0d\u80fd\u4f7f\u7528\u7f51\u7edc\u4e2d\u6709\u7528\u7684\u914d\u7f6e\u5ba2\u6237\u7aef\u3002\u8be5\u547d\u4ee4\u7528\u4e8e\u914d\u7f6e\u7aef\u53e3\u7ec4\u548c\u8fde\u63a5\u7269\u7406\u7f51\u5361\uff08\u79f0\u4e3a\u4e0a\u884c\uff09\u914d\u7f6e\u865a\u62df\u5c40\u57df\u7f51ID\uff0c\u601d\u79d1\u534f\u8bae\uff08CDP\uff09\u548cvswitch\u4e2d\u7684MTU\u3002<\/p>\n<p>esxcfg-vmknic #\u914d\u7f6eVMkernel\u7f51\u7edc\u63a5\u53e3\uff0c\u8fd9\u662fVMotion\u548c\u8fde\u63a5\u5230iSCSI\u548c\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\u7684\u7f51\u7edc\u5b58\u50a8\u8bbe\u5907\u6240\u5fc5\u8981\u7684\u3002<\/p>\n<p>esxupdate #\u66f4\u65b0ESX\u548cESXi\u4e3b\u673a\u548c\u6253\u8865\u4e01\u3002 Esxupdate\u7528\u4e8eESX\u670d\u52a1\u63a7\u5236\u53f0\u548cvihostupdate\uff0c\u901a\u8fc7RCLI \/ vSphere CLI\u4f7f\u7528\u3002\u6b64\u5916\uff0cvihostupdate35\u662f\u7528\u6765\u4fee\u8865ESX\u548cESXi 3.5\u7248\u4e3b\u673a\u3002<\/p>\n<p>svmotion #$RCLI\/vSphere CLI\u547d\u4ee4\u7528\u4e8e\u53d1\u8d77Storage VMotion\u7684\u8fc1\u79fb\u865a\u62df\u673a\u865a\u62df\u78c1\u76d8\u5230\u53e6\u4e00\u4e2a\u6570\u636e\u5b58\u50a8\u7a7a\u95f4\u3002\u6b64\u547d\u4ee4\u7684ESX 3.5\u7248\u672c\u662f\u552f\u4e00\u542f\u52a8SVMotion\u7684\u65b9\u6cd5\uff0c\u52a0\u4e0avSphere\u5ba2\u6237\u7aef\u7684GUI\uff0cvSphere\u80fd\u505a\u5230\u8fd9\u4e00\u70b9\u3002<\/p>\n<p>esxcfg-mpath #\u663e\u793a\u548c\u8bbe\u7f6e\u4e00\u53f0\u4e3b\u673a\u4ece\u6240\u6709\u8def\u5f84\u5230\u8fbe\u5b83\u7684\u5b58\u50a8\u8bbe\u5907\u3002<\/p>\n<p>Esxcfg-rescan #\u8ba9\u4e3b\u673a\u4ea7\u751f\u4e00\u4e2a\u7279\u5b9a\u7684\u5b58\u50a8\u9002\u914d\u5668\uff0c\u7528\u6765\u53d1\u73b0\u65b0\u7684\u5b58\u50a8\u8bbe\u5907\u3002\u8fd9\u662f\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\uff0c\u5b58\u50a8\u8bbe\u5907\u5df2\u88ab\u6dfb\u52a0\uff0c\u5220\u9664\u6216\u4ece\u5b58\u50a8\u7f51\u7edc\u6539\u53d8\u3002<\/p>\n<p>esxcfg-ipsec #\u663e\u793a\u4fe1\u606f\u548c\u914d\u7f6e\u5185\u7f6e\u7684\u9632\u706b\u5899\u4fdd\u62a4ESX\u670d\u52a1\u63a7\u5236\u53f0<\/p>\n<p>esxcfg-info #\u547d\u4ee4\u63d0\u4f9b\u4e86\u6709\u5173\u8fd0\u884c\u4e2d\u7684\u4e3b\u673a\u4fe1\u606f\u3002\u5b83\u53ef\u4ee5\u91cd\u65b0\u5b9a\u5411\u5230\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u8bb0\u5f55\u4e3b\u673a\u914d\u7f6e\u3002<\/p>\n<p>#6.0\u6ca1\u6709\u7684\u547d\u4ee4<\/p>\n<p>esxcfg-firewall<\/p>\n<p>esxcfg-vswif #\u5141\u8bb8\u60a8\u67e5\u770b\u548c\u914d\u7f6evSwitches\u7279\u6b8a\u7684\u7aef\u53e3\u7ec4,\u914d\u7f6e\u7684ESX\u670d\u52a1\u63a7\u5236\u53f0\u7f51\u7edc\u63a5\u53e3\uff0c\u5b83\u4e5f\u88ab\u79f0\u4e3avswif\u6e2f\u53e3\u3002<\/p>\n<p>Esxcfg-auth #\u5728ESX\u4e3b\u673a\u4e0a\u914d\u7f6e\u670d\u52a1\u63a7\u5236\u53f0\u9a8c\u8bc1,\u5b83\u53ef\u4ee5\u914d\u7f6e\u7b2c\u4e09\u65b9LDAP\u6216Active Directory\u670d\u52a1\u5668\u7684\u8eab\u4efd\u9a8c\u8bc1\u5e76\u8bbe\u7f6e\u591a\u4e2a\u672c\u5730\u5b89\u5168\u9009\u9879\u3002<\/p>\n<p><strong>0x01 \u57fa\u7840\u547d\u4ee4<\/strong><\/p>\n<p><strong>vmware \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u663e\u793a\u5f53\u524dEXSI\u4e3b\u673a\u7684\u76f8\u5173\u7248\u672c\u4fe1\u606f<\/p>\n<p>[[email protected]:~] vmware -vl<\/p>\n<p>VMware ESXi 6.0.0 build-3620759<\/p>\n<p>VMware ESXi 6.0.0 Update 2<\/p>\n<p><strong>vmkping \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:Ping\u901a\u8fc7\u53d1\u9001Internet\u63a7\u5236\u6d88\u606f\u534f\u8bae\u6570\u636e\u5305\u6d4b\u8bd5\u4e0e\u5176\u4ed6\u4e3b\u673a\u548c\u7f51\u7edc\u8bbe\u5907\u7684\u7f51\u7edc\u8fde\u63a5\u3002 Vmkping\u662fVMware\u7684Ping\u547d\u4ee4\u7684\u7279\u5b9a\u7248\u672c,\u5b83\u4f7f\u7528\u7684IP VMkernel\u53bbPing\u53e6\u4e00\u4e2aESX\u4e3b\u673a\u7684VMkernel\u7aef\u53e3\u3002\u6b64\u547d\u4ee4\u6709\u52a9\u4e8e\u89e3\u51b3VMotion\u548c\u7f51\u7edc\u5b58\u50a8\u7684\u95ee\u9898\u3002<\/p>\n<p>\u57fa\u7840\u793a\u4f8b:<\/p>\n<p>#1.\u5176\u4e2d x.x.x.x \u662f\u8981 ping \u7684\u670d\u52a1\u5668\u7684\u4e3b\u673a\u540d\u6216 IP \u5730\u5740\u3002<\/p>\n<p>$vmkping 127.0.0.1<\/p>\n<p># PING 127.0.0.1 (127.0.0.1): 56 data bytes<\/p>\n<p># 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.024 ms<\/p>\n<p>#2.\u5982\u679c\u73af\u5883\u4e2d\u914d\u7f6e\u4e86\u5de8\u578b\u5e27\uff0c\u8bf7\u5728\u8fd0\u884c vmkping \u547d\u4ee4\u65f6\u5305\u542b -s \u548c -d \u9009\u9879\u3002<\/p>\n<p>$vmkping -d -s 8972 127.0.0.1<\/p>\n<p># PING 127.0.0.1 (127.0.0.1): 8972 data bytes<\/p>\n<p># 8980 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.034 ms<\/p>\n<p>#3.5.1\u7248\u672c\u4e2d\u4f7f\u7528 -I \u9009\u9879\u6307\u5b9a\u8981\u5c06\u54ea\u4e2a vmkernel \u7aef\u53e3\u7528\u4e8e\u4f20\u51fa ICMP \u6d41\u91cf\uff1a<\/p>\n<p>[[email protected]:~] esxcfg-vmknic -l<\/p>\n<p>Interface Port Group\/DVPort\/Opaque Network IP Family IP Address Netmask Broadcast MAC Address MTU TSO MSS Enabled Type NetStack<\/p>\n<p>vmk0 Management Network IPv4 192.168.1.188 255.255.255.0 192.168.1.255 64:00:6a:6c:14:ca 1500 65535 true STATIC defaultTcpipStack<\/p>\n<p>vmk0 Management Network IPv6 fe80::6600:6aff:fe6c:14ca 64 64:00:6a:6c:14:ca 1500 65535 true STATIC, PREFERRED defaultTcpipStack<\/p>\n<p>[[email protected]:~] vmkping -I vmk0 192.168.1.201<\/p>\n<p>PING 192.168.1.201 (192.168.1.201): 56 data bytes<\/p>\n<p>64 bytes from 192.168.1.201: icmp_seq=0 ttl=62 time=0.620 ms<\/p>\n<p>64 bytes from 192.168.1.201: icmp_seq=1 ttl=62 time=0.637 ms<\/p>\n<p>#4.\u5728 vSphere 5.5 \u4e2d\uff0cVXLAN \u5177\u6709\u5176\u81ea\u5df1\u7684 vmkernel \u7f51\u7edc\u5806\u6808\uff0c\u56e0\u6b64\u5fc5\u987b\u4f7f\u7528\u4ee5\u4e0b\u4efb\u4e00\u8bed\u53e5\u4ece ESXi \u63a7\u5236\u53f0\u6267\u884c\u5bf9\u4f20\u8f93 VLAN \u4e2d\u4e24\u4e2a\u4e0d\u540c vmknic \u4e4b\u95f4\u7684 ping \u8fde\u63a5\u6027\u6d4b\u8bd5\uff1a<\/p>\n<p>vmkping ++netstack=vxlan &lt;vmknic IP&gt; -d -s &lt;packet size&gt;<\/p>\n<p>[[email protected]:~] vmkping ++netstack=vxlan 127.0.0.1 -d -s 64<\/p>\n<p>Killed<\/p>\n<p><strong>\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong><\/p>\n<ul>\n<li>\u5982\u679c\u53d1\u73b0 ping \u64cd\u4f5c\u51fa\u73b0\u95f4\u6b47\u6027\u6210\u529f\uff0c\u53ef\u80fd\u8868\u660e vMotion \u7aef\u53e3\u4e0a\u7684\u7ed1\u5b9a\u7f51\u5361\u4e2d\u5b58\u5728\u4e0d\u517c\u5bb9\u7684\u7f51\u5361\u3002\u8bf7\u9009\u62e9\u517c\u5bb9\u7684\u7f51\u5361\u8fdb\u884c\u7ed1\u5b9a\uff0c\u6216\u5c06\u5176\u4e2d\u4e00\u4e2a\u7f51\u5361\u8bbe\u7f6e\u4e3a\u5907\u7528 (standby)\u3002<\/li>\n<li>\u5982\u679c\u7528\u670d\u52a1\u5668\u4e3b\u673a\u540d\u6267\u884c ping \u547d\u4ee4\u65f6\u6ca1\u6709\u770b\u5230\u54cd\u5e94\uff0c\u8bf7\u4f7f\u7528 IP \u5730\u5740\u6267\u884c ping \u547d\u4ee4\u3002\u5bf9 IP \u5730\u5740\u542f\u52a8 ping \u64cd\u4f5c\uff0c\u53ef\u4ee5\u5224\u65ad\u6545\u969c\u662f\u5426\u7531\u4e3b\u673a\u540d\u89e3\u6790\u95ee\u9898\u6240\u5f15\u8d77\u3002\u5982\u679c\u8981\u6d4b\u8bd5\u5230\u53e6\u4e00\u4e2a\u670d\u52a1\u5668\u4e0a\u7684\u53e6\u4e00\u4e2a VMkernel \u7aef\u53e3\u7684\u8fde\u63a5\uff0c\u8bf7\u8c28\u8bb0\u8981\u4f7f\u7528 VMkernel \u7aef\u53e3\u7684 IP \u5730\u5740\uff0c\u56e0\u4e3a\u670d\u52a1\u5668\u7684\u4e3b\u673a\u540d\u901a\u5e38\u4f1a\u89e3\u6790\u81f3\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u670d\u52a1\u63a7\u5236\u53f0\u5730\u5740<\/li>\n<\/ul>\n<p><strong>estop \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u5b83\u63d0\u4f9b\u5b9e\u65f6\u7684CPU\u3001\u5185\u5b58\u3001\u786c\u76d8\u548c\u7f51\u7edc\u4f7f\u7528\u7684\u5386\u53f2\u8868\u73b0\u7684\u7edf\u8ba1\u6570\u5b57\u3002\u4e0elinux\u4e2dtop\u5f02\u66f2\u540c\u5de5\u4e4b\u5999\uff1b<\/p>\n<p>$ estop<\/p>\n<p>5:02:37am up 35 days 10:28, 570 worlds, 8 VMs, 30 vCPUs; CPU load average: 0.17, 0.17, 0.17<\/p>\n<p>PCPU USED(%): 9.4 8.5 9.9 6.4 10 9.7 8.5 8.1 AVG: 8.8<\/p>\n<p>PCPU UTIL(%): 11 9.7 10 7.7 11 10 9.7 8.6 AVG: 9.9<\/p>\n<p>CORE UTIL(%): 18 16 18 16 AVG: 17<\/p>\n<p>ID GID NAME NWLD %USED %RUN %SYS %WAIT %VMWAIT %RDY %IDLE %OVRLP %CSTP<\/p>\n<p>3443044 3443044 K8S-Master-211 9 17.12 18.15 0.16 896.85 0.00 1.60 387.85 0.11 0.00<\/p>\n<p><strong>vim-cmd \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:Vimsh\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u4ea4\u4e92\u5f0f\u6846\u67b6\uff0c\u6709\u5f88\u591a\u5141\u8bb8\u6267\u884c\u7684\u547d\u4ee4\uff0c\u4ee5\u53ca\u5177\u5907\u663e\u793a\u548c\u914d\u7f6e\u80fd\u529b,\u800cvim-cmd\u662f\u662f\u4e00\u79cd\u903b\u8f91\u7684vimsh\uff0c\u80fd\u591f\u7b80\u5316vimsh\uff0c\u65e0\u9700\u77e5\u9053\u5f88\u591a\u524d\u7aef\u4ea4\u6362\u547d\u4ee4\u3002<\/p>\n<p># \u67e5\u770b\u53ef\u7528\u547d\u4ee4<\/p>\n<p>[[email protected]:~] vim-cmd hostsvc\/<\/p>\n<p>Commands available under hostsvc\/:<\/p>\n<p># \u8fdb\u5165\u6216\u8005\u9000\u51fa\u7ef4\u62a4\u6a21\u5f0f<\/p>\n<p>vim-cmd \/hostsvc\/maintenance_mode_enter<\/p>\n<p>vim-cmd \/hostsvc\/maintenance_mode_exit<\/p>\n<p><strong>esxcfg-info \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u63d0\u4f9b\u4e86\u6709\u5173\u8fd0\u884c\u4e2d\u7684\u4e3b\u673a\u4fe1\u606f,\u5b83\u53ef\u4ee5\u91cd\u65b0\u5b9a\u5411\u5230\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u8bb0\u5f55\u4e3b\u673a\u914d\u7f6e\u5373\u5bfc\u51fa\u4e3axml\u6216\u8005perl\u89e3\u6790\u683c\u5f0f\u3002<\/p>\n<p>\u57fa\u7840\u4fe1\u606f:<\/p>\n<p>#\u4e3b\u673a\u4fe1\u606f<\/p>\n<p>$ esxcfg-info | more<\/p>\n<p>+Host :<\/p>\n<p>\\==+Hardware Info :<\/p>\n<p>|&#8212;-BIOS UUID&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;0x4c 0x4c 0x45 0x44 0x0 0x57 0x30 0x10 0x80 0x42 0xb3 0xc0 0x4f 0x38 0x38 0x32<\/p>\n<p>|&#8212;-Product Name&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;Precision T1700<\/p>\n<p>|&#8212;-Vendor Name&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.Dell Inc.<\/p>\n<p>|&#8212;-Serial Number&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..3W0B882<\/p>\n<p>|&#8212;-Hardware Uptime&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;3066504523329<\/p>\n<p>|&#8212;-Ipmi Supported&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.false<\/p>\n<p>\\==+PCI Info :<\/p>\n<p>#\u4ee5\u7279\u5b9a\u7684\u683c\u5f0f\u8fdb\u884c\u6253\u5370<\/p>\n<p>$ esxcfg-info -s -F xml<\/p>\n<p><strong>vm-support \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u8be5\u547d\u4ee4\u6536\u96c6\u5927\u91cf\u4fe1\u606f\u3001\u65e5\u5fd7\u6587\u4ef6\uff0c\u5e76\u628a\u5f88\u591a\u547d\u4ee4\u4ee5\u5355\u4e00\u7684tgz\u5b58\u6863\u6587\u4ef6\u65b9\u5f0f\u8f93\u51fa<\/p>\n<p>#\u5e38\u7528\u4e8e\u6545\u969c\u6392\u9664,\u5b83\u53ef\u4ee5\u8fdb\u884c\u4fe1\u606f\u6536\u96c6<\/p>\n<p>[[email protected]:~] vm-support<\/p>\n<p>06:42:45: Creating \/var\/tmp\/esx-localhost-2019-12-06&#8211;06.42.tgz<\/p>\n<p>06:43:05: Gathering output from \/usr\/sbin\/localcli &#8211;plugin-dir \/usr\/lib\/vmware\/esxcli\/int systemInternal coredump06:43:05: Gathering output from \/usr\/sbin\/vmkerrcode -l<\/p>\n<p>[[email protected]:~] ls -lah \/var\/tmp\/esx-localhost-2019-12-06&#8211;06.42.tgz<\/p>\n<p>-rwx&#8212;&#8212; 1 root root 67.8M Dec 6 06:46 \/var\/tmp\/esx-localhost-2019-12-06&#8211;06.42.tgz<\/p>\n<p><strong>esxupdate \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:ESX\u548cESXi\u4e3b\u673a\u548c\u6253\u8865\u4e01, Esxupdate \u7528\u4e8eESX\u670d\u52a1\u63a7\u5236\u53f0\u548cvihostupdate\u901a\u8fc7RCLI \/ vSphere CLI\u4f7f\u7528\u3002\u6b64\u5916vihostupdate35\u662f\u7528\u6765\u4fee\u8865ESX\u548cESXi 3.5\u7248\u4e3b\u673a\u3002<\/p>\n<p>[[email protected]:~] esxupdate<\/p>\n<p>Options:<\/p>\n<p>-h, &#8211;help show this help message and exit<\/p>\n<p>&#8211;HA HA mode only, required<\/p>\n<p>####<\/p>\n<p><strong>0x02 \u78c1\u76d8\u7ba1\u7406<\/strong><\/p>\n<p><strong>df \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u8be5\u4e0d\u4f1a\u663e\u793a\u865a\u62df\u673a\u6587\u4ef6\u7cfb\u7edf\uff08VMFS\uff09\u5377\uff0c\u56e0\u4e3a\u5b83\u65e0\u6cd5\u9605\u8bfb\u3002<\/p>\n<p>[[email protected]:~] df -h<\/p>\n<p>Filesystem Size Used Available Use% Mounted on<\/p>\n<p>VMFS-5 931.2G 574.3G 356.9G 62% \/vmfs\/volumes\/ds5<\/p>\n<p>VMFS-5 465.5G 421.5G 44.0G 91% \/vmfs\/volumes\/ds2<\/p>\n<p>VMFS-5 465.5G 264.3G 201.2G 57% \/vmfs\/volumes\/ds3<\/p>\n<p>VMFS-5 458.2G 301.1G 157.2G 66% \/vmfs\/volumes\/ds1<\/p>\n<p>vfat 285.8M 202.6M 83.2M 71% \/vmfs\/volumes\/40b466b0-95e35fd0-0d26-64006a6c14ca<\/p>\n<p>vfat 249.7M 170.9M 78.8M 68% \/vmfs\/volumes\/ec0dcc7f-6713c574-0f64-2a38ec4ed097<\/p>\n<p>vfat 4.0G 29.1M 4.0G 1% \/vmfs\/volumes\/40b466b2-b745fce4-2631-64006a6c14ca<\/p>\n<p>vfat 249.7M 16.0K 249.7M 0% \/vmfs\/volumes\/40f32077-1ca96d84-254b-6fcc7ff43ff7<\/p>\n<p><strong>vdf \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u8be5\u547d\u4ee4\u7684VMware\u7684\u7248\u672c\uff0c\u8fd9\u4e5f\u5c06\u663e\u793aVMFS\u5377\u7684\u4fe1\u606f\u3002df\u4e0evdf\u547d\u4ee4\u90fd\u53ef\u4ee5\u4f7f\u7528H\u53d8\u6362\uff0c\u53ef\u7528\u6613\u8bfb\u7684\u5f62\u5f0f\u663e\u793a\u3002\uff08\u53732 GB \u800c\u4e0d\u662f2016044\uff09<\/p>\n<p>[[email protected]:~] $vdf -h<\/p>\n<p>Tardisk Space Used<\/p>\n<p>sb.v00 139M 139M<\/p>\n<p>s.v00 315M 315M<\/p>\n<p>lsi_mr3.v00 280K 277K<\/p>\n<p>lsi_msgp.v00 460K 456K<\/p>\n<p>bnxtnet.v00 412K 408K<\/p>\n<p>net_tg3.v00 300K 298K<\/p>\n<p>&#8212;&#8211;<\/p>\n<p>Ramdisk Size Used Available Use% Mounted on<\/p>\n<p>root 32M 240K 31M 0% &#8212;<\/p>\n<p>etc 28M 224K 27M 0% &#8212;<\/p>\n<p>opt 32M 0B 32M 0% &#8212;<\/p>\n<p>var 48M 452K 47M 0% &#8212;<\/p>\n<p>tmp 256M 4K 255M 0% &#8212;<\/p>\n<p>iofilters 32M 0B 32M 0% &#8212;<\/p>\n<p>hostdstats 303M 5M 297M 1% &#8212;<\/p>\n<p># resource pool view \uff08\u8d44\u6e90\u6c60\u67e5\u770b\uff09<\/p>\n<p>[[email protected]:~] $vdf -ph<\/p>\n<p>&#8212;&#8211;<\/p>\n<p>Ramdisk Min Max Used Sure avl Maybe avl Peak used<\/p>\n<p>root 32M 32M 240K 31M 31M 240K<\/p>\n<p>etc 28M 28M 224K 27M 27M 256K<\/p>\n<p>opt 0B 32M 0B 0B 32M 0B<\/p>\n<p>var 5M 48M 452K 4M 47M 516K<\/p>\n<p>tmp 2M 256M 4K 1M 255M 296K<\/p>\n<p>iofilters 0B 32M 0B 0B 32M 0B<\/p>\n<p>hostdstats 0B 303M 5M 0B 297M 5M<\/p>\n<p><strong>vmkfstools \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u865a\u62df\u78c1\u76d8\u5de5\u5177\u88ab\u6bd4\u505a\u865a\u62df\u78c1\u76d8\u4e2d\u7684\u745e\u58eb\u519b\u5200\uff0c\u53ef\u7528\u4e8e\u590d\u5236\u3001\u8f6c\u6362\u3001\u91cd\u547d\u540d\u3001\u8f93\u5165\u3001\u8f93\u51fa\u548c\u8c03\u6574\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u7684\u5927\u5c0f\u3002<\/p>\n<p>\u524d\u9762\u6211\u4eec\u8bb2\u89e3\u865a\u62df\u78c1\u76d8\u7c7b\u578b\uff1a<\/p>\n<ul>\n<li>\u539a\u7f6e\u5907 \u5ef6\u8fdf\u7f6e\u96f6 \uff08\u9ed8\u8ba4\u9009\u9879\uff09\uff1a\u521b\u5efa\u8fc7\u7a0b\u4e2d\u4e3a\u865a\u62df\u78c1\u76d8\u5206\u914d\u6240\u9700\u7a7a\u95f4\u3002\u521b\u5efa\u65f6\u4e0d\u4f1a\u64e6\u9664\u7269\u7406\u8bbe\u5907\u4e0a\u4fdd\u7559\u7684\u4efb\u4f55\u6570\u636e\uff0c\u4f46\u662f\u4ee5\u540e\u4ece\u865a\u62df\u673a\u9996\u6b21\u6267\u884c\u5199\u64cd\u4f5c\u65f6\u4f1a\u6309\u9700\u8981\u5c06\u5176\u7f6e\u96f6 \uff1b<\/li>\n<li>\u539a\u7f6e\u5907 \u7f6e\u96f6 : \u521b\u5efa\u652f\u6301\u7fa4\u96c6\u529f\u80fd\u7684\u539a\u78c1\u76d8,\u5728\u521b\u5efa\u65f6\u4e3a\u865a\u62df\u78c1\u76d8\u5206\u914d\u6240\u9700\u7684\u7a7a\u95f4,\u521b\u5efa\u4e2d\u4f1a\u5c06\u7269\u7406\u8bbe\u5907\u4e0a\u4fdd\u7559\u6570\u636e\u7f6e\u96f6\u3002\u521b\u5efa\u6240\u9700\u7684\u65f6\u95f4\u53ef\u80fd\u4f1a\u6bd4\u521b\u5efa\u5176\u4ed6\u7c7b\u578b\u7684\u78c1\u76d8\u957f\u3002<\/li>\n<li>\u7cbe\u7b80\u7f6e\u5907: \u4f7f\u7528\u8be5\u78c1\u76d8\u6700\u521d\u6240\u9700\u8981\u7684\u6570\u636e\u5b58\u50a8\u7a7a\u95f4,\u7b80\u5355\u7684\u8bf4\u5c31\u662f\u5f53\u524d\u78c1\u76d8\u6709\u591a\u5927\u7684\u6570\u636e\u5c31\u5b58\u50a8\u5360\u7528\u78c1\u76d8\u591a\u5927\u7684\u7a7a\u95f4\uff0c\u5b58\u5728\u4e00\u4e2a\u95ee\u9898\u7cbe\u7b80\u914d\u7f6e\u53ea\u589e\u957f\u4e0d\u6536\u7f29\uff1b<\/li>\n<\/ul>\n<p>vmdk\u6709\u4e24\u79cd\u6587\u4ef6\u7c7b\u578b:<\/p>\n<ul>\n<li>\u865a\u62df\u673a\u540d.vmdk,\u6587\u4ef6\u5f88\u5c0f,\u5b58\u653e\u4e86\u865a\u62df\u78c1\u76d8\u7684\u4e00\u4e9b\u914d\u7f6e\u4fe1\u606f(\u5982\u865a\u62df\u78c1\u76d8\u6570\u636e\u6587\u4ef6\u7b49)\uff1b<\/li>\n<li>\u865a\u62df\u673a\u540d-flat.vmdk,\u5b9e\u9645\u6570\u636e\u90fd\u5b58\u653e\u5728flat.vmdk\u6587\u4ef6\u4e2d\u8f6c\u6362\u65f6\u9700\u8981\u4f7f\u7528vmdk\u6587\u4ef6\u800c\u4e0d\u662fflat.vmdk\u6587\u4ef6<\/li>\n<\/ul>\n<p>\u8bed\u6cd5\u547d\u4ee4:<\/p>\n<p>#1.\u865a\u62df\u78c1\u76d8\u7c7b\u578b\u8f6c\u6362\uff08thick to thin\uff09<\/p>\n<p>vmkfstools -i &lt;source-disk-name.vmdk&gt;-d {thin|thick} &lt;destination-disk-name.vmdk&gt;<\/p>\n<p># -i &lt;source-disk-name.vmdk&gt; \u53c2\u6570 :\u539fvmdk\u78c1\u76d8\u540d<\/p>\n<p># -d {thin|thick}&lt;destination-disk-name.vmdk&gt; :\u76ee\u6807\u78c1\u76d8\u7684\u683c\u5f0f thin\u6216thick; &lt;destination-disk-name.vmdk&gt;\u4e3a\u8981\u751f\u6210\u7684\u76ee\u6807vmdk\u78c1\u76d8\u540d;<\/p>\n<p>#2.\u66f4\u6539\u865a\u62df\u78c1\u76d8(vmdk)\u5927\u5c0f<\/p>\n<p>#\u7279\u5225\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u6b64\u865a\u62df\u673a\u5df2\u6709\u5feb\u7167\uff0c\u8bf7\u5148\u5220\u9664\u6240\u6709\u5feb\u7167\u5728\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff0c\u5426\u5219\u8fd9\u4e2aVMDK\u5c06\u51fa\u9519\uff0c\u5167\u90e8\u7684\u8d44\u6599\u4e22\u5931\u3002<\/p>\n<p>vmkfstools -X [\u65b0\u7684\u5927\u5c0f] [\u76ee\u7684vmdk\u6587\u4ef6]<\/p>\n<p>#3.\u521b\u5efafs\u865a\u62df\u78c1\u76d8\u683c\u5f0f\u53ca\u5176\u5757\u5927\u5c0f<\/p>\n<p>vmkfstools -C &#8211;createfs vmfs3<\/p>\n<p>-b &#8211;blocksize #[mMkK]<\/p>\n<p>-S &#8211;setfsname fsName<\/p>\n<p>-Z &#8211;spanfs span-partition<\/p>\n<p>-G &#8211;growfs grown-partition<\/p>\n<p>\u64cd\u4f5c\u5b9e\u4f8b:<\/p>\n<p>#1.\u865a\u62df\u673a\u6240\u5728\u7684datastore\u76ee\u5f55,\u6bcf\u4e2a\u76ee\u5f55\u4e3a\u4e00\u4e2a\u865a\u62df\u673a\/vmfs\/volumes\/datastore1<\/p>\n<p>#\u4f7f\u7528vmkfstools\u5c06\u539a\u6a21\u5f0f\u7684vmdk\u6587\u4ef6\u514b\u9686\u4e3a\u7cbe\u7b80\u7684vmdk\u78c1\u76d8\u6587\u4ef6<\/p>\n<p>vmkfstools -i converter-two.vmdk -d thin converter-two_new.vmdk #\u8f6c\u6362\u540e\u5c06\u751f\u6210\u4e24\u4e2a\u65b0\u7684vmdk\u548cflat.vmdk\u6587\u4ef6<\/p>\n<p>vmkfstools &#8211;inflatedisk \/vmfs\/volumes\/DatastoreName\/VMName\/VMName.vmdk #\u7cbe\u7b80\u7f6e\u5907\u8f6c\u6362\u81f3\u539a\u7f6e\u5907\u7f6e\u96f6<\/p>\n<p>vmkfstools &#8211;eagerzero \/vmfs\/volumes\/DatastoreName\/VMName\/VMName.vmdk #\u539a\u7f6e\u5907\u5ef6\u8fdf\u7f6e\u96f6\u8f6c\u6362\u81f3\u539a\u7f6e\u5907\u7f6e\u96f6<\/p>\n<p>#\u8f6c\u6362\u524d\u540e\u7684\u5b58\u50a8\u5927\u5c0f\u533a\u522b<\/p>\n<p>20.0G converter-two-flat.vmdk #\u539a\u7f6e\u5907 \u5ef6\u8fdf\u7f6e\u96f6<\/p>\n<p>64.0k converter-two.vmdk<\/p>\n<p>7.9G converter-two_new-flat.vmdk #\u7cbe\u7b80\u6a21\u5f0f<\/p>\n<p>64.0k converter-two_new.vmdk<\/p>\n<p>#\u5907\u4efd\u6e90vmdk\u5c06\u65b0\u751f\u6210\u7684vmdk\u548cflat.vmdk\u78c1\u76d8\u6587\u4ef6\u5206\u522b\u91cd\u547d\u540d\u4e3a\u539f\u6709\u78c1\u76d8\u540d\u79f0<\/p>\n<p>$ mv converter-two_new.vmdk converter-two.vmdk<\/p>\n<p>$ mv converter-two_new-flat.vmdk converter-two-flat.vmdk<\/p>\n<p>#\u7f16\u8f91 vmdk \u6587\u4ef6\uff0c\u786e\u4fdd # Extent description &#8220;converter-two-flat.vmdk&#8221; \u4e3a\u539f\u6709\u78c1\u76d8\u540d\u79f0<\/p>\n<p>$ cat converter-two.vmdk<\/p>\n<p># Extent description<\/p>\n<p>RW 41932416 VMFS &#8220;converter-two-flat.vmdk&#8221;<\/p>\n<p>#\u542f\u52a8\u865a\u62df\u673a\u68c0\u67e5\u662f\u5426\u5de5\u4f5c\u6b63\u5e38\uff0c\u5bf9\u6bd4\u7cbe\u7b80\u7f6e\u5907\u4e0e\u539a\u7f6e\u5907\u5927\u5c0f<\/p>\n<p>$ du -sh *500.0M converter-two-326dc793.vswp<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>#2.\u66f4\u6539\u865a\u62df\u78c1\u76d8(vmdk)\u5927\u5c0f \uff08\u4e00\u5b9a\u8981\u5220\u9664\u6240\u6709\u5feb\u7167\u8fdb\u884c\u64cd\u4f5c\uff09<\/p>\n<p>$ disk -l \/dev\/sda #\u5f53\u524d\u865a\u62df\u673a\u865a\u62df\u78c1\u76d8\u5927\u5c0f<\/p>\n<p>Disk \/dev\/sda: 21.4 GB, 21469396992 bytes<\/p>\n<p># \u5173\u95ed\u865a\u62df\u673a\uff0c\u767b\u9646ESXI\u8c03\u6574\u865a\u62df\u78c1\u76d8\u5927\u5c0f\u4e3a40G<\/p>\n<p>vmkfstools -X 40g converter-two.vmdk<\/p>\n<p># \u5f00\u542f\u865a\u62df\u673a\uff0c\u9a8c\u8bc1\u865a\u62df\u78c1\u76d8\u5927\u5c0f<\/p>\n<p>fdisk -l \/dev\/sda<\/p>\n<p>Disk \/dev\/sda: 42.9 GB, 42949672960 bytes<\/p>\n<p><strong>0x03 \u786c\u4ef6\u9a71\u52a8<\/strong><\/p>\n<p><strong>lspci \u547d\u4ee4 &#8211; \u5217\u51fa\u5f53\u524d\u7cfb\u7edfPCI\u8bbe\u5907\u4fe1\u606f<\/strong><\/p>\n<p>\u63cf\u8ff0: \u5e38\u89c1\u7684PCI\u8bbe\u5907\u6bd4\u5982\u663e\u5361\/\u7f51\u5361\/HBA\u5361\/Raid\u5361\u7b49\u7b49\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u663e\u793a\u4e00\u4e2a\u7b80\u77ed\u7684\u8bbe\u5907\u5217\u8868\uff0c\u5bf9\u4e8e\u8f93\u51fa\u7684\u67d0\u4e9b\u90e8\u5206\uff0c\u7279\u522b\u662f\u5728\u9ad8\u5ea6\u5197\u957f\u7684\u6a21\u5f0f\u4e2d\uff0c\u53ef\u80fd\u53ea\u6709\u7ecf\u9a8c\u4e30\u5bcc\u7684PCI\u9ed1\u5ba2\u624d\u80fd\u7406\u89e3\u3002<\/p>\n<p>\u6ce8\u610f:\u5bf9PCI\u914d\u7f6e\u7a7a\u95f4\u7684\u67d0\u4e9b\u90e8\u5206\u7684\u8bbf\u95ee\u9650\u5236\u5728\u8bb8\u591a\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u7684\u6839\u7528\u6237\uff0c\u56e0\u6b64lspci\u7684\u7279\u6027\u5bf9\u666e\u901a\u7528\u6237\u53ef\u7528\u6027\u662f\u6709\u9650\u7684\u3002<\/p>\n<p>\u6240\u5c5e\u8f6f\u4ef6\u5305:pciutils-3.6.4 \u8bed\u6cd5\u53c2\u6570:<\/p>\n<p># [\u57fa\u7840\u53c2\u6570]<\/p>\n<p>-m #Dump PCI device data in a backward-compatible machine readable form. See below for details.<\/p>\n<p>-mm #Dump PCI device data in a machine readable form for easy parsing by scripts. See below for details.<\/p>\n<p>-t # Show a tree-like diagram containing all buses, bridges, devices and connections between them.<\/p>\n<p>\u57fa\u7840\u793a\u4f8b:<\/p>\n<p># 1.\u663e\u793aEXSI\u4e3b\u673a\u52a0\u8f7d\u7684HBA\u5361PCI\u9002\u914d\u5668<\/p>\n<p>[[email protected]:~] lspci | grep HBA<\/p>\n<p>0000:04:00.0 Mass storage controller: LSI Dell 12Gbps SAS HBA external [vmhba3]<\/p>\n<p># 2.Linux\u4e3b\u673a\u79cd\u7684PCI\u8bbe\u5907\u4fe1\u606f<\/p>\n<p>$lspci<\/p>\n<p># 00:00.0 Host bridge: Intel Corporation 440BX\/ZX\/DX &#8211; 82443BX\/ZX\/DX Host bridge (rev 01)<\/p>\n<p># 00:01.0 PCI bridge: Intel Corporation 440BX\/ZX\/DX &#8211; 82443BX\/ZX\/DX AGP bridge (rev 01)<\/p>\n<p># 00:07.0 ISA bridge: Intel Corporation 82371AB\/EB\/MB PIIX4 ISA (rev 08)<\/p>\n<p># 00:07.1 IDE interface: Intel Corporation 82371AB\/EB\/MB PIIX4 IDE (rev 01)<\/p>\n<p># 00:07.3 Bridge: Intel Corporation 82371AB\/EB\/MB PIIX4 ACPI (rev 08)<\/p>\n<p># 00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)<\/p>\n<p># 00:0f.0 VGA compatible controller: VMware SVGA II Adapter<\/p>\n<p># 00:10.0 SCSI storage controller: LSI Logic \/ Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)<\/p>\n<p># 00:11.0 PCI bridge: VMware PCI bridge (rev 02)<\/p>\n<p># 3.Linux\u4e3b\u673aHBA\u8bbe\u5907\u8bc6\u522b\u4fe1\u606f\u67e5\u770b\u4e0e\u7cfb\u7edf\u5757\u67e5\u770b<\/p>\n<p>$lspci | grep &#8220;SAS&#8221;<\/p>\n<p># 01:00.0 RAID bus controller: Broadcom \/ LSI MegaRAID SAS-3 3108 [Invader] (rev 02)<\/p>\n<p># 04:00.0 Serial Attached SCSI controller: Broadcom \/ LSI SAS3008 PCI-Express Fusion-MPT SAS-3 (rev 02) # \u4e3b\u673a\u9002\u914d\u5668\u6807\u8bc6 04:00.0<\/p>\n<p>$ ll \/sys\/block\/ | grep 04:00.0 # \u4e3b\u673a\u9002\u914d\u5668\u6807\u8bc6 04:00.0<\/p>\n<p>lrwxrwxrwx 1 root root 0 Sep 11 16:57 sdb -&gt; ..\/devices\/pci0000:00\/0000:00:02.0\/0000:04:00.0\/host4\/port-4:2\/end_device-4:2\/target4:0:2\/4:0:2:1\/block\/sdb\/ # \u83b7\u53d6\u5b58\u50a8\u8bbe\u5907LUN\u5377\u6620\u5c04\u5230\u4e3b\u673a\u7684\u8bbe\u5907ID 4 0 2 1<\/p>\n<p>lrwxrwxrwx 1 root root 0 Sep 11 16:57 sdc -&gt; ..\/devices\/pci0000:00\/0000:00:02.0\/0000:04:00.0\/host4\/port-4:2\/end_device-4:2\/target4:0:2\/4:0:2:2\/block\/sdc\/<\/p>\n<p>lrwxrwxrwx 1 root root 0 Sep 11 15:15 sdd -&gt; ..\/devices\/pci0000:00\/0000:00:02.0\/0000:04:00.0\/host4\/port-4:1\/end_device-4:1\/target4:0:1\/4:0:1:1\/block\/sdd\/<\/p>\n<p>lrwxrwxrwx 1 root root 0 Sep 11 15:15 sde -&gt; ..\/devices\/pci0000:00\/0000:00:02.0\/0000:04:00.0\/host4\/port-4:1\/end_device-4:1\/target4:0:1\/4:0:1:2\/block\/sde\/<\/p>\n<p># 4.\u4ee5\u6811\u5f62\u7ed3\u6784\u663e\u793a\u7cfb\u7edf\u4e2d\u7684PCI\u8bbe\u5907<\/p>\n<p>lspci -t -v| more<\/p>\n<p>-+-[0000:ff]-+-08.0 Intel Corporation Xeon E7 v4\/Xeon E5 v4\/Xeon E3 v4\/Xeon D QPI Link 0<\/p>\n<p>| +-08.2 Intel Corporation Xeon E7 v4\/Xeon E5 v4\/Xeon E3 v4\/Xeon D QPI Link 0<\/p>\n<p>| +-08.3 Intel Corporation Xeon E7 v4\/Xeon E5 v4\/Xeon E3 v4\/Xeon D QPI Link 0<\/p>\n<p>| +-09.0 Intel Corporation Xeon E7 v4\/Xeon E5 v4\/Xeon E3 v4\/Xeon D QPI Link 1<\/p>\n<p>| +-09.2 Intel Corporation Xeon E7 v4\/Xeon E5 v4\/Xeon E3 v4\/Xeon D QPI Link 1<\/p>\n<p>| +-09.3 Intel Corporation Xeon E7 v4\/Xeon E5 v4\/Xeon E3 v4\/Xeon D QPI Link 1<\/p>\n<p>\\-[0000:00]-+-00.0 Intel Corporation Xeon E7 v4\/Xeon E5 v4\/Xeon E3 v4\/Xeon D DMI2<\/p>\n<p>+-01.0-[01]&#8212;-00.0 Broadcom \/ LSI MegaRAID SAS-3 3108 [Invader]<\/p>\n<p>+-02.0-[04]&#8212;-00.0 Broadcom \/ LSI SAS3008 PCI-Express Fusion-MPT SAS-3<\/p>\n<p><strong>ethtool \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u67e5\u770b\u4f60\u7f51\u5361<\/p>\n<p>#\u67e5\u770b\u7f51\u5361\u9a71\u52a8\u4e0eesxcfg-nices\u53ef\u5f97\u66f4\u8be6\u7ec6\u7684\u7f51\u5361\u4fe1\u606f<\/p>\n<p>[[email protected]:~] ethtool -i vmnic0<\/p>\n<p>driver: tg3<\/p>\n<p>version: 3.131d.v60.4<\/p>\n<p>firmware-version: FFV20.2.17 bc 5720-v1.39<\/p>\n<p>bus-info: 0000:02:00.0<\/p>\n<p><strong>esxcfg-nics \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u89c2\u5bdf\u548c\u914d\u7f6e\u7269\u7406\u7f51\u7edc\u63a5\u53e3\u5361\uff08NIC\uff09,\u5b83\u663e\u793a\u7f51\u5361\u72b6\u6001\u548c\u914d\u7f6e\u7684\u901f\u5ea6\u548c\u5168\u53cc\u5de5\u7f51\u5361\u4f7f\u7528\u60c5\u51b5\u7684\u7b49\u4fe1\u606f\u3002<\/p>\n<p>#\u67e5\u770b\u7f51\u5361\u7f51\u5361\u76f8\u5173\u4fe1\u606f<\/p>\n<p>[[email protected]:~] esxcfg-nics -l<\/p>\n<p>Name PCI Driver Link Speed Duplex MAC Address MTU Description<\/p>\n<p>vmnic0 0000:02:00.0 tg3 Up 100Mbps Full 18:66:da:55:a8:83 1500 Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet<\/p>\n<p>vmnic1 0000:02:00.1 tg3 Down 0Mbps Half 18:66:da:55:a8:84 1500 Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet<\/p>\n<p>vmnic2 0000:03:00.0 tg3 Down 0Mbps Half 18:66:da:55:a8:85 1500 Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet<\/p>\n<p>vmnic3 0000:03:00.1 tg3 Down 0Mbps Half 18:66:da:55:a8:86 1500 Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet<\/p>\n<p><strong>esxcfg-vmknic \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:EXSI\u4e3b\u673a\u914d\u7f6eVMkernel\u7f51\u7edc\u63a5\u53e3\u8fd9\u662fVMotion\u548c\u8fde\u63a5\u5230iSCSI\u548c\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\u7684\u7f51\u7edc\u5b58\u50a8\u8bbe\u5907\u6240\u5fc5\u8981\u7684\u3002<\/p>\n<p>\u57fa\u7840\u793a\u4f8b:<\/p>\n<p># \u83b7\u53d6\u53ef\u7528 VMkernel \u7f51\u7edc\u63a5\u53e3\u7684\u5217\u8868\uff1a<\/p>\n<p>$ esxcfg-vmknic -l<\/p>\n<p>Interface Port Group\/DVPort IP Family IP Address Netmask Broadcast MAC Address MTU TSO MSS Enabled Type<\/p>\n<p>vmk0 iSCSI IPv4 10.10.10.10 255.255.255.0 10.10.10.255 00:50:56:XX:XX:64 9000 65535 true STATIC<\/p>\n<p>vmk1 Management Network IPv6 fe80::6600:6aff:fe6c:14ca 64 64:00:6a:6c:14:ca 1500 65535 true STATIC, PREFERRED defaultTcpipStack<\/p>\n<p><strong>esxcfg-vswitch<\/strong><\/p>\n<p>\u63cf\u8ff0:\u663e\u793a\u548c\u914d\u7f6e\u865a\u62df\u4ea4\u6362\u673a,\u5b83\u662f\u5728vSphere\u4e0d\u80fd\u4f7f\u7528\u7f51\u7edc\u4e2d\u6709\u7528\u7684\u914d\u7f6e\u5ba2\u6237\u7aef; \u8be5\u547d\u4ee4\u7528\u4e8e\u914d\u7f6e\u7aef\u53e3\u7ec4\u548c\u8fde\u63a5\u7269\u7406\u7f51\u5361\uff08\u79f0\u4e3a\u4e0a\u884c\uff09\u914d\u7f6e\u865a\u62df\u5c40\u57df\u7f51ID\uff0c\u601d\u79d1\u534f\u8bae\uff08CDP\uff09\u548cvswitch\u4e2d\u7684MTU\u3002<\/p>\n<p>$ esxcfg-vswitch -l<\/p>\n<p># Switch Name Num Ports Used Ports Configured Ports MTU Uplinks<\/p>\n<p># vSwitch0 1792 13 128 1500 vmnic0<\/p>\n<p># PortGroup Name VLAN ID Used Ports Uplinks<\/p>\n<p># VM Network 0 9 vmnic0<\/p>\n<p># Management Network 0 1 vmnic0<\/p>\n<p><strong>esxcfg-mpath \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u663e\u793a\u548c\u8bbe\u7f6e\u4e00\u53f0\u4e3b\u673a\u4ece\u6240\u6709\u8def\u5f84\u5230\u8fbe\u5b83\u7684\u5b58\u50a8\u8bbe\u5907\u3002<\/p>\n<p>[[email protected]:~] esxcfg-mpath -l<\/p>\n<p>sata.vmhba32-sata.0:0-t10.ATA_____TOSHIBA_MQ01ACF050____________________________<\/p>\n<p>Runtime Name: vmhba32:C0:T0:L0<\/p>\n<p>Device: t10.ATA_____TOSHIBA_MQ01ACF050_________________________________957EWA<\/p>\n<p>Device Display Name: Local ATA Disk (t10.ATA_____TOSHIBA_MQ01ACF050__________<\/p>\n<p>Adapter: vmhba32 Channel: 0 Target: 0 LUN: 0<\/p>\n<p>Adapter Identifier: sata.vmhba32<\/p>\n<p>Target Identifier: sata.0:0<\/p>\n<p>Plugin: NMP<\/p>\n<p>State: active<\/p>\n<p>Transport: sata<\/p>\n<p><strong>esxfg-rescan \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0: \u8ba9\u4e3b\u673a\u4ea7\u751f\u4e00\u4e2a\u7279\u5b9a\u7684\u5b58\u50a8\u9002\u914d\u5668\uff0c\u7528\u6765\u53d1\u73b0\u65b0\u7684\u5b58\u50a8\u8bbe\u5907\u3002\u5b58\u50a8\u8bbe\u5907\u5df2\u88ab\u6dfb\u52a0\uff0c\u5220\u9664\u6216\u4ece\u5b58\u50a8\u7f51\u7edc\u6539\u53d8\u90fd\u53ef\u4ee5\u8fdb\u884c\u626b\u63cf\u663e\u793a\uff1b<\/p>\n<p>\u57fa\u7840\u8bed\u6cd5<\/p>\n<p>esxcfg-rescan -h<\/p>\n<p>#esxcfg-rescan &lt;vmkernel SCSI adapter name&gt; #\u5176\u4e2d &lt;vmkernel SCSI adapter name&gt; \u4e3a\u8981\u91cd\u65b0\u626b\u63cf\u7684 vmhba#\u3002<\/p>\n<p>esxcfg-rescan &lt;options&gt; &lt;adapter&gt;<\/p>\n<p>-a|&#8211;add Scan for only newly added devices.<\/p>\n<p>-d|&#8211;delete Scan for only deleted devices.<\/p>\n<p>-A|&#8211;all Scan all adapters.<\/p>\n<p>-u|&#8211;update Scan existing paths only and update their state.<\/p>\n<p>-h|&#8211;help Display this message.<\/p>\n<p>\u57fa\u7840\u793a\u4f8b:<\/p>\n<p>[[email protected]:~] esxcfg-rescan -a<\/p>\n<p>Missing Adapter Name<\/p>\n<p>[[email protected]:~] esxcfg-rescan -a vmhba33<\/p>\n<p><strong>esxcfg-scsidevs \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u663e\u793a\u5b58\u50a8\u5668\u9002\u914d\u5668\u76f8\u5173\u6570\u636e\u4ee5\u53ca\u786c\u4ef6\u8bbe\u5907\u4fe1\u606f<\/p>\n<p>[[email protected]:~] esxcfg-scsidevs -a<\/p>\n<p>vmhba39 ahci link-n\/a sata.vmhba39 (0000:00:1f.2) Intel Corporation Wellsburg AHCI Controller<\/p>\n<p>vmhba0 lsi_mr3 link-n\/a sas.51866da06f803b00 (0000:01:00.0) LSI PERC H730 Mini<\/p>\n<p>vmhba1 ahci link-n\/a sata.vmhba1 (0000:00:11.4) Intel Corporation Wellsburg AHCI Controller<\/p>\n<p>vmhba3 lsi_msgpt3 link-n\/a sas.51866da091944100 (0000:04:00.0) Avago (LSI Logic) Dell 12Gbps SAS HBA external<\/p>\n<p><strong>esxcfg-module \u547d\u4ee4<\/strong><\/p>\n<p>#\u67e5\u770bRadi\u5361\u9a71\u52a8<\/p>\n<p>$ esxcfg-module -i lsi_mr3 | more<\/p>\n<p>input file: \/usr\/lib\/vmware\/vmkmod\/lsi_mr3<\/p>\n<p>License: GPLv2<\/p>\n<p>Version: 6.605.08.00-7vmw.600.1.17.3029758<\/p>\n<p>Name-space:<\/p>\n<p>Required name-spaces:<\/p>\n<p>[email protected]_3_0_0<\/p>\n<p>Parameters:<\/p>\n<p>max_sectors: int<\/p>\n<p>Maximum number of sectors per IO command<\/p>\n<p>mfiDumpFailedCmd: int<\/p>\n<p>Hex dump of failed command in driver log<\/p>\n<p>#EXSI6.5\u4e0a\u7981\u7528(disable) lsi_msgpt3<\/p>\n<p>$ esxcfg-module -d lsi_msgpt3<\/p>\n<p><strong>vmkmgmt_keyval \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u4e3b\u8981\u662f\u5bf9\u4e8e\u865a\u62df\u673a\u7684EXSI\u7ba1\u7406\u4ee5\u53ca\u786c\u4ef6\u4fe1\u606f\u67e5\u770b<\/p>\n<p>#\u67e5\u770bHBA\u5361\u56fa\u4ef6<\/p>\n<p>\/usr\/lib\/vmware\/vmkmgmt_keyval\/vmkmgmt_keyval -a<\/p>\n<p>Listing all system keys:<\/p>\n<p>Key Value Instance: lsi_msgpt3_0\/LSI<\/p>\n<p>Listing keys:<\/p>\n<p>Name: DriverVersion<\/p>\n<p>Type: string<\/p>\n<p>value: 16.00.01.00<\/p>\n<p>Name: HBAModel<\/p>\n<p>Type: string<\/p>\n<p>value: Avago (LSI) HBA 1000:97:1028:1f46<\/p>\n<p>Name: FWVersion<\/p>\n<p>Type: string<\/p>\n<p>value: Fw Rev. 09.00.09.00<\/p>\n<p>Name: ChipRevision<\/p>\n<p>Type: string<\/p>\n<p>value: Chip rev. 0x02<\/p>\n<p>Name: CtrlSASAddress<\/p>\n<p>Type: string<\/p>\n<p>value: sas.51866da091944100<\/p>\n<p>Name: CtrlStatus<\/p>\n<p>Type: string<\/p>\n<p>value: FwState 0x20000000<\/p>\n<p>Name: CtrlLoggingLevel<\/p>\n<p>Type: string<\/p>\n<p>value: logging_level(4-Bytes)=0x00000000<\/p>\n<p><strong>vmkload_mod \u547d\u4ee4<\/strong><\/p>\n<p>#EXSI\u865a\u62df\u673a\u5185\u6838\u6a21\u5757\u52a0\u8f7d\u4fe1\u606f\u67e5\u770b<\/p>\n<p>$ vmkload_mod -s lsi_msgpt3 | grep Version<\/p>\n<p>Version: 06.255.12.00-8vmw.600.1.17.3029758<\/p>\n<p><strong>0x04 \u9632\u706b\u5899<\/strong><\/p>\n<p><strong>esxcfg-ipsec \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0\uff1a\u663e\u793a\u4fe1\u606f\u548c\u914d\u7f6e\u5185\u7f6e\u7684\u9632\u706b\u5899\u4fdd\u62a4ESX\u670d\u52a1\u63a7\u5236\u53f0\u3002\u5b83\u5141\u8bb8\u548c\u963b\u6b62\u7279\u5b9a\u7684TCP \/IP\u670d\u52a1\u4e4b\u95f4\u7684\u63a7\u5236\u53f0\u548c\u5176\u4ed6\u7f51\u7edc\u8bbe\u5907\u7aef\u53e3\u3002 \u57fa\u7840\u8bed\u6cd5:<\/p>\n<p>esxcfg-ipsec<\/p>\n<p>esxcfg-ipsec &lt;options&gt;<\/p>\n<p>&#8211;add-sa \u6dfb\u52a0\u5b89\u5168\u5173\u8054 requires sa-src,sa-dst,spi, sa-mode, ealgo and ialgo<\/p>\n<p>&#8211;add-sp \u6dfb\u52a0\u5b89\u5168\u7b56\u7565, requires sp-src, src-port,<\/p>\n<p>sp-dst, dst-port, action, ulproto, dir, sp-mode<\/p>\n<p>sa-name. Specify sa-name only for unique SA, otherwise specify &#8216;auto&#8217;.<\/p>\n<p>&#8211;remove-sa Remove the given Security Association from kernel.<\/p>\n<p>&#8211;remove-sp Remove the given Security Policy from kernel.<\/p>\n<p>&#8211;flush-sa Remove all SAs<\/p>\n<p>&#8211;flush-sp Remove all SPs<\/p>\n<p>-l|&#8211;list-sa List all SAs.<\/p>\n<p>-L|&#8211;list-sp List all SPs.<\/p>\n<p>&#8211;sa-src SA source IPv6 address &lt;X:X:X:X&gt;<\/p>\n<p>&#8211;sp-src SP source IPv6 address and prefix length &lt;X:X:X::\/X&gt;<\/p>\n<p>&#8211;sa-dst SA destination IPv6 address &lt;X:X:X:X&gt;<\/p>\n<p>&#8211;sp-dst SP destination IPv6 address and prefix length &lt;X:X:X::\/X&gt;<\/p>\n<p>&#8211;src-port Source Port for SP<\/p>\n<p>&#8211;dst-port Destination Port for SP<\/p>\n<p>&#8211;ulproto Upper layer protocol for SP &lt;any|tcp|udp|icmp6&gt;<\/p>\n<p>any, tcp, udp or icmpv6<\/p>\n<p>&#8211;dir Flow direction for SP &lt;in|out&gt;<\/p>\n<p>&#8211;action Action for SP &lt;none|discard|ipsec&gt;.<\/p>\n<p>&#8211;sa-mode SA mode &lt;transport|tunnel&gt;.<\/p>\n<p>&#8211;sp-mode SP mode &lt;transport|tunnel&gt;.<\/p>\n<p>&#8211;sa-name SA name. Specify &#8216;auto&#8217; to let vmkernel automatically choose an SA.<\/p>\n<p>If no applicable SA exists, then vmkernel may request one using IKE.<\/p>\n<p>&#8211;spi SPI value for the SA.<\/p>\n<p>&#8211;ealgo Encryption algorithm for the SA &lt;null|3des-cbc|aes128-cbc&gt;.<\/p>\n<p>&#8211;ekey Encryption key (ASCII or hex). Length of hex key is dependent upon algorithm used.<\/p>\n<p>(optional if ealgo is null).<\/p>\n<p>&#8211;ialgo Integrity algorithm for the SA &lt;hmac-sha1|hmac-sha2-256&gt;.<\/p>\n<p>&#8211;ikey Integrity key (ASCII or hex). Length of hex key is dependent upon algorithm used.<\/p>\n<p>&#8211;ike-conf Pass an IKE config path to IKE daemon, this will copy the config to IKE config and restart<\/p>\n<p>\u57fa\u7840\u793a\u4f8b:<\/p>\n<p>#\u663e\u793a\u9632\u706b\u5899\u7b56\u7565\u8bbe\u7f6e<\/p>\n<p>$ esxcfg-ipsec -l<\/p>\n<p>SA Name Src Addr Dst Addr State SPI Mode Encrypt Algo Integrity Algo Lifetime<\/p>\n<p>#To add a SA(\u5b89\u5168\u5173\u8054)<\/p>\n<p>esxcfg-ipsec &#8211;add-sa &#8211;sa-src x:x:x:: &#8211;sa-dst x:x:x:: &#8211;sa-mode transport &#8211;ealgo null &#8211;spi 0x200 &#8211;ialgo hmac-sha1 &#8211;ikey key saname<\/p>\n<p>#to add a SP(\u5b89\u5168\u7b56\u7565)<\/p>\n<p>esxcfg-ipsec &#8211;add-sp &#8211;sp-src x:x::\/x &#8211;sp-dst x:x::\/x &#8211;src-port 100 &#8211;dst-port 200 &#8211;ulproto tcp &#8211;dir out &#8211;action ipsec &#8211;sp-mode transport &#8211;sa-name saname spname<\/p>\n<p>esxcfg-ipsec &#8211;add-sp &#8211;sp-src any -sp-dst any &#8211;src-port any &#8211;dst-port any &#8211;ulproto any &#8211;dir out &#8211;action ipsec &#8211;sp-mode transport &#8211;sa-name saname spname<\/p>\n<p>esxcfg-ipsec &#8211;add-sp &#8211;sp-src x:x::\/x &#8211;sp-dst x:x::\/x &#8211;src-port 100 &#8211;dst-port 200 &#8211;ulproto tcp -dir out &#8211;action discard spname<\/p>\n<p>#\u5220\u9664\u5b89\u5168\u5173\u8054\u4f55\u7b56\u7565<\/p>\n<p>esxcfg-ipsec &#8211;remove-sa saname #To delete a SA<\/p>\n<p>esxcfg-ipsec &#8211;remove-sp spname #To delete a SP<\/p>\n<p>#To delete an auto SA<\/p>\n<p>esxcfg-ipsec &#8211;remove-sa &#8211;sa-src x:x:x:: &#8211;sa-dst x:x:x:: &#8211;spi 0x300 auto<\/p>\n<p>#To flush all SPs<\/p>\n<p>esxcfg-ipsec &#8211;flush-sp<\/p>\n<p><strong>0x05 \u7ba1\u7406\u547d\u4ee4<\/strong><\/p>\n<p><strong>esxcli \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u8fd9\u662f\u4e00\u4e2a\u7ba1\u7406EXSI\u7684\u5ba2\u6237\u7aef\u7ba1\u7406\u7684\u547d\u4ee4\uff0c\u4ed6\u6709\u975e\u5e38\u4e30\u5bcc\u7684\u4e8c\u7ea7\u547d\u4ee4\u53ef\u76d1\u63a7\u7ba1\u7406EXSI\u865a\u62df\u673a;<\/p>\n<p><strong>software<\/strong><\/p>\n<p>#\u663e\u793a\u5b89\u88c5\u7684HBA\u5361\u8f6f\u4ef6\u9a71\u52a8vib\u5217\u8868<\/p>\n<p>[[email protected]:~] esxcli software vib list | grep lpfc<\/p>\n<p>lpfc 10.2.309.8-2vmw.600.0.0.2494585 VMware VMwareCertified 2016-09-07<\/p>\n<p>[[email protected]:~] esxcli software vib list | grep &#8220;msgpt3&#8221;<\/p>\n<p>lsi-msgpt3 06.255.12.00-8vmw.600.1.17.3029758 VMware VMwareCertified 2016-09-07<\/p>\n<p>lsu-lsi-lsi-msgpt3-plugin 1.0.0-1vmw.600.0.0.2494585 VMware VMwareCertified 2016-09-07<\/p>\n<p>#\u5b89\u88c5\u7f51\u5361\u6216\u8005HBA\u5361\u9a71\u52a8<\/p>\n<p>esxcli software vib install -v \/tmp\/net-i40e_2.0.7-1OEM.600.0.0.2494585.vib<\/p>\n<p>esxcli software vib install -d \/tmp\/net-i40e_2.0.7-1OEM.600.0.0.2494585.zip<\/p>\n<p>#\u79fb\u9664\u7f51\u5361\u6216\u8005HBA\u5361\u9a71\u52a8<\/p>\n<p>esxcli software vib remove -n net-i40e<\/p>\n<p>esxcli software vib remove \u2013n lsi-msgpt3<\/p>\n<p>#\u6267\u884c\u5b8c\u6210\u540e\u91cd\u542f\u751f\u6548:<\/p>\n<p>reboot<\/p>\n<p><strong>system<\/strong><\/p>\n<p># \u7cfb\u7edf\u7248\u672c\u4fe1\u606f<\/p>\n<p>$esxcli system version get<\/p>\n<p># Product: VMware ESXi<\/p>\n<p># Version: 6.0.0<\/p>\n<p># Build: Releasebuild-2494585<\/p>\n<p># Update: 0<\/p>\n<p># Patch: 0<\/p>\n<p># \u8981\u5728ESXi 6.0\u548c5.5\u4e0a\u7981\u7528lsi_msgpt3 \u6a21\u5757\u8bf7\u8fd0\u884c<\/p>\n<p>esxcli system module set &#8211;enabled=false &#8211;module=lsi_msgpt3<\/p>\n<p># \u786c\u4ef6\u4e0e\u8f6f\u4ef6\u65f6\u95f4\u8bbe\u5b9a\u4e0e\u4fe1\u606f\u67e5\u770b<\/p>\n<p># Usage: esxcli system time set [cmd options]<\/p>\n<p># Description:<\/p>\n<p># set Set the system clock time. Any missing parameters will default to the current time<\/p>\n<p># Cmd options:<\/p>\n<p># -d|&#8211;day=&lt;long&gt; Day<\/p>\n<p># -H|&#8211;hour=&lt;long&gt; Hour<\/p>\n<p># -m|&#8211;min=&lt;long&gt; Minute<\/p>\n<p># -M|&#8211;month=&lt;long&gt; Month<\/p>\n<p># -s|&#8211;sec=&lt;long&gt; Second<\/p>\n<p># -y|&#8211;year=&lt;long&gt; Year<\/p>\n<p>esxcli system time set -y 2020 -M 07 -d 12 -H 17 -m 52 -s 35<\/p>\n<p>esxcli hardware clock set -y 2020 -M 07 -d 12 -H 17 -m 52 -s 35<\/p>\n<p>esxcli system time get<\/p>\n<p><strong>storage<\/strong><\/p>\n<p>#\u8be5\u547d\u4ee4\u7c7b\u4f3c\u4e8eesxcfg-scsidevs -a\u547d\u4ee4<\/p>\n<p>[[email protected]:~] esxcli storage core adapter list<\/p>\n<p>HBA Name Driver Link State UID Capabilities Description<\/p>\n<p>&#8212;&#8212;&#8211; &#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>vmhba38 ahci link-n\/a sata.vmhba38 (0000:00:1f.2) Intel Corporation Wellsburg AHCI Controller<\/p>\n<p>vmhba39 ahci link-n\/a sata.vmhba39 (0000:00:1f.2) Intel Corporation Wellsburg AHCI Controller<\/p>\n<p>vmhba0 lsi_mr3 link-n\/a sas.51866dd06f813b00 (0000:01:00.0) LSI PERC H730 Mini<\/p>\n<p>vmhba1 ahci link-n\/a sata.vmhba1 (0000:00:11.4) Intel Corporation Wellsburg AHCI Controller<\/p>\n<p>vmhba2 ahci link-n\/a sata.vmhba2 (0000:00:1f.2) Intel Corporation Wellsburg AHCI Controller<\/p>\n<p>#\u5217\u51faESXi\u4e3b\u673a\u7684\u6240\u6709LUN\u7684\u8def\u5f84\u4fe1\u606f(\u82e5\u6302\u8f7d\u7684\u78c1\u76d8\u8f83\u591a\u6253\u5370\u4fe1\u606f\u4f1a\u8f83\u591a)<\/p>\n<p>[[email protected]:~] esxcli storage core path list<\/p>\n<p>fc.20000024ff2969e3:21000024ff2969e3-fc.500b34200ff50800:500b34200ff50803-naa.600b3428259<\/p>\n<p>e037de06fd0f2ed0000d8<\/p>\n<p>UID: fc.20000024ff2969e3:21000024ff2969e3-fc.500b34200ff50800:500b34200ff50803-naa.600<\/p>\n<p>b3428259e037de06fd0f2ed0000d8 Runtime Name: vmhba3:C0:T3:L1<\/p>\n<p>Device: naa.600b3428259e037de06fd0f2ed0000d8<\/p>\n<p>Device Display Name: MacroSAN Fibre Channel Disk (naa.600b3428259e037de06fd0f2ed0000d8<\/p>\n<p>) Adapter: vmhba3<\/p>\n<p>Channel: 0<\/p>\n<p>Target: 3<\/p>\n<p>LUN: 1<\/p>\n<p>Plugin: NMP<\/p>\n<p>State: active<\/p>\n<p>Transport: fc<\/p>\n<p>Adapter Identifier: fc.20000024ff2969e3:21000024ff2969e3<\/p>\n<p>Target Identifier: fc.500b34200ff50800:500b34200ff50803<\/p>\n<p>Adapter Transport Details: WWNN: 20:00:00:24:ff:29:69:e3 WWPN: 21:00:00:24:ff:29:69:e3<\/p>\n<p>Target Transport Details: WWNN: 50:0b:34:20:0f:f5:08:00 WWPN: 50:0b:34:20:0f:f5:08:03<\/p>\n<p>Maximum IO Size: 33553920<\/p>\n<p>#\u82e5\u8981\u67e5\u8be2LUN\u7684\u8be6\u7ec6\u8def\u5f84\u4fe1\u606f\uff0c\u53ef\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u5217\u51fa\u67d0\u4e2a\u5377\u7684\u4fe1\u606f\u3002<\/p>\n<p>[[email protected]:~] esxcli storage core path list -d naa.61866da089f2cf001fe33f1f14adc14f #\u5176\u4e2d-d\u53c2\u6570\u52a0\u4e0a\u8be5lun\u7684wwn\u53f7<\/p>\n<p>sas.51866da089f2cf00-sas.60e33f1f14adc14f-naa.61866da089f2cf001fe33f1f14adc14f<\/p>\n<p>UID: sas.51866da089f2cf00-sas.60e33f1f14adc14f-naa.61866da089f2cf001fe33f1f14adc14f<\/p>\n<p>Runtime Name: vmhba0:C2:T0:L0<\/p>\n<p>Device: naa.61866da089f2cf001fe33f1f14adc14f<\/p>\n<p>Device Display Name: DELL Serial Attached SCSI Disk (naa.61866da089f2cf001fe33f1f14adc14f)<\/p>\n<p>Adapter: vmhba0<\/p>\n<p>Channel: 2<\/p>\n<p>Target: 0<\/p>\n<p>LUN: 0<\/p>\n<p>Plugin: NMP<\/p>\n<p>State: active<\/p>\n<p>Transport: sas<\/p>\n<p>Adapter Identifier: sas.51866da089f2cf00<\/p>\n<p>Target Identifier: sas.60e33f1f14adc14f<\/p>\n<p>Adapter Transport Details: 51866da089f2cf00<\/p>\n<p>Target Transport Details: 60e33f1f14adc14f<\/p>\n<p>Maximum IO Size: 131072<\/p>\n<p># \u67e5\u8be2\u5f53\u524d\u7cfb\u7edf\u6240\u6709lun\u7684active\u7684\u8def\u5f84\u6761\u6570<\/p>\n<p># \u82e5\u8be5\u6570\u503c\u51cf\u53bb\u7cfb\u7edf\u76d8\u7684\u8def\u5f84=\u5b58\u50a8\u5206\u914d\u7684\u8def\u5f84\u6570\u91cf\uff0c\u8868\u660e\u5f53\u524d\u8bc6\u522b\u8def\u5f84\u6570\u91cf\u6b63\u786e\u3002<\/p>\n<p>[[email protected]:~] esxcli storage core path list | grep &#8220;State: active&#8221; | wc -l<\/p>\n<p>5<\/p>\n<p># \u67e5\u8be2\u5355\u72ec\u67d0\u4e2aLUN\u7684\u8def\u5f84\u7684\u6570\u91cf\uff0c\u4ee5LUN\uff1a2\u4e3a\u4f8b<\/p>\n<p>[[email protected]:~] esxcli storage core path list | grep &#8220;LUN: 2&#8221; | wc -l<\/p>\n<p>#\u5217\u51fa\u8fde\u63a5\u5230ESXi\u7684LUN\u5217\u8868<\/p>\n<p>[[email protected]:~] esxcli storage core device list<\/p>\n<p>naa.600b34236b6535ddb013d87d6d5a00d8<\/p>\n<p>Display Name: MacroSAN Fibre Channel Disk (naa.600b34236b6535ddb013d87d6d5a00d8)<\/p>\n<p>Has Settable Display Name: true<\/p>\n<p>Size: 2097152<\/p>\n<p>Device Type: Direct-Access<\/p>\n<p>Multipath Plugin: NMP<\/p>\n<p>Devfs Path: \/vmfs\/devices\/disks\/naa.600b34236b6535ddb013d87d6d5a00d8<\/p>\n<p>Vendor: MacroSAN<\/p>\n<p>Model: LU<\/p>\n<p>Revision: 1.0<\/p>\n<p>SCSI Level: 5<\/p>\n<p>Is Pseudo: false<\/p>\n<p>Status: on<\/p>\n<p>Is RDM Capable: true<\/p>\n<p>Is Local: false<\/p>\n<p>Is Removable: false<\/p>\n<p>Is SSD: false<\/p>\n<p>Is VVOL PE: false<\/p>\n<p>Is Offline: false<\/p>\n<p>Is Perennially Reserved: false<\/p>\n<p>Queue Full Sample Size: 0<\/p>\n<p>Queue Full Threshold: 0<\/p>\n<p>Thin Provisioning Status: unknown<\/p>\n<p>Attached Filters:<\/p>\n<p>VAAI Status: supported<\/p>\n<p>Other UIDs: vml.0200030000600b34236b6535ddb013d87d6d5a00d84c5500000000<\/p>\n<p>Is Shared Clusterwide: true<\/p>\n<p>Is Local SAS Device: false<\/p>\n<p>Is SAS: false<\/p>\n<p>Is USB: false<\/p>\n<p>Is Boot USB Device: false<\/p>\n<p>Is Boot Device: false<\/p>\n<p>Device Max Queue Depth: 64<\/p>\n<p>No of outstanding IOs with competing worlds: 32<\/p>\n<p>Drive Type: unknown<\/p>\n<p>RAID Level: unknown<\/p>\n<p>Number of Physical Drives: unknown<\/p>\n<p>Protection Enabled: false<\/p>\n<p>PI Activated: false<\/p>\n<p>PI Type: 0<\/p>\n<p>PI Protection Mask: NO PROTECTION<\/p>\n<p>Supported Guard Types: NO GUARD SUPPORT<\/p>\n<p>DIX Enabled: false<\/p>\n<p>DIX Guard Type: NO GUARD SUPPORT<\/p>\n<p>Emulated DIX\/DIF Enabled: false<\/p>\n<p><strong>network<\/strong><\/p>\n<p>\u63cf\u8ff0:\u63a7\u5236\u53f0\u901a\u8fc7\u5ba2\u6237\u7aef\u547d\u4ee4\u8fdb\u884c\u67e5\u770b\u6d4b\u8bd5EXSI\u7f51\u7edc\u4fe1\u606f;<\/p>\n<p>#1.VXLAN \u5177\u6709\u5176\u81ea\u5df1\u7684 vmkernel \u7f51\u7edc\u5806\u6808\uff0c\u56e0\u6b64\u5fc5\u987b\u4f7f\u7528\u4ee5\u4e0b\u4efb\u4e00\u8bed\u53e5\u4ece ESXi \u63a7\u5236\u53f0\u6267\u884c\u5bf9\u4f20\u8f93 VLAN \u4e2d\u4e24\u4e2a\u4e0d\u540c vmknic \u4e4b\u95f4\u7684 ping \u8fde\u63a5\u6027\u6d4b\u8bd5\uff1a<\/p>\n<p>esxcli network diag ping &#8211;netstack=vxlan &#8211;host &lt;vmknic IP&gt; &#8211;df &#8211;size=&lt;packet size&gt;<\/p>\n<p><strong>0x06 \u7cfb\u7edf\u914d\u7f6e<\/strong><\/p>\n<p><strong>ntpq \u547d\u4ee4<\/strong><\/p>\n<p>\u63cf\u8ff0:\u4f7f\u7528 NTP Query \u5b9e\u7528\u7a0b\u5e8f ntpq \u8fdc\u7a0b\u67e5\u8be2 ESXi\/ESX \u4e3b\u673a\u7684 ntpd \u670d\u52a1\u3002\u8be5\u5b9e\u7528\u7a0b\u5e8f\u901a\u5e38\u5b89\u88c5\u5728 Linux \u5ba2\u6237\u7aef\u4e0a\uff0c\u5728 ESX \u670d\u52a1\u63a7\u5236\u53f0\u548c vSphere Management Assistant \u4e2d\u4e5f\u63d0\u4f9b\uff1b<\/p>\n<p>\u57fa\u7840\u793a\u4f8b:<\/p>\n<p># 1.\u8981\u4f7f\u7528 NTP Query \u5b9e\u7528\u7a0b\u5e8f ntpq \u8fdc\u7a0b\u67e5\u8be2 ESX \u4e3b\u673a\u7684 NTP \u670d\u52a1 (ntpd)\uff0c\u5e76\u786e\u5b9a\u5176\u662f\u5426\u6210\u529f\u4e0e\u4e0a\u6e38 NTP \u670d\u52a1\u5668\u540c\u6b65\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<p>$ntpq -p 127.0.0.1<\/p>\n<p>remote refid st t when poll reach delay offset jitter<\/p>\n<p>==============================================================================<\/p>\n<p>*192.168.10.254 144.76.76.107 3 u 53 64 377 1.158 0.805 0.058<\/p>\n<p># \u5b57\u6bb5\u542b\u4e49\u8bf4\u660e:<\/p>\n<p>remote #\u5df2\u914d\u7f6e\u7684\u4e0a\u6e38 NTP \u670d\u52a1\u5668\u7684\u4e3b\u673a\u540d\u6216 IP \u5730\u5740\u3002<\/p>\n<p>refid #\u4e0e NTP \u670d\u52a1\u5668\u540c\u6b65\u7684\u65f6\u95f4\u6d41\u7684\u6807\u8bc6\u3002\u5982\u679c\u6536\u5230\u7684 refid \u4e3a\u201c.INIT.\u201d\uff0c\u5219\u8bf4\u660e ESXi\/ESX \u4e3b\u673a\u672a\u4ece\u5df2\u914d\u7f6e\u7684 NTP \u670d\u52a1\u5668\u6536\u5230\u54cd\u5e94\u3002<\/p>\n<p>st #Stratum \u503c\u4ee3\u8868\u4e0a\u6e38 NTP \u670d\u52a1\u5668\u7684\u5c42\u6b21\u7ed3\u6784\u3002\u503c\u8d8a\u9ad8\uff0c\u8868\u660e NTP \u670d\u52a1\u5668\u8d8a\u504f\u79bb\u6839\u65f6\u95f4\u6e90\u3002\u8fd9\u4e9b\u503c\u662f\u76f8\u5bf9\u503c\uff0c\u53ef\u4ee5\u901a\u8fc7 NTP \u670d\u52a1\u5668\u624b\u52a8\u8bbe\u7f6e\u3002<\/p>\n<p>t #\u7528\u4e8e NTP \u901a\u4fe1\u7684\u8f6f\u4ef6\u5305\u4ea4\u6362\u7c7b\u578b\u3002\u901a\u5e38\u201cu\u201d\u8868\u793a\u5355\u64ad UDP\u3002<\/p>\n<p>when #\u81ea\u4e0a\u6b21\u5c1d\u8bd5\u8f6e\u8be2\u5df2\u914d\u7f6e\u7684\u4e0a\u6e38 NTP \u670d\u52a1\u5668\u4ee5\u6765\u6240\u7ecf\u8fc7\u7684\u65f6\u95f4\uff08\u79d2\uff09\u3002<\/p>\n<p>poll #ESXi\/ESX \u4e3b\u673a\u8f6e\u8be2\u5df2\u914d\u7f6e\u7684 NTP \u670d\u52a1\u5668\u7684\u95f4\u9694\uff08\u79d2\uff09\u3002<\/p>\n<p>reach #8 \u4f4d\u516b\u8fdb\u5236 (base 8) \u7684\u79fb\u4f4d\u5bc4\u5b58\u5668\uff0c\u5728\u8fde\u63a5\u5df2\u914d\u7f6e\u7684 NTP \u670d\u52a1\u5668\u65f6\uff0c\u6bcf\u4e00\u4f4d\u4ee3\u8868\u6210\u529f (1) \u6216\u5931\u8d25 (0)\u3002\u503c 377 \u662f 11111111 (base 2)\uff0c\u6307\u51fa\u5728\u4e0a 8 \u4e2a\u8f6e\u8be2\u95f4\u9694\u671f\u95f4\uff0c\u6bcf\u4e2a\u67e5\u8be2\u5747\u5df2\u6210\u529f\u3002<\/p>\n<p>delay #\u5df2\u914d\u7f6e\u7684 NTP \u670d\u52a1\u5668\u4e0e ESXi\/ESX \u4e3b\u673a\u4e4b\u95f4\u901a\u4fe1\u7684\u5f80\u8fd4\u5ef6\u8fdf\uff08\u6beb\u79d2\uff09\u3002<\/p>\n<p>offset #\u5df2\u914d\u7f6e NTP \u670d\u52a1\u5668\u4e0e ESXi\/ESX \u4e3b\u673a\u4e4b\u95f4\u7684\u65f6\u95f4\u504f\u79fb\uff08\u6beb\u79d2\uff09\u3002\u7406\u60f3\u503c\u4e3a\u63a5\u8fd1 0 \u7684\u503c\u3002<\/p>\n<p>jitter #\u5728\u5df2\u914d\u7f6e NTP \u670d\u52a1\u5668\u7684\u65f6\u95f4\u65f6\u949f\u8109\u51b2\u4e4b\u95f4\u89c2\u5bdf\u5230\u7684\u65f6\u95f4\u6296\u52a8\u6216\u504f\u5dee\u3002\u7406\u60f3\u503c\u4e3a\u63a5\u8fd1 0 \u7684\u503c\u3002<\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0bESXi\/ESX \u4f7f\u7528 NTPv4\uff0c\u4f46\u67d0\u4e9b NTP \u6e90\u4f1a\u4f7f\u7528 NTPv3 ,\u6b64\u7c7b\u7248\u672c\u4e0d\u5339\u914d\u95ee\u9898\u5c06\u5bfc\u81f4\u540c\u6b65\u5931\u8d25\u3002\u8981\u89e3\u51b3\u6b64\u95ee\u9898\u5fc5\u987b\u66f4\u65b0 \/etc\/ntp.conf \u6587\u4ef6\u4ee5\u5305\u542b\u8981\u4f7f\u7528\u7684\u7248\u672c\u3002<\/p>\n<p>$cat \/etc\/ntp.conf<\/p>\n<p>restrict 127.0.0.1<\/p>\n<p>restrict default kod nomodify notrap<\/p>\n<p>driftfile \/etc\/ntp.drift<\/p>\n<p>server 192.168.0.10 version 3<\/p>\n<p>#\u6ce8\u610f\uff1a\u8981\u68c0\u67e5\u6700\u7ec8 ntpq \u504f\u79fb\u7684\u5ef6\u8fdf\uff0c\u53ef\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u540d\u4e3a \/var\/log\/ntp \u7684\u6587\u4ef6\u5939 `mkdir \/var\/log\/ntp`<\/p>\n<p>statistics loopstats<\/p>\n<p>statsdir \/var\/log\/ntp\/<\/p>\n<p>filegen peerstats file peers type day link enable<\/p>\n<p>filegen loopstats file loops type day link enable<\/p>\n<p><em>\u6ce8\u610f\u4e8b\u9879:<\/em><\/p>\n<ul>\n<li>\u5982\u679c\u6536\u5230\u6d88\u606f\u201cNo association ID\u2019s returned\u201d\uff0cESXi\/ESX \u4e3b\u673a\u5c06\u65e0\u6cd5\u8fde\u63a5\u5df2\u914d\u7f6e\u7684 NTP \u670d\u52a1\u5668\u3002\u5982\u679c\u6536\u5230\u6d88\u606f\u201c***Request timed out\u201d\uff0c\u5219\u8bf4\u660e ntpq \u547d\u4ee4\u672a\u4ece ESXi\/ESX \u4e3b\u673a\u7684 NTP \u5b88\u62a4\u8fdb\u7a0b\u6536\u5230\u54cd\u5e94\u3002<\/li>\n<li>\u5982\u679c\u663e\u793a\u7c7b\u4f3c\u4ee5\u4e0b\u5185\u5bb9\u7684\u6d88\u606f\uff0c\u5219\u8868\u660e ntpd \u6210\u529f\u8fde\u63a5\u5230\u8fdc\u7a0b NTP \u670d\u52a1\u5668\uff1a ntpd[263140]:synchronized to **, stratum **<\/li>\n<li>\u5982\u679c\u663e\u793a\u7c7b\u4f3c\u4ee5\u4e0b\u5185\u5bb9\u7684\u6d88\u606f\uff0c\u5219\u8868\u660e ESXi\/ESX \u4e3b\u673a\u4e0e\u8fdc\u7a0b NTP \u670d\u52a1\u5668\u4e4b\u95f4\u7684\u65f6\u95f4\u504f\u79fb\u8fc7\u9ad8\uff0c\u65e0\u6cd5\u81ea\u52a8\u66f4\u6b63\u3002\u624b\u52a8\u8bbe\u7f6e ESXi\/ESX \u4e3b\u673a\u65f6\u95f4\uff0c\u5e76\u518d\u6b21\u542f\u52a8 NTP \u5b88\u62a4\u8fdb\u7a0b\u3002 ntpd[263140]:** \u79d2\u7684\u65f6\u95f4\u66f4\u6b63\u8d85\u51fa\u5065\u5168\u6027\u9650\u5236 (1000)\uff1b\u624b\u52a8\u8bbe\u7f6e\u65f6\u949f\u4ee5\u66f4\u6b63 UTC \u65f6\u95f4\u3002<\/li>\n<li>\u5982\u679c\u663e\u793a\u7c7b\u4f3c\u4ee5\u4e0b\u5185\u5bb9\u7684\u6d88\u606f\uff0c\u5219\u8868\u660e ESXi\/ESX \u4e3b\u673a\u4e0e\u8fdc\u7a0b NTP \u670d\u52a1\u5668\u4e4b\u95f4\u7684\u65f6\u95f4\u9519\u8bef\u8d85\u51fa\u4e86\u6b65\u8fdb\u9608\u503c\u3002NTP \u5b88\u62a4\u8fdb\u7a0b\u5df2\u66f4\u6b63 ESXi\/ESX \u4e3b\u673a\u65f6\u95f4\uff0c\u4ee5\u4fbf\u5728\u4e00\u4e2a\u5927\u8df3\u8dc3\u4e2d\u4e0e NTP \u670d\u52a1\u5668\u76f8\u5339\u914d\u3002\u65e0\u9700\u6267\u884c\u4efb\u4f55\u64cd\u4f5c\u3002 ntpd[263140]:time reset &#8220;+\/- &#8220;<\/li>\n<li>\u5982\u679c\u663e\u793a\u7c7b\u4f3c\u4ee5\u4e0b\u5185\u5bb9\u7684\u6d88\u606f\uff0c\u5219\u8868\u660e ESXi\/ESX \u4e3b\u673a\u4e0e\u8fdc\u7a0b NTP \u670d\u52a1\u5668\u4e4b\u95f4\u7684\u65f6\u95f4\u9519\u8bef\u8d85\u51fa\u4e86\u6b65\u8fdb\u9608\u503c\u3002NTP \u5b88\u62a4\u8fdb\u7a0b\u5c06\u7f13\u6162\u66f4\u6b63 ESXi\/ESX \u4e3b\u673a\u7684\u65f6\u95f4\uff0c\u4ee5\u4e0e NTP \u670d\u52a1\u5668\u76f8\u5339\u914d\u3002\u65e0\u9700\u6267\u884c\u4efb\u4f55\u64cd\u4f5c\u3002 ntpd[263140]:time slew &#8220;+\/- &#8220;<\/li>\n<li>VMware \u5efa\u8bae\u4ec5\u914d\u7f6e\u4e00\u6b21\u670d\u52a1\uff08netlogond \u6216 ntp\uff09\u3002\u4f46\u662f\u5982\u679c\u9700\u8981\u5c06 NTP \u4e0e Active Directory (AD) \u7ed3\u5408\u4f7f\u7528\uff0c\u5219\u914d\u7f6e AD \u670d\u52a1\u5668\u4ee5\u4f7f\u7528\u53ef\u9760\u7684\u65f6\u95f4\u6e90\uff0c\u5e76\u914d\u7f6e ESXi\/ESX \u4e3b\u673a\u7684 NTP \u670d\u52a1\u5668\u4ee5\u4f7f\u7528\u6b64 AD \u670d\u52a1\u5668\u6216\u8005 AD \u6b63\u5728\u4f7f\u7528\u7684 NTP \u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>0x00 \u524d\u8a00\u63cf\u8ff0 \u63cf\u8ff0:VMware\u57fa\u7840\u8bbe\u65bd\u4e0a\u9700\u8981\u7684\u66f4\u591a\u865a\u62df\u5316\u7ba1\u7406\uff0c\u5173\u952e\u5728\u4e8e\u4efb\u52a1\u7684\u81ea\u52a8\u5316;\u867d\u7136VMware  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2500","post","type-post","status-publish","format-standard","hentry","category-vsphere"],"_links":{"self":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/2500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2500"}],"version-history":[{"count":1,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/2500\/revisions"}],"predecessor-version":[{"id":2501,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/2500\/revisions\/2501"}],"wp:attachment":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}