This section describes how to perform the following tasks for a VPort:
Setting properties for a VPort
Displaying properties associated with a VPort
Displaying information about VPorts
Resetting a VPort
Removing a VPort
You use the evsadm set-vportprop command to set properties for a VPort. The command syntax is:
$ evsadm set-vportprop [-T tenant-name] -p prop=value[,...] EVS-switch-name/VPort-name
Specifies the name of the tenant.
Specifies the values of a property for the specified VPort. If the VPort has a VNIC connected to it, then setting the property on that VPort results in change of VNIC's property. For information about VPort properties, see Figure 4, Table 4, Virtual Port Properties.
Specifies the name of the elastic virtual switch or the VPort for which the properties are set.
This example shows how to set the maximum bandwidth property to 1G for HR/vport0.
$ evsadm set-vportprop -p maxbw=1G HR/vport0
You use the evsadm show-vportprop command to display properties of a VPort. The command syntax is:
$ evsadm show-vportprop [-f {fname=value[,...]}[,...] [[-c] -o field[,...]] \ [-p prop[,...]] [[EVS-switch-name]/[VPort-name]]
This command shows the current values of one or more properties for either all VPorts or the specified VPort. If VPort properties are not specified, then all available VPort properties are displayed. For information about the VPort properties, see Figure 4, Table 4, Virtual Port Properties.
A comma-separated name-value pair used to filter the output (row selection). If multiple filters are specified, then the displayed output is a result of an AND operation among the filters. If the filter value is multivalued, then the displayed output is a result of an OR operation among the filter values. The supported filters are:
tenant – Filter the VPort properties by the tenant name
EVS – Filter the VPort properties by the elastic virtual switch name
vport – Filter the VPort properties by the VPort name
host – Filter the VPort properties by the host name
Specifies a case-insensitive, comma-separated list of output fields to display. You can specify the following fields, which appear as columns in the output:
Displays all the output fields.
Name of the VPort with the name of the elastic virtual switch with which the VPort is associated in the format EVS-switch-name/VPort-name.
Name of the tenant that owns the elastic virtual switch.
Name of the VPort property.
The read or write permissions of the property. The value shown is either r- or rw.
The current property value. If the value is not set, it is shown as --. If it is unknown, the value is shown as ?.
The default value of the property. If the property has no default value, -- is shown.
A comma-separated list of possible values for the property. If the values span a numeric range, min - max might be shown as shorthand. If the possible values are unknown or unbounded, -- is shown.
The following example displays the VPort properties for the VPort vport0.
$ evsadm show-vportprop ORA/vport0 NAME TENANT PROPERTY PERM VALUE DEFAULT POSSIBLE ORA/vport0 sys-global cos rw -- 0 0-7 ORA/vport0 sys-global maxbw rw -- -- -- ORA/vport0 sys-global priority rw -- medium low,medium,high ORA/vport0 sys-global ipaddr r- 192.0.2.2/24 -- -- ORA/vport0 sys-global macaddr r- 2:8:20:b0:6e:63 -- -- ORA/vport0 sys-global evs r- ORA -- -- ORA/vport0 sys-global tenant r- sys-global -- --
The following example shows how to filter the virtual ports by using the values of their property.
$ evsadm show-vportprop -p priority NAME TENANT PROPERTY PERM VALUE EFFECTIVE POSSIBLE evs1/vport0 sys-global priority rw -- medium low, medium, high evs1/vport1 sys-global priority rw high high low, medium, high evs1/vport2 sys-global priority rw -- medium low, medium, high $ evsadm show-vport -f priority=high NAME TENANT STATUS VNIC HOST evs1/vport1 sys-global free -- --
The output shows only the VPort evs1/vport1 whose priority property is set to high.
Example 68 Displaying the UUID for a VPortThis example shows how to display the UUID for the VPort evs1/vport1.
$ evsadm show-vportprop -p uuid -o name,tenant,property,perm,value evs1/vport1 NAME TENANT PROPERTY PERM VALUE evs1/vport1 sys-global uuid r- 7d4c90e0-96bb-11e4-ab96-171c32874415
You use the evsadm show-vport command to display VPorts. The command syntax is:
$ evsadm show-vport [-f {fname=value[,...]}[,...]] [[-c] -o field[,...]] \ [[EVS-switch-name/][VPort-name]]
A comma-separated name-value pair used to filter the output (row selection). If multiple filters are specified, then the displayed output is a result of an AND operation among the filters. If the filter value is multivalued, then the displayed output is a result of an OR operation among the filter values. The supported filters are:
tenant – Filter the VPort list by the tenant name
EVS – Filter the VPort list by the elastic virtual switch name
vport – Filter the VPort list by the VPort name
host – Filter the VPort list by the host name
Specifies a case-insensitive, comma-separated list of output fields to display. You can specify the following fields, which appear as columns in the output:
Displays all the output fields.
Name of the VPort with the name of the elastic virtual switch with which it is associated in the format EVS-switch-name/VPort-name.
Name of the tenant that owns the elastic virtual switch.
Displays whether the VPort is in use or free. A VPort is in use if the VPort is associated with a VNIC. Otherwise, the VPort is free.
Name of the VNIC associated with the VPort.
Name of the host that has the VNIC associated with the VPort.
This example displays information about the VPort vport0.
$ evsadm show-vport NAME TENANT STATUS VNIC HOST ORA/vport0 sys-global used vnic1 s11-client
When you delete a VNIC associated with a VPort, the state of the VPort is free. The VPort can be in the used state even if you delete the VNIC that is associated with the VPort in the following situations:
The EVS node is unable to reach the EVS controller when you delete the VNIC in the EVS node.
The VNIC associated with the VPort is not deleted before you reboot the EVS node.
To reset the state of a VPort to free, use the evsadm reset-vport command. The command syntax is:
$ evsadm reset-vport [-T tenant-name] EVS-switch-name/VPort-name
If a VNIC is associated with the VPort, then the removal of the VPort fails. Therefore, you must first check whether a VNIC is associated with the VPort that you want to remove by using the evsadm show-vport command. You use the evsadm remove-vport command to remove a VPort from an elastic virtual switch. The command syntax is:
$ evsadm remove-vport [-T tenant-name] EVS-switch-name/VPort-name
This command removes the specified VPort. When a VPort is removed, the IP address and the MAC address associated with the VPort are released.
Example 70 Removing a VPortThis example shows how to remove the VPort vport0 configured for the elastic virtual switch ORA.
$ evsadm remove-vport -T tenantA ORA/vport0