差異處
這裏顯示兩個版本的差異處。
osprovision:kickstart:vmware_esxi:debug_commands [2020/02/20 16:09] tony |
osprovision:kickstart:vmware_esxi:debug_commands [2023/06/25 09:48] |
||
---|---|---|---|
行 1: | 行 1: | ||
- | {{tag>esxi Os_Provision}} | ||
- | ====== VMWare ESXI Provision - Debug常用指令 ====== | ||
- | ===== Network Related Command ===== | ||
- | List vmknic info: | ||
- | <code bash> | ||
- | 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 --enable-dhcpv6=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> | ||
- | ===== SSH Service ===== | ||
- | Enable SSH,登入時不需要輸入密碼: (refer [[https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002866|link]]) | ||
- | <code bash> | ||
- | /etc.init.d/SSH start | ||
- | </code> | ||
- | ===== List Process with command line ===== | ||
- | <code bash> | ||
- | ~ # ps -c | grep 3600 | ||
- | 36101 36101 sleep sleep 3600 | ||
- | 41757 41757 grep grep 3600 | ||
- | </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~~ |