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
Linking and Unlinking Uplink Adapters with ESXCLI
You can use ESXCLI to link and unlink uplink adapters.
When you create a virtual switch by using esxcli network vswitch standard add, all trac on that virtual
switch is initially conned to that virtual switch. All virtual machines connected to the virtual switch can
talk to each other, but the virtual machines cannot connect to the network or to virtual machines on other
hosts. A virtual machine also cannot connect to virtual machines connected to a dierent virtual switch on
the same host.
Having a virtual switch that is not connected to the network might make sense if you want a group of
virtual machines to be able to communicate with each other, but not with other hosts or with virtual
machines on other hosts. In most cases, you set up the virtual switch to transfer data to external networks by
aaching one or more uplink adapters to the virtual switch.
You can use the following commands to list, add, and remove uplink adapters. When you link by using
ESXCLI, the physical NIC is added as a standby adapter by default. You can then modify the teaming policy
to make the physical NIC active by running the command esxcli network vswitch standard policy
failover set.
n
List uplink adapters.
esxcli <conn_options> network vswitch standard list
The uplink adapters are returned in the Uplink item.
n
Add a new uplink adapter to a virtual switch.
esxcli <conn_options> network vswitch standard uplink add --uplink-name=vmnic15 vswitch-
name=vSwitch0
n
Remove an uplink adapter from a virtual switch.
esxcli <conn_options> network vswitch standard uplink remove --uplink-name=vmnic15 vswitch-
name=vSwitch0
Linking and Unlinking Uplink Adapters with vicfg-vswitch
You can use vicfg-vswitch to link and unlink uplink adapters.
When you create a virtual switch by using vicfg-vswitch --add, all trac on that virtual switch is initially
conned to that virtual switch. All virtual machines connected to the virtual switch can talk to each other,
but the virtual machines cannot connect to the network or to virtual machines on other hosts. A virtual
machine also cannot connect to virtual machines connected to a dierent virtual switch on the same host.
Having a virtual switch that is not connected to the network might make sense if you want a group of
virtual machines to be able to communicate with each other, but not with other hosts or with virtual
machines on other hosts. In most cases, you set up the virtual switch to transfer data to external networks by
aaching one or more uplink adapters to the virtual switch.
You can use the following commands to add and remove uplink adapters.
n
Add a new uplink adapter to a virtual switch.
vicfg-vswitch <conn_options> --link vmnic15 vSwitch0
n
Remove an uplink adapter from a virtual switch.
vicfg-vswitch <conn_options> --unlink vmnic15 vSwitch0
vSphere Command-Line Interface Concepts and Examples
144 VMware, Inc.