# Data Object - HostVirtualSwitch(vim.host.VirtualSwitch)

Property of
  HostNetworkInfo, HostPortGroup
Extends
  DynamicData
See also
  HostPortGroup, HostVirtualSwitchSpec, PhysicalNic
Since
  2.0

## Data Object Description

The virtual switch is a software entity to which multiple virtual network adapters can connect to create a virtual network. It can also be bridged to a physical network.

Properties

Name | Type | Description
--- | --- | ---
key | xsd:string | The virtual switch key.
mtu* | xsd:int | The maximum transmission unit (MTU) associated with this virtual switch in bytes. Since VI API 2.5
name | xsd:string | The name of the virtual switch. Maximum length is 32 characters.
numPorts | xsd:int | The number of ports that this virtual switch currently has.
numPortsAvailable | xsd:int | The number of ports that are available on this virtual switch. There are a number of networking services that utilize a port on the virtual switch and are not accounted for in the Port array of a PortGroup. For example, each physical NIC attached to a virtual switch consumes one port. This property should be used when attempting to implement admission control for new services attaching to virtual switches.
pnic* | xsd:string[] | The set of physical network adapters associated with this bridge.
portgroup* | xsd:string[] | The list of port groups configured for this virtual switch.
spec | HostVirtualSwitchSpec | The specification of this virtual switch.
Properties inherited from DynamicData
None

*Need not be set
Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="HostVirtualSwitch"> <complexContent> <extension base="sms:DynamicData"> <sequence> <element name="name" type="xsd:string"/> <element name="key" type="xsd:string"/> <element name="numPorts" type="xsd:int"/> <element name="numPortsAvailable" type="xsd:int"/> <element name="mtu" type="xsd:int" minOccurs="0"/> <element name="portgroup" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> <element name="pnic" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> <element name="spec" type="sms:HostVirtualSwitchSpec"/> </sequence> </extension> </complexContent> </complexType>