{"id":709,"date":"2022-06-24T15:14:59","date_gmt":"2022-06-24T07:14:59","guid":{"rendered":"http:\/\/www.rchen.top\/?p=709"},"modified":"2022-06-24T15:15:00","modified_gmt":"2022-06-24T07:15:00","slug":"vmware%e7%b3%bb%e7%bb%9f%e5%90%8e%e5%8f%b0%e5%b8%b8%e7%94%a8%e5%bf%ab%e6%8d%b7%e6%8c%87%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.rchen.top\/?p=709","title":{"rendered":"VMware\u7cfb\u7edf\u540e\u53f0\u5e38\u7528\u5feb\u6377\u6307\u4ee4"},"content":{"rendered":"<p>vmware -v\u00a0\u00a0\u00a0 \u67e5\u770b\u7cfb\u7edf\u7248\u672c<\/p>\n<p>esxcli system version get\u00a0\u00a0 \u67e5\u770b\u7cfb\u7edf\u7248\u672c\u5305\u62ecpatch\u7b49\u4fe1\u606f<\/p>\n<p>esxcli system time get\u00a0 \u00a0\u67e5\u770b\u7cfb\u7edf\u65f6\u95f4<\/p>\n<p>esxcli system time set -y=2016 -M=9 -d=13 -H=10 -m=9 \u4fee\u6539\u7cfb\u7edf\u65f6\u95f4<\/p>\n<p>esxcli system maintenanceMode set &#8211;enable true\u00a0\u00a0 \u00a0ESXi\u4e3b\u673a\u8fdb\u5165\/\u9000\u51fa\uff0c\u7ef4\u62a4\u6a21\u5f0f<\/p>\n<p>esxcli system maintenanceMode get \u00a0 \/\/\u67e5\u770b\u7ef4\u62a4\u6a21\u5f0f\u7684\u72b6\u6001<\/p>\n<p>esxcli system maintenanceMode set &#8211;enable false\u00a0\u00a0\u00a0 ESXi\u4e3b\u673a\u8fdb\u5165\/\u9000\u51fa\uff0c\u7ef4\u62a4\u6a21\u5f0f<\/p>\n<p>esxcli system shutdown reboot\/poweroff \u7cfb\u7edf\u91cd\u542f\/\u5173\u673a\uff08\u5fc5\u987b\u5904\u4e8e\u7ef4\u62a4\u6a21\u5f0f\uff0c\u5426\u5219\u547d\u4ee4\u4e0d\u751f\u6548\uff09<\/p>\n<p>esxcli network ip interface ipv4 get \u67e5\u770b\u63a5\u53e3ipv4\u5730\u5740<\/p>\n<p>esxcli network ip route ipv4 list\u00a0 \u67e5\u770b\u8def\u7531\u8868<\/p>\n<p>esxcli network nic list \u00a0\u67e5\u770bESXi\u4e3b\u673a\u7f51\u5361\u5217\u8868\uff08nic\uff09\u6216up-link\u5217\u8868<\/p>\n<p>esxcli network nic down\/up -n=vmnic1 \u5173\u95ed\/\u6253\u5f00vmnic1\u63a5\u53e3<\/p>\n<p>esxcli storage core device list \u67e5\u770b\u78c1\u76d8\u5217\u8868<\/p>\n<p>esxcli storage filesystem list \u00a0\u00a0\u67e5\u770b\u5377\u4fe1\u606f<\/p>\n<p>esxcli storage vmfs extent list # \u67e5\u770b\u865a\u62df\u673a\u4f7f\u7528\u7684\u5b58\u50a8\u5377<\/p>\n<p>esxcfg-info -a # \u663e\u793a\u6240\u6709ESX\u76f8\u5173\u4fe1\u606f<\/p>\n<p>esxcfg-info -w # \u663e\u793aesx\u4e0a\u786c\u4ef6\u4fe1\u606f<\/p>\n<p>service mgmt-vmware restart # \u91cd\u65b0\u542f\u52a8vmware\u670d\u52a1<\/p>\n<p>esxcfg-vmknic -l # \u67e5\u770b\u5bbf\u4e3b\u673aIP\u5730\u5740<\/p>\n<p>esxcli hardware cpu list # cpu\u4fe1\u606f Brand\uff0cCore Speed\uff0c<\/p>\n<p>esxcli hardware cpu global get # cpu\u4fe1\u606f \uff08CPU Cores\uff09<\/p>\n<p>esxcli hardware memory get # \u5185\u5b58\u4fe1\u606f \u5185\u5b58 Physical Memory<\/p>\n<p>esxcli hardware platform get # \u786c\u4ef6\u578b\u53f7\uff0c\u4f9b\u5e94\u5546\u7b49\u4fe1\u606f,\u4e3b\u673a\u578b\u53f7,Product Name \u4f9b\u5e94\u5546,Vendor Name<\/p>\n<p>esxcli hardware clock get # \u5f53\u524d\u65f6\u95f4<\/p>\n<p>esxcli system version get # \u67e5\u770bESXi\u4e3b\u673a\u7248\u672c\u53f7\u548cbuild\u53f7<\/p>\n<p>esxcli system maintenanceMode set &#8211;enable yes # \u5c06ESXi\u4e3b\u673a\u8fdb\u5165\u5230\u7ef4\u62a4\u6a21\u5f0f<\/p>\n<p>esxcli system maintenanceMode set &#8211;enable no # \u5c06ESXi\u4e3b\u673a\u9000\u51fa\u7ef4\u62a4\u6a21\u5f0f<\/p>\n<p>esxcli system settings advanced list -d # \u5217\u51faESXi\u4e3b\u673a\u4e0a\u88ab\u6539\u52a8\u8fc7\u7684\u9ad8\u7ea7\u8bbe\u5b9a\u9009\u9879<\/p>\n<p>esxcli system settings kernel list -d # \u5217\u51faESXi\u4e3b\u673a\u4e0a\u88ab\u53d8\u52a8\u8fc7\u7684kernel\u8bbe\u5b9a\u90e8\u5206<\/p>\n<p>esxcli system snmp get | hash | set | test # \u5217\u51fa\u3001\u6d4b\u8bd5\u548c\u66f4\u6539SNMP\u8bbe\u5b9a<\/p>\n<p>esxcli vm process list # \u5229\u7528esxcli\u5217\u51faESXi\u670d\u52a1\u5668\u4e0aVMs\u7684World I(\u8fd0\u884c\u72b6\u6001\u7684)<\/p>\n<p>esxcli vm process kill -t soft -w WorldI # \u5229\u7528esxcli\u547d\u4ee4\u6740\u6389VM<\/p>\n<p>vim-cmd hostsvc\/hostsummary # \u67e5\u770b\u5bbf\u4e3b\u673a\u6458\u8981\u4fe1\u606f<\/p>\n<p>vim-cmd vmsvc\/get.datastores # \u67e5\u770b\u5bbf\u4e3b\u5b58\u50a8\u7a7a\u95f4\u4fe1\u606f<\/p>\n<p>vim-cmd vmsvc\/getallvms # \u5217\u51fa\u6240\u6709\u865a\u62df\u673a<\/p>\n<p>vim-cmd vmsvc\/power.getstate VMI # \u67e5\u770b\u6307\u5b9aVMI\u865a\u62df\u72b6\u6001<\/p>\n<p>vim-cmd vmsvc\/power.shutdown VMI # \u5173\u95ed\u865a\u62df\u673a<\/p>\n<p>vim-cmd vmsvc\/power.off VMI # \u5982\u679c\u865a\u62df\u673a\u6ca1\u6709\u5173\u95ed\uff0c\u4f7f\u7528poweroff\u547d\u4ee4<\/p>\n<p>vim-cmd vmsvc\/get.config VMI # \u67e5\u770b\u865a\u62df\u673a\u914d\u7f6e\u4fe1\u606f<\/p>\n<p>esxcli software vib install -d \/vmfs\/volumes\/datastore\/patches\/xxx.zip # \u4e3aESXi\u4e3b\u673a\u5b89\u88c5\u66f4\u65b0\u8865\u4e01\u548c\u9a71\u52a8<\/p>\n<p>esxcli network nic list # \u5217\u51fa\u5f53\u524dESXi\u4e3b\u673a\u4e0a\u6240\u6709NICs\u7684\u72b6\u6001<\/p>\n<p>esxcli network vm list # \u5217\u51fa\u865a\u62df\u673a\u7684\u7f51\u8def\u4fe1\u606f<\/p>\n<p>esxcli storage nmp device list # \u7406\u51fa\u5f53\u524dNMP\u7ba1\u7406\u4e0b\u7684\u8bbe\u5907satp\u548cpsp\u4fe1\u606f<\/p>\n<p>esxcli storage core device vaai status get # \u5217\u51fa\u6ce8\u518c\u5230PS\u8bbe\u5907\u7684VI\u72b6\u6001<\/p>\n<p>esxcli storage nmp satp set &#8211;default-psp VMW_PSP_RR &#8211;satp xxxx # \u5229\u7528esxcli\u547d\u4ee4\u5c06\u7f3a\u7701psp\u6539\u6210Round Robin<\/p>\n","protected":false},"excerpt":{"rendered":"<p>vmware -v\u00a0\u00a0\u00a0 \u67e5\u770b\u7cfb\u7edf\u7248\u672c esxcli system version get\u00a0\u00a0 \u67e5\u770b\u7cfb\u7edf\u7248\u672c\u5305 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":494,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80],"tags":[28],"class_list":["post-709","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-80","tag-vmware"],"_links":{"self":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=709"}],"version-history":[{"count":1,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/709\/revisions"}],"predecessor-version":[{"id":710,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/709\/revisions\/710"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/media\/494"}],"wp:attachment":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}