差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
osprovision:kickstart:vmware_esxi:debug_commands [2020/02/18 16:37] tony |
osprovision:kickstart:vmware_esxi:debug_commands [2020/02/28 00:16] tony |
||
---|---|---|---|
行 1: | 行 1: | ||
{{tag>esxi Os_Provision}} | {{tag>esxi Os_Provision}} | ||
====== VMWare ESXI Provision - Debug常用指令 ====== | ====== VMWare ESXI Provision - Debug常用指令 ====== | ||
- | ===== Show IP ===== | + | ===== Network Related Command ===== |
+ | 在pure IPv6環境下,可以使用以下cmd去避免dhcp取不到而發生錯誤的情形: | ||
<code bash> | <code bash> | ||
- | ~ # esxcfg-vmknic -l | + | esxcfg-vmknic -U V4 "Management Network" |
- | Interface Port Group/DVPort IP Family IP Address Netmask Broadcast MAC Address MTU TSO MSS Enabled Type | + | </code> |
- | vmk0 Management Network IPv4 10.146.176.25 255.255.0.0 10.146.255.255 0c:c4:7a:45:09:6e 1500 65535 true DHCP | + | List vmknic info: |
- | vmk0 Management Network IPv6 fe80::ec4:7aff:fe45:96e 64 0c:c4:7a:45:09:6e 1500 65535 true STATIC, PREFERRED | + | <code bash> |
- | vmk0 Management Network IPv6 2001:db8:0:f102:ec4:7aff:fe45:96e 64 0c:c4:7a:45:09:6e 1500 65535 true AUTOCONF, PREFERRED | + | localcli network vswitch standard list |
+ | localcli network ip interface list | ||
+ | </code> | ||
+ | Add vmknic: | ||
+ | <code bash> | ||
+ | localcli network vswitch standard add --vswitch-name=vSwitch1 | ||
+ | localcli network vswitch standard portgroup add --portgroup-name="VMkernel1" --vswitch-name=vSwitch1 | ||
+ | localcli network vswitch standard portgroup add --portgroup-name="VM Network1" --vswitch-name=vSwitch1 | ||
+ | localcli network vswitch standard uplink add --uplink-name=vmnic1 --vswitch-name=vSwitch1 | ||
+ | localcli network ip interface add --interface-name=vmk1 --portgroup-name=VMkernel1 | ||
+ | localcli network ip interface ipv4 set --interface-name=vmk1 --type=dhcp | ||
+ | # localcli network ip interface ipv6 set --interface-name=vmk1 -d true -r true | ||
+ | localcli network ip interface ipv6 set --interface-name=vmk1 --enable-dhcpv6=true --enable-router-adv=true | ||
+ | </code> | ||
+ | Remove vmknic: | ||
+ | <code bash> | ||
+ | localcli network ip interface remove --interface-name=vmk1 | ||
+ | localcli network vswitch standard remove --vswitch-name="vSwitch1" | ||
+ | </code> | ||
+ | Show NIC info: | ||
+ | <code bash> | ||
+ | [root@localhost:~] localcli network nic list | ||
+ | Name PCI Device Driver Admin Status Link Status Speed Duplex MAC Address MTU Description | ||
+ | -------------------------------------------------------------------------------------------------------------- | ||
+ | vmnic0 0000:03:00.0 nmlx4_en Up Down 0 Half 00:25:90:90:e2:d1 1500 Mellanox Technologies MT27500 Family [ConnectX-3] | ||
+ | vmnic1 0000:01:00.0 igbn Up Up 1000 Full 0c:c4:7a:1a:40:62 1500 Intel Corporation I350 Gigabit Network Connection | ||
+ | vmnic2 0000:01:00.1 igbn Up Up 1000 Full 0c:c4:7a:1a:40:63 1500 Intel Corporation I350 Gigabit Network Connection | ||
+ | </code> | ||
+ | Show IP: | ||
+ | <code bash> | ||
+ | [root@localhost:~] esxcfg-vmknic -l | ||
+ | Interface Port Group/DVPort/Opaque Network IP Family IP Address Netmask Broadcast MAC Address MTU TSO MSS Enabled Type NetStack | ||
+ | vmk0 Management Network IPv4 10.146.176.17 255.255.0.0 10.146.255.255 0c:c4:7a:1a:40:62 1500 65535 true DHCP defaultTcpipStack | ||
+ | |||
+ | |||
</code> | </code> | ||
===== SSH Service ===== | ===== SSH Service ===== | ||
行 16: | 行 52: | ||
===== List Process with command line ===== | ===== List Process with command line ===== | ||
<code bash> | <code bash> | ||
- | ps -c | + | ~ # ps -c | grep 3600 |
+ | 36101 36101 sleep sleep 3600 | ||
+ | 41757 41757 grep grep 3600 | ||
</code> | </code> | ||
- | + | ===== List PCI info ===== | |
+ | <code bash> | ||
+ | localcli hardware pci list | ||
+ | </code> | ||
+ | ===== Reference ===== | ||
+ | * [[https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vcli.ref.doc_50%2Fesxcli_network.html|esxcli network Commands]] | ||
+ | * [[https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vcli.migration.doc_50%2Fcos_upgrade_technote.1.7.html|Retrieving Networking Information]] | ||
===== ===== | ===== ===== | ||
---- | ---- | ||
\\ | \\ | ||
~~DISQUS~~ | ~~DISQUS~~ |