Cisco UCS Manager CLI Configuration Guide, Release 1.1(1)
Configuring Distributed Virtual Switches in Cisco UCS
Downloads: This chapterpdf (PDF - 474.0KB) The complete bookPDF (PDF - 4.07MB) | Feedback

Configuring Distributed Virtual Switches in Cisco UCS

Configuring Distributed Virtual Switches in Cisco UCS

This chapter includes the following sections:

Distributed Virtual Switches

Each VMware ESX host has its own software-based virtual switch (vSwitch) in its hypervisor that performs the switching operations between its virtual machines (VMs). The Cisco UCS distributed virtual switch (DVS) is a software-based virtual switch that runs along side the vSwitch in the ESX hypervisor, and can be distributed across multiple ESX hosts. Unlike vSwitch, which uses its own local port configuration, a DVS associated with multiple ESX hosts uses the same consistent port configuration across all ESX hosts.

After associating an ESX host to a DVS, you can migrate existing VMs from the vSwitch to the DVS, and you can create new VMs to use the DVS instead of the vSwitch. With the hardware-based VN-Link implementation, when a VM uses the DVS, all VM traffic passes through the DVS and ASIC-based switching is performed by the fabric interconnect.

In Cisco UCS Manager, DVSes are organized in the following hierarchy:

vCenter
    Folder (optional)
        Datacenter
            Folder (required)
                DVS

At the top of the hierarchy is the vCenter, which represents a VMware vCenter instance. Each vCenter contains one or more datacenters, and optionally vCenter folders with which you can organize the datacenters. Each datacenter contains one or more required datacenter folders. Datacenter folders contain the DVSes.

Configuring a Distributed Virtual Switch

Before You Begin

You must first create a datacenter in VMware vCenter. Do not create the folder inside the datacenter or the DVS in VMware vCenter.


Procedure
  Command or Action Purpose
Step 1 UCS-A# scope system  

Enters system mode.

 
Step 2 UCS-A /system # scope vm-mgmt  

Enters system VM management mode.

 
Step 3 UCS-A /system/vm-mgmt # scope vmware  

Enters system VM management VMware mode.

 
Step 4 UCS-A /system/vm-mgmt /vmware # create vcenter vcenter-name  

Creates the specified vCenter and enters system VM management VMware vCenter mode.

 
Step 5 UCS-A /system/vm-mgmt /vmware/vcenter # set hostname {hostname | ip-addr}  

Specifics the hostname or IP address of the remote vCenter Server instance associated to the vCenter object in Cisco UCS Manager.

Note   

If you use a hostname rather than an IP address, you must configure a DNS server in Cisco UCS Manager.

 
Step 6 UCS-A /system/vm-mgmt /vmware/vcenter # set description description  

Provides a description for the vCenter.

Note   

If your description includes spaces, special characters, or punctuation, you must begin and end your description with quotation marks. The quotation marks will not appear in the description field of any show command output.

 
Step 7 UCS-A /system/vm-mgmt /vmware/vcenter # create folderfolder-name   (Optional)

Creates the specified vCenter folder.

Note   

A vCenter can contain multiple datacenters, none of which must be contained in a vCenter folder, so the use of vCenter folders are optionally used only for organizational purposes.

 
Step 8 UCS-A /system/vm-mgmt /vmware/vcenter/ # create data-center data-center-name  

Creates the specified datacenter and enters system VM management VMware vCenter datacenter mode.

The datacenter name that you specify in Cisco UCS Manager must exactly match the name of the datacenter previously created in VMware vCenter.

 
Step 9 UCS-A /system/vm-mgmt /vmware/vcenter/data-center # create folderfolder-name  

Creates the specified datacenter folder and enters system VM management VMware vCenter datacenter folder mode.

Note   

At least one datacenter folder is required. You cannot create a distributed virtual switch (DVS) directly under a datacenter; you must create the DVS in a datacenter folder.

 
Step 10 UCS-A /system/vm-mgmt /vmware/vcenter/data-center/folder # create distributed-virtual-switch dvs-name  

