Chapter 5: Adding Extra Interfaces

The default virtual machine created by the script (described in Section 3.2, Script Based x86 Setup) has three virtual interfaces configured for cOS Core. These have logical cOS Core names If1, If2 and If3.

If more virtual interfaces are required, these can be added later but must be manually configured. This chapter explains how extra interfaces can be added so they are correctly configured.

The steps are as follows:

  1. Open virt-manager and open the configuration dialog for the virtual machine. Doing this is described previously in Chapter 4, Configuring Virtual Machines.
  1. Press the Add Hardware button at the bottom of the configuration dialog.

  1. The Add New Virtual Hardware dialog will be displayed. Select Network from the options on the left.

  1. Now, select the Host Device which will be the physical interface or bridge to be mapped to this virtual interface. In the screenshot below, a physical Ethernet interface called eth9 will be selected for the mapping.

  1. Next, select the Device Model to have the value Virtio.

  1. Close the new hardware dialog by pressing the Finish button.

  1. The new interface will now appear in the list at the left of the configuration dialog. Press the Apply button to save the changed configuration.

  1. Although the virtual interface has now been added to the virtual machine, cOS Core will not automatically add it to the current configuration. To add the interface, run the following cOS Core CLI command:

    Device:/> pciscan -cfgupdate

    The output from this command will confirm that a new interface has been added. If it is the first added and no previous ones have been deleted it should have the logical name If4.

    Follow the pciscan command with the activate and commit CLI commands to save the configuration changes.

[Warning] Caution: Adding and deleting cOS Core interfaces

cOS Core allows logical interfaces to be deleted. If this is done the ordering of subsequently added logical interfaces can become unpredictable and may not necessarily have the first logical name that is available. For example, if cOS Core interface If2 is deleted from the configuration, the next interface added using pciscan may not become If2.