6.23 Adding a Bonded Network Interface to an Oracle Linux KVM Guest

Use this procedure to add a bonded network interface to an existing Oracle Linux KVM guest.

For example, you can use this procedure to add a backup network to an Oracle Linux KVM guest.

To add a bonded network interface to an Oracle Linux KVM guest:

  1. On the KVM host, create a bonded network bridge.

    Use the following vm_maker --add-bonded-bridge command:

    # vm_maker --add-bonded-bridge bond-name  --first-slave ethX --second-slave ethY

    In the command:

    • bond-name specifies the name of the bonded network interface. The recommended naming convention uses the string vmbeth concatenated with the numbers that identify the network interfaces being bonded. For example, when bonding eth5 and eth6, the recommended bond name is vmbeth56.
    • ethX and ethY specify the KVM host network interfaces that are being bonded.
  2. On the KVM host, associate the bonded network bridge with the guest.

    Use the following vm_maker --allocate-bridge command:

    # vm_maker --allocate-bridge bond-name --domain guest-name

    In the command:

    • bond-name specifies the name of the bonded network bridge created in the previous step.
    • guest-name specifies the name of the guest to which you want to add the bonded network interface.

    The output from the vm_maker --allocate-bridge command includes a series of additional manual steps that must be performed to complete the procedure.

  3. Perform the additional manual steps outlined in the output from the previous vm_maker --allocate-bridge command.

    In the first manual step, you must select a unique network interface name to use inside the guest. This guest interface maps to the bridged network interface on the KVM host. You can use your naming convention for this interface name, or you can choose to carry through the interface name from the KVM host. Whatever your choice, ensure that the NAME="guest-interface" entry in manual step 2 is adjusted accordingly.

    The following is an example of the manual steps.

    Note:

    Your procedure will be specific to your environment. So, ensure that you perform the additional manual steps outlined in your output from the vm_maker --allocate-bridge command. Do not copy the commands from the following example.

    [INFO] Please perform the following manual steps:
    [INFO] 1. Determine a unique network interface name within the domain to which
    [INFO]    you are attaching this interface. Typically bonded
    [INFO]    interfaces are named bondeth<number>, for example 'bondeth1', and
    [INFO]    non-bonded interfaces are named eth<number>, for example 'eth2'.
    [INFO]    The name must be unique within the domain. In the example below
    [INFO]    the name 'bondeth0' has been chosen.
    [INFO] 2. Add the following line to the file
    [INFO]    '/etc/udev/rules.d/70-persistent-net.rules' within the domain:
    [INFO]    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNELS=="0000:00:PCI-slot-number.0", ATTR{type}=="1", NAME="guest-interface"
    [INFO] You MUST execute steps 4 and 5! You CANNOT simply reboot from within
    [INFO] the domain.
    [INFO] 4. vm_maker --stop-domain guest-name
    [INFO] 5. vm_maker --start-domain guest-name
    [INFO] 6. Login to the domain and run the following command:
    [INFO]    /opt/oracle.cellos/ipconf.pl -nocodes
    [INFO]    This command will ask you for configuration information for this
    [INFO]    new interface.
    [INFO] NOTE: if you have more than one interface to add to this domain,
    [INFO] please execute the instructions above, and then call this command again.
    [INFO] The domain must be stopped and started between invocations of this
    [INFO] command.