Creates the specified DVS and enters system VM management VMware vCenter datacenter folder distributed virtual switch mode.

 
Step 11 UCS-A /system/vm-mgmt /vmware/vcenter/data-center /folder/distributed-virtual-switch # {disable | enable}  

Disables or enables the DVS.

If you disable the DVS, Cisco UCS Manager does not push any configuration changes related to the DVS to VMware vCenter.

 
Step 12 UCS-A /system/vm-mgmt /vmware/vcenter/data-center/folder /distributed-virtual-switch # commit-buffer  

Commits the transaction to the system configuration.

 

The following example creates a vCenter, a datacenter with the exact same name as the datacenter in VMware vCenter, a DVS in the datacenter folder named Engineering, and commits the transaction:

UCS-A# scope system
UCS-A /system # scope vm-mgmt
UCS-A /system/vm-mgmt # scope vmware			 
UCS-A /system/vm-mgmt/vmware # create vcenter MyVcenter
UCS-A /system/vm-mgmt/vmware/vcenter* # set hostname 192.168.10.10
UCS-A /system/vm-mgmt/vmware/vcenter* # set description "vCenter running on my laptop"
UCS-A /system/vm-mgmt/vmware/vcenter* # create data-center MyDatacenter
UCS-A /system/vm-mgmt/vmware/vcenter/data-center* # create folder Engineering
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder* # create distributed-virtual-switch LabSwitch
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder/distributed-virtual-switch* # enable
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder/distributed-virtual-switch* # commit-buffer
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder/distributed-virtual-switch #

Managing Distributed Virtual Switches

Adding a Folder to a vCenter

Procedure
  Command or Action Purpose
Step 1 UCS-A# scope system  

Enters system mode.

 
Step 2 UCS-A /system # scope vm-mgmt  

Enters system VM management mode.

 
Step 3 UCS-A /system/vm-mgmt # scope vmware  

Enters system VM management VMware mode.

 
Step 4 UCS-A /system/vm-mgmt /vmware # scope vcenter vcenter-name  

Enters system VM management VMware vCenter mode for the specified vCenter.

 
Step 5 UCS-A /system/vm-mgmt /vmware/vcenter # create folderfolder-name   (Optional)

Creates the specified vCenter folder and enters system VM management VMware vCenter folder mode.

Note   

A vCenter can contain multiple datacenters, none of which must be contained in a vCenter folder, so the use of vCenter folders are optionally used only for organizational purposes.

 
Step 6 UCS-A /system/vm-mgmt /vmware/vcenter/folder # commit-buffer  

Commits the transaction to the system configuration.

 

The following example adds a vCenter folder named Lab 5 to the vCenter named MyVcenter and commits the transaction:

UCS-A# scope system
UCS-A /system # scope vm-mgmt
UCS-A /system/vm-mgmt # scope vmware			 
UCS-A /system/vm-mgmt/vmware # scope vcenter MyVcenter
UCS-A /system/vm-mgmt/vmware/vcenter* # create folder Lab5
UCS-A /system/vm-mgmt/vmware/vcenter/folder* # commit-buffer
UCS-A /system/vm-mgmt/vmware/vcenter/folder #

Deleting a Folder from a vCenter

Procedure
  Command or Action Purpose
Step 1 UCS-A# scope system  

Enters system mode.

 
Step 2 UCS-A /system # scope vm-mgmt  

Enters system VM management mode.

 
Step 3 UCS-A /system/vm-mgmt # scope vmware  

Enters system VM management VMware mode.

 
Step 4 UCS-A /system/vm-mgmt /vmware # scope vcenter vcenter-name  

Enters system VM management VMware vCenter mode for the specified vCenter.

 
Step 5 UCS-A /system/vm-mgmt /vmware/vcenter # delete folderfolder-name   (Optional)

Deletes the specified vCenter folder.

 
Step 6 UCS-A /system/vm-mgmt /vmware/vcenter # commit-buffer  

Commits the transaction to the system configuration.

 

The following example deletes the vCenter folder named Lab 5 from the vCenter named MyVcenter and commits the transaction:

