Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

Skip to main content

My Subscriptions

Loading

Knowledge Base

Configuring a VMkernel port and enable vMotion via command line (1006989)

Last Updated: 2/14/2016Categories: How toTotal Views: 101175Language:
Chinese (Simplified)Portuguese (European)JapaneseSpanishEnglish

2 like this article

Subscribe to get an email
newsletter with new updates

2 people found this helpful Please provide article feedback:

Details

VMware recommends using VirtualCenter and Virtual Infrastructure Client (VI Client) for provisioning virtual switches. For more information, see the ESX Administration Guide.

For the purpose of troubleshooting or if you lack a GUI, the command line interface can be utilized to provision virtual switches.

This article provides commands for creating and modifying the VMkernel port.

The VMkernel layer 3 TCP/IP stack handles traffic for the following ESX host services:

VMware vMotion

iSCSI

NFS

Note: VMware recommends using isolated network for iSCSI.

Solution

Create a VMkernelPort on vSwitch via the command line:

esxcfg-vmknic --add --ip=x.x.x.x --netmask=x.x.x.x portgroup

esxcfg-vmknic --enable portgroup

Example:

esxcfg-vswitch –l (List vSwitch)

esxcfg-vswitch –a vSwitch1 (Create vSwitch)

esxcfg-vswitch –A “ISCSI” vSwitch1 (Create port group)

esxcfg-vmknic -a -i 10.10.10.33 -n 255.255.255.0 ISCSI (Assign IP)

esxcfg-vmknic –l (List VMkernelPort)

Note: You can have more than one VMkernel on one vSwitch. However, the primary default gateway of the Management VMkernel is used for all the subsequent VMkernel(s).

If you are unable to set the VMkernel gateway because there are no VMkernel interfaces on the same network, see Unable to set VMkernel gateway as there are no VMkernel interfaces on the same network (1002662).

If you are unable to rename VMkernel port, see Unable to rename or delete a VMkernel Portgroup after upgrading to ESX 3.5 (1003933).

Enable vMotion on vSwitch via the command line:

Enable a VirtualNic to be used as the vMotion NIC.

Enable and Disable vMotion via SSH connection without VirtualCenter (for ESX/ESXi 3.x use vmware-vim-cmd command)

vim-cmd hostsvc/vmotion/vnic_set [vnic]

vim-cmd hostsvc/vmotion/vnic_set vmk0

Disabling vMotion Port:

vim-cmd hostsvc/vmotion/vnic_unset [vnic]

vim-cmd hostsvc/vmotion/vnic_unset vmk0

Check vSwitch vMotion configuration:

vim-cmd hostsvc/vmotion/netconfig_get

The output appears similar to:

[root@esxserver root]# vim-cmd hostsvc/vmotion/netconfig_get

(vim.host.VMotionSystem.NetConfig) {

dynamicType = <unset>,

candidateVnic = (vim.host.VirtualNic) [

(vim.host.VirtualNic) {

dynamicType = <unset>,

device = "vmk0",

key = "key-vim.host.VirtualNic-vmk0",

portgroup = "ISCSI",

spec = (vim.host.VirtualNic.Specification) {

dynamicType = <unset>,

ip = (vim.host.IpConfig) {

dynamicType = <unset>,

dhcp = false,

ipAddress = "xx.xx.xx.xx",

subnetMask = "255.255.255.0",

},

mac = "xx:xx:xx:xx:xx:xx",

},

port = <unset>,

}

],

selectedVnic = <vim.host.VirtualNic:key-vim.host.VirtualNic-vmk0>,

}

Note: If you see this line, vMotion is enabled.

<vim.host.VirtualNic:key-vim.host.VirtualNic-vmk0>

Additional Information
For translated versions of this article, see:

Español: Configurar un puerto VMkernel y habilitar vMotion a través de línea de comando (2035304)

Português: Como configurar uma porta do VMkernel e habilitar o vMotion através de linha de comando (2037204)

日本語: コマンド ライン経由の VMkernel ポートの構成および vMotion の有効化 (2078641)

简体中文: 通过命令行配置 VMkernel 端口并启用 vMotion (2076602)

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)Portuguese (European)JapaneseSpanishEnglish

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

VMware ESX Server

Related Versions:

VMware vSphere ESXi 5.1

VMware vSphere ESXi 5.0

VMware ESXi 4.1.x Installable

VMware ESXi 4.1.x Embedded

VMware ESXi 4.0.x Installable

VMware ESXi 4.0.x Embedded

VMware ESXi 3.5.x Installable

VMware ESXi 3.5.x Embedded

VMware ESX Server 3.5.x

VMware ESX 4.1.x

VMware ESX 4.0.x

view all

Take Our Survey

Was this article helpful?

YES

NO

Copyright © 2005-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

Terms of Use

Your California Privacy Rights

Privacy

Accessibility

Cookie Settings

Support Assistant