6.5
Table Of Contents
- vSphere Command-Line Interface Concepts and Examples
- Contents
- About This Book
- vSphere CLI Command Overviews
- Introduction
- List of Available Host Management Commands
- Targets and Protocols for vCLI Host Management Commands
- Supported Platforms for vCLI Commands
- Commands with an esxcfg Prefix
- ESXCLI Commands Available on Different ESXi Hosts
- Trust Relationship Requirement for ESXCLI Commands
- Using ESXCLI Output
- Connection Options for vCLI Host Management Commands
- Connection Options for DCLI Commands
- vCLI Host Management Commands and Lockdown Mode
- Managing Hosts
- Managing Files
- Managing Storage
- Introduction to Storage
- Examining LUNs
- Detach a Device and Remove a LUN
- Reattach a Device
- Working with Permanent Device Loss
- Managing Paths
- Managing Path Policies
- Scheduling Queues for Virtual Machine I/O
- Managing NFS/NAS Datastores
- Monitor and Manage FibreChannel SAN Storage
- Monitoring and Managing Virtual SAN Storage
- Monitoring vSphere Flash Read Cache
- Monitoring and Managing Virtual Volumes
- Migrating Virtual Machines with svmotion
- Configuring FCoE Adapters
- Scanning Storage Adapters
- Retrieving SMART Information
- Managing iSCSI Storage
- iSCSI Storage Overview
- Protecting an iSCSI SAN
- Command Syntax for esxcli iscsi and vicfg-iscsi
- iSCSI Storage Setup with ESXCLI
- iSCSI Storage Setup with vicfg-iscsi
- Listing and Setting iSCSI Options
- Listing and Setting iSCSI Parameters
- Enabling iSCSI Authentication
- Set Up Ports for iSCSI Multipathing
- Managing iSCSI Sessions
- Managing Third-Party Storage Arrays
- Managing Users
- Managing Virtual Machines
- Managing vSphere Networking
- Introduction to vSphere Networking
- Retrieving Basic Networking Information
- Troubleshoot a Networking Setup
- Setting Up vSphere Networking with vSphere Standard Switches
- Setting Up Virtual Switches and Associating a Switch with a Network Interface
- Retrieving Information About Virtual Switches
- Adding and Deleting Virtual Switches
- Checking, Adding, and Removing Port Groups
- Managing Uplinks and Port Groups
- Setting the Port Group VLAN ID
- Managing Uplink Adapters
- Adding and Modifying VMkernel Network Interfaces
- Managing VMkernel Network Interfaces with ESXCLI
- Add and Configure an IPv4 VMkernel Network Interface with ESXCLI
- Add and Configure an IPv6 VMkernel Network Interface with ESXCLI
- Managing VMkernel Network Interfaces with vicfg-vmknic
- Add and Configure an IPv4 VMkernel Network Interface with vicfg-vmknic
- Add and Configure an IPv6 VMkernel Network Interface with vicfg-vmknic
- Setting Up vSphere Networking with vSphere Distributed Switch
- Managing Standard Networking Services in the vSphere Environment
- Setting the DNS Configuration
- Manage an NTP Server
- Manage the IP Gateway
- Setting Up IPsec
- Manage the ESXi Firewall
- Monitor VXLAN
- Monitoring ESXi Hosts
- Index
Option Description
-t|--transceiver-type=<str>
Selects transceiver type. The following transceiver types are available.
n
external
n
internal
-w|--wake-on-lan=<str>
Sets Wake-on-LAN options. Not all devices support this option. The option
value is a string of characters specifying which options to enable.
n
p – Wake on phy activity
n
u – Wake on unicast messages
n
m – Wake on multicast messages
n
b – Wake on broadcast messages
n
a – Wake on ARP
n
g – Wake on MagicPacket
n
s – Enable SecureOn password for MagicPacket
4 (Optional) Bring the uplink adapter back up.
esxcli <conn_options> network nic up --nic-name=vmnic0
Specifying Multiple Uplinks with ESXCLI
At any time, one port group NIC array and a corresponding set of active uplinks exist. When you change the
active uplinks, you also change the standby uplinks and the number of active uplinks.
The following example illustrates how active and standby uplinks are set.
1 The port group NIC array is [vmnic1, vmnic0, vmnic3, vmnic5, vmnic6, vmnic7] and active-uplinks
is set to three uplinks - vmnic1, vmnic0, vmnic3. The other uplinks are standby uplinks.
2 You set the active uplinks to a new set [vmnic3, vmnic5].
3 The new uplinks override the old set. The NIC array changes to [vmnic3, vmnic5, vmnic6, vmnic7].
vmnic0 and vmnic1 are removed from the NIC array and max-active becomes 2.
If you want to keep vmnic0 and vmnic1 in the array, you can make those NICs standby uplinks in the
command that changes the active uplinks.
esxcli network vswitch standard portgroup policy failover set -p testPortgroup --active-uplinks
vmnic3,vmnic5 --standby-uplinks vmnic1,vmnic0,vmnic6,vmnic7
Manage Uplink Adapters with vicfg-nics
You can use vicfg-nics to manage uplink adapters.
The following example workow lists an uplink adapter's properties, changes the duplex and speed, and
sets the uplink to autonegotiate its speed and duplex seings. Specify one of the options listed in
“Connection Options for vCLI Host Management Commands,” on page 19 in place of <conn_options>.
Procedure
1 List seings.
vicfg-nics <conn_options> -l
This command lists the uplinks in the system, their current and congured speed, and their duplex
seing.
2 Set the seings for vmnic0 to full and the speed to 100.
vicfg-nics <conn_options> -d full -s 100 vmnic0
3 Set vmnic2 to autonegotiate its speed and duplex seings.
vicfg-nics <conn_options> -a vmnic2
Chapter 9 Managing vSphere Networking
VMware, Inc. 143