Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Add a Virtio Virtual Interface to a vSRX Virtual Firewall VM with KVM

date_range 27-May-23

You can add additional virtio virtual interfaces to an existing vSRX Virtual Firewall VM with KVM.

To add additional virtio virtual interfaces to a vSRX Virtual Firewall VM using virt-manager:

  1. In virt-manager, double-click the vSRX Virtual Firewall VM and select View>Details. The vSRX Virtual Firewall Virtual Machine details dialog box appears.
  2. Click Add Hardware. The Add Hardware dialog box appears.
  3. Select Network from the left navigation panel.
  4. Select the host device or virtual network on which you want this new virtual interface from the Network source list.
  5. Select virtio from the Device model list and click Finish.
  6. From the vSRX Virtual Firewall console, reboot the vSRX Virtual Firewall instance.

    vsrx# request system reboot.

    vSRX Virtual Firewall reboots both Junos OS and the vSRX Virtual Firewall guest VM.

Note:

DPDK places a limit of 64 MAC addresses on the Virtio NIC type. When deploying a protocol that generates an additional MAC address, for example VRRP, you must ensure that no more than 64 sub-interfaces are configured per Virtio NIC to avoid traffic loss.

To add additional virtio virtual interfaces to a vSRX Virtual Firewall VM using virsh:

  1. Use the virsh attach-interface command on the host OS with the mandatory options listed in Table 1.

    Note:

    See the official virsh documentation for a complete description of available options.

    Table 1: virsh attach-interface Options

    Command Option

    Description

    --domain name

    Specify the name of the guest VM.

    --type

    Specify the host OS connection type as bridge or network.

    --source interface

    Specify the physical or logical interface on the host OS to associate with this vNIC.

    --target vnic

    Specify the name for the new vNIC.

    --model

    Specify the vNIC model.

    The following example creates a new virtio vNIC from the host OS virbr0 bridge.

    content_copy zoom_out_map
    user@host# virsh attach-interface --domain vsrxVM --type bridge --source virbr0 --target vsrx-mgmt --model virtio
    
    content_copy zoom_out_map
    Interface attached successfully
    
    content_copy zoom_out_map
    user@host# virsh dumpxml vsrxVM
    
    content_copy zoom_out_map
    <output omitted> 
    
     <interface type='bridge'>
          <mac address='00:00:5e:00:53:e8'/>
          <source bridge='virbr0'/>
          <target dev='vsrx-mgmt'/>
          <model type='virtio'/>
          <alias name='net1'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
        </interface>
    
    
  2. From the vSRX Virtual Firewall console, reboot the vSRX Virtual Firewall instance.

    vsrx# request system reboot.

    vSRX Virtual Firewall reboots both Junos OS and the vSRX Virtual Firewall guest VM.

footer-navigation