差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
osprovision:kickstart:vmware_esxi:debug_commands [2020/02/20 13:43] tony [Network Related Command] |
osprovision:kickstart:vmware_esxi:debug_commands [2023/06/25 09:48] (目前版本) |
||
---|---|---|---|
行 2: | 行 2: | ||
====== VMWare ESXI Provision - Debug常用指令 ====== | ====== VMWare ESXI Provision - Debug常用指令 ====== | ||
===== Network Related Command ===== | ===== Network Related Command ===== | ||
+ | 在pure IPv6環境下,可以使用以下cmd去避免dhcp取不到而發生錯誤的情形: | ||
+ | <code bash> | ||
+ | esxcfg-vmknic -U V4 "Management Network" | ||
+ | </code> | ||
+ | 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 -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: | Show NIC info: | ||
<code bash> | <code bash> | ||
- | localcli network nic list | + | [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> | </code> | ||
Show IP: | Show IP: | ||
<code bash> | <code bash> | ||
- | ~ # esxcfg-vmknic -l | + | [root@localhost:~] esxcfg-vmknic -l |
- | Interface Port Group/DVPort IP Family IP Address Netmask Broadcast MAC Address MTU TSO MSS Enabled Type | + | 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.25 255.255.0.0 10.146.255.255 0c:c4:7a:45:09:6e 1500 65535 true DHCP | + | 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 |
- | vmk0 Management Network IPv6 fe80::ec4:7aff:fe45:96e 64 0c:c4:7a:45:09:6e 1500 65535 true STATIC, PREFERRED | + | |
- | vmk0 Management Network IPv6 2001:db8:0:f102:ec4:7aff:fe45:96e 64 0c:c4:7a:45:09:6e 1500 65535 true AUTOCONF, PREFERRED | + | |
</code> | </code> | ||
===== SSH Service ===== | ===== SSH Service ===== | ||
行 29: | 行 60: | ||
localcli hardware pci list | localcli hardware pci list | ||
</code> | </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~~ |