UCS-A# scope system
UCS-A /system # scope vm-mgmt
UCS-A /system/vm-mgmt # scope vmware			 
UCS-A /system/vm-mgmt/vmware # scope vcenter MyVcenter
UCS-A /system/vm-mgmt/vmware/vcenter # delete folder Lab5
UCS-A /system/vm-mgmt/vmware/vcenter* # commit-buffer
UCS-A /system/vm-mgmt/vmware/vcenter #

Adding a Datacenter to a vCenter

Before You Begin

You must first create a datacenter in VMware vCenter. Do not create the folder inside the datacenter or the DVS in VMware vCenter.


Procedure
  Command or Action Purpose
Step 1 UCS-A# scope system  

Enters system mode.

 
Step 2 UCS-A /system # scope vm-mgmt  

Enters system VM management mode.

 
Step 3 UCS-A /system/vm-mgmt # scope vmware  

Enters system VM management VMware mode.

 
Step 4 UCS-A /system/vm-mgmt/vmware # scope vcenter vcenter-name  

Enters system VM management VMware vCenter mode for the specified vCenter.

 
Step 5 UCS-A /system/vm-mgmt/vmware/vcenter # scope folderfolder-name   (Optional)

Enters system VM management VMware vCenter folder mode for the specified folder.

 
Step 6 UCS-A /system/vm-mgmt/vmware/vcenter/ # create data-center data-center-name  

Creates the specified datacenter and enters system VM management VMware vCenter datacenter mode.

The datacenter name that you specify in Cisco UCS Manager must exactly match the name of the datacenter previously created in VMware vCenter.

 
Step 7 UCS-A /system/vm-mgmt/vmware/vcenter/data-center # commit-buffer  

Commits the transaction to the system configuration.

 

The following example adds a datacenter named SQA-Datacenter to the vCenter named MyVcenter and commits the transaction:

UCS-A# scope system
UCS-A /system # scope vm-mgmt
UCS-A /system/vm-mgmt # scope vmware			 
UCS-A /system/vm-mgmt/vmware # scope vcenter MyVcenter
UCS-A /system/vm-mgmt/vmware/vcenter* # create data-center SQA-Datacenter
UCS-A /system/vm-mgmt/vmware/vcenter/data-center* # commit-buffer
UCS-A /system/vm-mgmt/vmware/vcenter/data-center #

Deleting a Datacenter from vCenter

Procedure
  Command or Action Purpose
Step 1 UCS-A# scope system  

Enters system mode.

 
Step 2 UCS-A /system # scope vm-mgmt  

Enters system VM management mode.

 
Step 3 UCS-A /system/vm-mgmt # scope vmware  

Enters system VM management VMware mode.

 
Step 4 UCS-A /system/vm-mgmt/vmware # scope vcenter vcenter-name  

Enters system VM management VMware vCenter mode for the specified vCenter.

 
Step 5 UCS-A /system/vm-mgmt/vmware/vcenter # scope folderfolder-name   (Optional)

Enters system VM management VMware vCenter folder mode for the specified folder.

 
Step 6 UCS-A /system/vm-mgmt/vmware/vcenter/ # delete data-center data-center-name  

Deletes the specified datacenter. The datacenter name that you specify in Cisco UCS Manager must exactly match the name of a datacenter previously created in vCenter Server.

 
Step 7 UCS-A /system/vm-mgmt/vmware/vcenter # commit-buffer  

Commits the transaction to the system configuration.

 

The following example deletes the datacenter named SQA-Datacenter from the vCenter named MyVcenter and commits the transaction:

UCS-A# scope system
UCS-A /system # scope vm-mgmt
UCS-A /system/vm-mgmt # scope vmware			 
UCS-A /system/vm-mgmt/vmware # scope vcenter MyVcenter
UCS-A /system/vm-mgmt/vmware/vcenter* # delete data-center SQA-Datacenter
UCS-A /system/vm-mgmt/vmware/vcenter* # commit-buffer
UCS-A /system/vm-mgmt/vmware/vcenter #

Adding a Folder to a Datacenter

Procedure
  Command or Action Purpose
Step 1 UCS-A# scope system  

