Configuring Distributed Virtual Switches in Cisco UCS
This chapter includes the following sections:
- Distributed Virtual Switches
- Overview of Creating a DVS in Cisco UCS Manager
- Configuring a Distributed Virtual Switch
- Managing Distributed Virtual Switches
Distributed Virtual Switches
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 the vSwitch, which uses its own local port configuration, a DVS that is associated with multiple ESX hosts uses the same 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 VMs to use the DVS instead of the vSwitch. With the VM-FEX for VMware implementation, when a VM uses the DVS, all VM traffic passes through the DVS and ASIC-based switching is performed by the fabric interconnect.
Overview of Creating a DVS in Cisco UCS Manager
To create a distributed virtual switch (DVS) in Cisco UCS Manager, you must first create a vCenter, a datacenter under the vCenter, and a datacenter folder under the datacenter. You can then create a DVS in the datacenter folder. The vCenter name you specify in Cisco UCS Manager does not need to match the vCenter name specified in VMware vCenter; however, the datacenter name you specify in Cisco UCS Manager must match the datacenter name specified in VMware vCenter. The datacenter folder and DVS you create in Cisco UCS Manager are pushed to VMware vCenter.
Configuring a Distributed Virtual Switch
You must first create a datacenter in VMware vCenter. Do not create the folder inside the datacenter or the DVS in VMware vCenter.
The following example shows how to create a vCenter, a datacenter with the exact same name as the datacenter in VMware vCenter, a DVS in the datacenter folder named Engineering, and commit 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 port 1230 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
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 folder folder-name | (Optional)
Creates the specified vCenter folder and enters system VM management VMware vCenter folder mode.
| ||
Step 6 | UCS-A /system/vm-mgmt /vmware/vcenter/folder # commit-buffer |
Commits the transaction to the system configuration. |
The following example shows how to add a vCenter folder named Lab 5 to the vCenter named MyVcenter and commit 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 #
Adding a Datacenter to a vCenter
You must first create a datacenter in VMware vCenter. Do not create the folder inside the datacenter or the DVS in VMware vCenter.
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 folder folder-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 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 shows how to add a datacenter named SQA-Datacenter to the vCenter named MyVcenter and commit 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 #
Adding a Folder to a Datacenter
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 folder folder-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 folder folder-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 shows how to add a datacenter folder named SoftwareQA to the datacenter named MyDatacenter and commit 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 vCenter
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 folder folder-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 shows how to delete the vCenter folder named Lab5 from the vCenter named MyVcenter and commit 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 #
Deleting a Datacenter from vCenter
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 folder folder-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 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 shows how to delete the datacenter named SQA-Datacenter from the vCenter named MyVcenter and commit 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 #
Deleting a Folder from a Datacenter
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 folder folder-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 folder folder-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 shows how to delete the datacenter folder named SoftwareQA from the datacenter named MyDatacenter and commit 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 #