Configuring a virtual switch

Configure virtual switches as virtual Ethernet devices.

Procedure

You configure a virtual switch by using the interface element (see <interface>).
interface type attribute: bridge
  1. Optional: Specify a freely selectable Media Access Control (MAC) address for the virtual server's virtual NIC.
    mac address attribute: <MAC-address>
    (see <mac>)
  2. Specify the virtual switch that you created before as described in Preparing a virtual switch.
    source bridge attribute: <vswitch>
    (see <source> as child element of <interface>)
  3. Specify the type.
    virtualport type attribute: openvswitch
    (see <virtualport> as a child element of <interface>)
  4. Specify the model type.
    model type attribute: virtio
    (see <model> as a child element of <interface>)
  5. For guests that are to run in IBM® Secure Execution mode and cannot use the launchSecurity element in the virtual server configuration, ensure that the device uses the guest's bounce buffer, see Preparing the virtual server.

Example

Display the available virtual switches:
# ovs-vsctl show
...
   Bridge "vswitch0"
        Port "vsbond0"
            Interface "enc1108"
            Interface "enca112"
        Port "vswitch0"
            Interface "vswitch0"
                type: internal
...
Configure the virtual switch which is shown in Figure 3 in Network devices as virtual Ethernet devices:
<interface type="bridge">
      <source bridge="vswitch0"/>
      <virtualport type="openvswitch"/>
      <model type="virtio"/>
</interface>   
After the creation and the start of the virtual server, the virtual switch is displayed as follows:
# ovs-vsctl show
...
   Bridge "vswitch0"
        Port "vnet0"
            Interface "vnet0"
        Port "vsbond0"
            Interface "enc1108"
            Interface "enca112"
        Port "vswitch0"
            Interface "vswitch0"
                type: internal
...