Enters system mode.

 
Step 2 UCS-A /system # scope vm-mgmt  

Enters system VM management mode.

 
Step 3 UCS-A /system/vm-mgmt # scope vmware  

Enters system VM management VMware mode.

 
Step 4 UCS-A /system/vm-mgmt /vmware # scope vcenter vcenter-name  

Enters system VM management VMware vCenter mode for the specified vCenter.

 
Step 5 UCS-A /system/vm-mgmt /vmware/vcenter # scope folderfolder-name   (Optional)

Enters system VM management VMware vCenter folder mode for the specified folder.

 
Step 6 UCS-A /system/vm-mgmt /vmware/vcenter/ # scope data-center data-center-name  

Enters system VM management VMware vCenter datacenter mode for the specified datacenter.

 
Step 7 UCS-A /system/vm-mgmt /vmware/vcenter/data-center # create folderfolder-name  

Creates the specified datacenter folder and enters system VM management VMware vCenter datacenter folder mode.

 
Step 8 UCS-A /system/vm-mgmt /vmware/vcenter/data-center/folder # commit-buffer  

Commits the transaction to the system configuration.

 

The following example adds a datacenter folder named SoftwareQA to the datacenter named MyDatacenter and commits the transaction:

UCS-A# scope system
UCS-A /system # scope vm-mgmt
UCS-A /system/vm-mgmt # scope vmware			 
UCS-A /system/vm-mgmt/vmware # scope vcenter MyVcenter
UCS-A /system/vm-mgmt/vmware/vcenter* # scope data-center MyDatacenter
UCS-A /system/vm-mgmt/vmware/vcenter/data-center* # create folder SoftwareQA
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder* # commit-buffer
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder #

Deleting a Folder from a Datacenter

Procedure
  Command or Action Purpose
Step 1 UCS-A# scope system  

Enters system mode.

 
Step 2 UCS-A /system # scope vm-mgmt  

Enters system VM management mode.

 
Step 3 UCS-A /system/vm-mgmt # scope vmware  

Enters system VM management VMware mode.

 
Step 4 UCS-A /system/vm-mgmt /vmware # scope vcenter vcenter-name  

Enters system VM management VMware vCenter mode for the specified vCenter.

 
Step 5 UCS-A /system/vm-mgmt /vmware/vcenter # scope folderfolder-name   (Optional)

Enters system VM management VMware vCenter folder mode for the specified folder.

 
Step 6 UCS-A /system/vm-mgmt /vmware/vcenter/ # scope data-center data-center-name  

Enters system VM management VMware vCenter datacenter mode for the specified datacenter.

 
Step 7 UCS-A /system/vm-mgmt /vmware/vcenter/data-center # delete folderfolder-name  

Deletes the specified datacenter folder.

 
Step 8 UCS-A /system/vm-mgmt /vmware/vcenter/data-center # commit-buffer  

Commits the transaction to the system configuration.

 

The following example deletes the datacenter folder named SoftwareQA from the datacenter named MyDatacenter and commits the transaction:

UCS-A# scope system
UCS-A /system # scope vm-mgmt
UCS-A /system/vm-mgmt # scope vmware			 
UCS-A /system/vm-mgmt/vmware # scope vcenter MyVcenter
UCS-A /system/vm-mgmt/vmware/vcenter # scope data-center MyDatacenter
UCS-A /system/vm-mgmt/vmware/vcenter/data-center # delete folder SoftwareQA
UCS-A /system/vm-mgmt/vmware/vcenter/data-center* # commit-buffer
UCS-A /system/vm-mgmt/vmware/vcenter/data-center #

Adding a Distributed Virtual Switch to a Datacenter Folder

Procedure
  Command or Action Purpose
Step 1 UCS-A# scope system  

Enters system mode.

 
Step 2 UCS-A /system # scope vm-mgmt  

Enters system VM management mode.

 
Step 3 UCS-A /system/vm-mgmt # scope vmware  

Enters system VM management VMware mode.

 
Step 4 UCS-A /system/vm-mgmt /vmware # scope vcenter vcenter-name  

