{"id":5076,"date":"2017-12-04T22:08:45","date_gmt":"2017-12-04T21:08:45","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=5076"},"modified":"2022-05-18T11:04:42","modified_gmt":"2022-05-18T09:04:42","slug":"vmware-esxi-a-incomplete-list-of-host-commands-part-5","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/vmware-esxi-a-incomplete-list-of-host-commands-part-5\/","title":{"rendered":"VMware ESXi: A (incomplete) list of host commands Part 5"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_5076 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_5076')){$('.twoclick_social_bookmarks_post_5076').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"VMware%20ESXi%3A%20A%20%28incomplete%29%20list%20of%20host%20commands%20Part%205\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Asome%20more%20commands...%0D%0A%0D%0ACapture%20Network%20Packets%20on%20the%20a%20physical%20interface%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/vmware-esxi-a-incomplete-list-of-host-commands-part-5\\\/\",\"post_id\":5076,\"post_title_referrer_track\":\"VMware+ESXi%3A+A+%28incomplete%29+list+of+host+commands+Part+5\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>some more commands&#8230;<\/p>\n<p>Capture Network Packets on the a physical interface<br \/>\n<!--more--><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\npktcap-uw --uplink vmnic0\r\n<\/pre>\n<p>List all physical nic&#8217;s<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network nic list\r\n<\/pre>\n<p>List kernel interfaces<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcfg-vmknic -l\r\n<\/pre>\n<p>Create a n Kernel interface with a specfic MAC and IP Address and add it to a portgroup <\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcfg-vmknic -a -i 192.168.254.3 -n 255.255.255.0 -M 01:12:34:56:78:90 -p PortGroupName \r\nesxcfg-vmknic -p PortGroupName -6 false\r\n<\/pre>\n<p>Or with DHCP enabled<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcfg-vmknic -a -i DHCP -M 01:12:34:56:78:90 -p PortGroupName \r\n<\/pre>\n<p>Delete an Kernel interface<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcfg-vmknic -d -p PortGroupName \r\n<\/pre>\n<p>Show routing table<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network ip route ipv4 list\r\n<\/pre>\n<p>Show arp cache<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network ip neighbor list\r\n<\/pre>\n<p>List all vSwitches<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network vswitch standard list\r\n<\/pre>\n<p>Change the physical uplink of an vSwitch<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network vswitch standard uplink remove -u vmnic0 -v vSwitch1\r\nesxcli network vswitch standard uplink add -u vmnic1 -v vSwitch1\r\n<\/pre>\n<p>Change the uplink priority of the physical adapters<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network vswitch standard portgroup policy failover set -p MyPortgroup --active-uplinks vmnic0 --standby-uplinks vSwitch1\r\n<\/pre>\n<p>List all portgroups<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network vswitch standard portgroup list\r\n<\/pre>\n<p>Add a new portgroup at the vSwitch to which the Kernel Interface should connected<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network vswitch standard portgroup add -p &quot;PG vMotion&quot; -v vSwitch0\r\n<\/pre>\n<p>Set the VLAN id<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network vswitch standard portgroup set --vlan-id 0 -p &quot;PG vMotion&quot;\r\n<\/pre>\n<p>Add a Kernel interface to the new Portgroup<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcfg-vmknic \u2013a -i 192.168.254.5 -n 255.255.255.0 &quot;PG vMotion&quot;\r\n<\/pre>\n<p>or, for example, recreating the vmk0 Kernel Interface<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network ip interface remove --interface-name=vmk0\r\nesxcli network ip interface add --interface-name=vmk0 -p &quot;Management Network&quot; -M 01:12:34:56:78:90\r\nesxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=192.168.254.5 --netmask=255.255.255.0 --type=static\r\n<\/pre>\n<p>Set Interface as Management Network<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcli network ip interface tag add -i vmk0 -t Management\r\n<\/pre>\n<p>Set Default Gateway<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nesxcfg-route -a default 192.168.254.1\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, some more commands&#8230; Capture Network Packets on the a physical interface<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[1112,1113,1115,1114,457,1143],"class_list":["post-5076","post","type-post","status-publish","format-standard","hentry","category-vmware","tag-arp-cache","tag-capture-packets-physical-interface","tag-change-physical-interface-vswitch","tag-change-uplink-vswitch","tag-esxi","tag-recreate-vmk0"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=5076"}],"version-history":[{"count":14,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5076\/revisions"}],"predecessor-version":[{"id":5181,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5076\/revisions\/5181"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=5076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=5076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=5076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}