vSphere 5.1 and later support exporting, importing, and restoring Distributed Switch configurations through the vSphere Web Client.
Exporting Distributed Switch configurations
vSphere allows exporting distributed switch and distributed port group configurations to a file. The exported file preserves valid network settings, enabling these configurations to be shared or applied across other deployments. This functionality is available only through the vSphere Web Client 5.1 or later, though settings can be exported from any version of a distributed switch when using the vSphere Web Client 5.1 or later.
To export vSphere Distributed Switch configurations using the vSphere Web Client:
- Browse to a distributed switch in the vSphere Web Client navigator.
- Right-click the distributed switch and click All vCenter Actions > Export Configuration.
Note: For vCenter Server 6.x, right-click the distributed switch and click Settings > Export Configuration.
- Select the Export the distributed switch configuration or Export the distributed switch configuration and all port groups option.
- (Optional) Type notes about this configuration in the Description field.
- Click OK.
- Click Yes to save the configuration file to the local system.
A configuration file is now available containing all settings for the selected distributed switch and distributed port group. This file can be used to replicate the configuration across existing deployments or to overwrite the settings of existing distributed switches and port groups to match the selected configuration.
Importing Distributed Switch configurations
Exported configuration file can be used to create a copy of the exported distributed switch or to overwrite settings on an existing distributed switch.
Note: Importing a backup from a higher vCenter Server version into lower vCenter Server version is NOT supported.
To create a copy of an exported distributed switch, use the import option to generate a new distributed switch from the exported configuration file. The file contains valid network settings, allowing these configurations to be shared or applied across other deployments. This functionality is available only through the vSphere Web Client 5.1 or later, though configurations from any version of a distributed switch can be imported using the vSphere Web Client 5.1 or later.
To import a vSphere Distributed Switch Configuration using the vSphere Web Client:
- Browse to a datacenter in the vSphere Web Client navigator.
- Right-click the datacenter in the navigator and click All vCenter Actions > Import Distributed Switch.
Note: For vCenter Server 6.x, right-click the datacenter and click Distributed Switch > Import Distributed Switch.
- Browse to the location of the saved configuration file.
- Select the Preserve original distributed switch and port group identifiers option.
Note: While importing dvswitch settings to a different vCenter Server, do not select Preserve original distributed switch port group identifiers.
- Click Next. If notes were entered about the saved configuration file, they appear in the Notes section.
- Review the import settings before completing the import.
- Click Finish.
A new distributed switch is created using the configuration settings from the configuration file. If the file includes distributed port group information, the corresponding distributed port groups are also created
Restoring Distributed Switch configurations
The restore option allows resetting the configuration of an existing distributed switch to the settings stored in a configuration file. Restoring a distributed switch reverts its settings to those saved in the file. This functionality is available only through the vSphere Web Client 5.1 or later, although settings from any version of a distributed switch can be restored using the vSphere Web Client 5.1 or later.
To restore a vSphere Distributed Switch Configuration using the vSphere Web Client:
- Browse to a distributed switch in the vSphere Web Client navigator.
- Right-click the distributed switch and click All vCenter Actions > Restore Configuration.
Note: For vCenter Server 6.x, right-click the distributed switch and click Settings > Restore Configuration.
- Browse for the configuration backup file to use.
- Select the Restore distributed switch and all port groups or Restore distributed switch only option and click Next.
- Review the summary information for the restore.
- Click Finish.
Notes:
- Restoring a distributed switch overwrites the current settings of the distributed switch and its port groups. It does not delete existing port groups that are not part of the configuration file.
- When restoring a distributed switch into two vCenters, please make sure the "Preserve original distributed switch and port group identifiers" is not set.