Enters system VM management VMware vCenter mode for the specified vCenter.

 
Step 5 UCS-A /system/vm-mgmt /vmware/vcenter # scope folderfolder-name   (Optional)

Enters system VM management VMware vCenter folder mode for the specified folder.

 
Step 6 UCS-A /system/vm-mgmt /vmware/vcenter/ # scope data-center data-center-name  

Enters system VM management VMware vCenter datacenter mode for the specified datacenter.

 
Step 7 UCS-A /system/vm-mgmt /vmware/vcenter/data-center # scope folderfolder-name  

Enters system VM management VMware vCenter datacenter folder mode for the specified datacenter folder.

 
Step 8 UCS-A /system/vm-mgmt /vmware/vcenter/folder/data-center /folder # create distributed-virtual-switch dvs-name  

Creates the specified DVS and enters system VM management VMware vCenter datacenter folder distributed virtual switch mode.

 
Step 9 UCS-A /system/vm-mgmt /vmware/vcenter/folder/data-center /folder/distributed-virtual-switch # {disable | enable}  

Disables or enables the DVS.

 
Step 10 UCS-A /system/vm-mgmt /vmware/vcenter/folder/data-center /folder/distributed-virtual-switch # commit-buffer  

Commits the transaction to the system configuration.

 

The following example adds a DVS named TestSwitch to the datacenter folder named Engineering, enables the DVS, and commits the transaction:

UCS-A# scope system
UCS-A /system # scope vm-mgmt
UCS-A /system/vm-mgmt # scope vmware			 
UCS-A /system/vm-mgmt/vmware # scope vcenter MyVcenter
UCS-A /system/vm-mgmt/vmware/vcenter* # scope data-center MyDatacenter
UCS-A /system/vm-mgmt/vmware/vcenter/data-center* # scope folder Engineering
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder* # create distributed-virtual-switch TestSwitch
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder/distributed-virtual-switch* # enable
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder/distributed-virtual-switch* # commit-buffer
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder/distributed-virtual-switch #

Deleting a Distributed Virtual Switch from a Datacenter Folder

Procedure
  Command or Action Purpose
Step 1 UCS-A# scope system  

Enters system mode.

 
Step 2 UCS-A /system # scope vm-mgmt  

Enters system VM management mode.

 
Step 3 UCS-A /system/vm-mgmt # scope vmware  

Enters system VM management VMware mode.

 
Step 4 UCS-A /system/vm-mgmt/vmware # scope vcenter vcenter-name  

Enters system VM management VMware vCenter mode for the specified vCenter.

 
Step 5 UCS-A /system/vm-mgmt/vmware/vcenter # scope folderfolder-name   (Optional)

Enters system VM management VMware vCenter folder mode for the specified folder.

 
Step 6 UCS-A /system/vm-mgmt/vmware/vcenter/ # scope data-center data-center-name  

Enters system VM management VMware vCenter datacenter mode for the specified datacenter.

 
Step 7 UCS-A /system/vm-mgmt/vmware/vcenter/data-center # scope folderfolder-name  

Enters system VM management VMware vCenter datacenter folder mode for the specified datacenter folder.

 
Step 8 UCS-A /system/vm-mgmt/vmware/vcenter/folder/data-center/folder # delete distributed-virtual-switch dvs-name  

Deletes the specified DVS.

 
Step 9 UCS-A /system/vm-mgmt/vmware/vcenter/folder/data-center/folder # commit-buffer  

Commits the transaction to the system configuration.

 

The following example deletes the DVS named TestSwitch from the datacenter folder named Engineering and commits the transaction:

UCS-A# scope system
UCS-A /system # scope vm-mgmt
UCS-A /system/vm-mgmt # scope vmware			 
UCS-A /system/vm-mgmt/vmware # scope vcenter MyVcenter
UCS-A /system/vm-mgmt/vmware/vcenter* # scope data-center MyDatacenter
UCS-A /system/vm-mgmt/vmware/vcenter/data-center* # scope folder Engineering
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder* # delete distributed-virtual-switch TestSwitch
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder* # commit-buffer
UCS-A /system/vm-mgmt/vmware/vcenter/data-center/folder #