KVM 上で NetScaler VPX インスタンスを OVS DPDK ベースのホストインターフェイスを使用するように構成する

最終公開日 : Sep 25, 2026
KVM (Fedora および RHOS) で実行されている NetScaler VPX インスタンスを、Open vSwitch (OVS) と Data Plane Development Kit (DPDK) を使用するように構成して、ネットワークパフォーマンスを向上させることができます。このドキュメントでは、KVM ホスト上の OVS-DPDK によって公開される vhost-user ポートで動作するように NetScaler VPX インスタンスを構成する方法について説明します。
OVS は、オープンソースの Apache 2.0 ライセンスでライセンスされた多層仮想スイッチです。DPDK は、高速パケット処理のためのライブラリとドライバーのセットです。
NetScaler VPX インスタンスの構成には、以下の Fedora、RHOS、OVS、および DPDK のバージョンが認定されています。
フェドラ RHOS
フェドラ 25 RHOS 7.4
OVS 2.7.0 OVS 2.6.1
DPDK 16.11.12 DPDK 16.11.12

前提条件

DPDK をインストールする前に、ホストに 1 GB のヒュージページがあることを確認してください。
詳細については、この DPDK システム要件ドキュメント を参照してください。KVM 上で NetScaler VPX インスタンスを OVS DPDK ベースのホストインターフェイスを使用するように構成するために必要な手順の概要を以下に示します。
  • DPDK をインストールします。
  • OVS をビルドしてインストールします。
  • OVS ブリッジを作成します。
  • 物理インターフェイスを OVS ブリッジにアタッチします。
  • vhost-user ポートを OVS データパスにアタッチします。
  • OVS-DPDK ベースの vhost-user ポートで KVM-VPX をプロビジョニングします。

DPDK のインストール

DPDK をインストールするには、この Open vSwitch with DPDK ドキュメントに記載されている手順に従ってください。

OVS のビルドとインストール

OVS ダウンロードページ から OVS をダウンロードします。次に、DPDK データパスを使用して OVS をビルドしてインストールします。Installing Open vSwitch ドキュメントに記載されている手順に従ってください。
詳細については、DPDK Getting Started Guide for Linux を参照してください。

OVS ブリッジの作成

必要に応じて、Fedora または RHOS コマンドを入力して OVS ブリッジを作成します。
Fedora コマンド:
> $OVS_DIR/utilities/ovs-vsctl add-br ovs-br0 -- set bridge ovs-br0 datapath_type=netdev
RHOS コマンド:
ovs-vsctl add-br ovs-br0 -- set bridge ovs-br0 datapath_type=netdev

物理インターフェースをOVSブリッジに接続する

ポートをDPDKにバインドし、以下のFedoraまたはRHOSコマンドを入力してOVSブリッジに接続します。
Fedoraコマンド:

> $OVS_DIR/utilities/ovs-vsctl add-port ovs-br0 dpdk0 -- set Interface dpdk0 type=dpdk  options:dpdk-devargs=0000:03:00.0

> $OVS_DIR/utilities/ovs-vsctl add-port ovs-br0 dpdk1 -- set Interface dpdk1 type=dpdk  options:dpdk-devargs=0000:03:00.1
RHOSコマンド:
ovs-vsctl add-port ovs-br0 dpdk0 -- set Interface dpdk0 type=dpdk  options:dpdk-devargs=0000:03:00.0


ovs-vsctl add-port ovs-br0 dpdk1 -- set Interface dpdk1 type=dpdk  options:dpdk-devargs=0000:03:00.1
オプションの一部として表示されているdpdk-devargsは、それぞれの物理NICのPCI BDFを指定します。

vhost-userポートをOVSデータパスに接続する

以下のFedoraまたはRHOSコマンドを入力して、vhost-userポートをOVSデータパスに接続します。
Fedoraコマンド:
> $OVS_DIR/utilities/ovs-vsctl add-port ovs-br0 vhost-user1 -- set Interface vhost-user1 type=dpdkvhostuser -- set Interface vhost-user1  mtu_request=9000

> $OVS_DIR/utilities/ovs-vsctl add-port ovs-br0 vhost-user2 -- set Interface vhost-user2 type=dpdkvhostuser -- set Interface vhost-user2  mtu_request=9000

chmod g+w  /usr/local/var/run/openvswitch/vhost*
RHOSコマンド:
ovs-vsctl add-port ovs-br0 vhost-user1 -- set Interface vhost-user1 type=dpdkvhostuser -- set Interface vhost-user1  mtu_request=9000

ovs-vsctl add-port ovs-br0 vhost-user2 -- set Interface vhost-user2 type=dpdkvhostuser -- set Interface vhost-user2  mtu_request=9000

chmod g+w /var/run/openvswitch/vhost*

OVS-DPDKベースのvhost-userポートを持つKVM-VPXをプロビジョニングする

Fedora KVMにOVS-DPDKベースのvhost-userポートを持つVPXインスタンスをプロビジョニングするには、以下のQEMUコマンドを使用してCLIからのみ可能です。 Fedoraコマンド:
qemu-system-x86_64 -name KVM-VPX -cpu host -enable-kvm -m 4096M \

-object memory-backend-file,id=mem,size=4096M,mem-path=/dev/hugepages,share=on -numa node,memdev=mem \

-mem-prealloc -smp sockets=1,cores=2 -drive file=<absolute-path-to-disc-image-file>,if=none,id=drive-ide0-0-0,format=<disc-image-format> \

-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \

-netdev type=tap,id=hostnet0,script=no,downscript=no,vhost=on \

-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:3c:d1:ae,bus=pci.0,addr=0x3 \

-chardev socket,id=char0,path=</usr/local/var/run/openvswitch/vhost-user1> \

-netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce -device virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=on \

-chardev socket,id=char1,path=</usr/local/var/run/openvswitch/vhost-user2> \

-netdev type=vhost-user,id=mynet2,chardev=char1,vhostforce -device virtio-net

pci,mac=00:00:00:00:00:02,netdev=mynet2,mrg_rxbuf=on \

--nographic
RHOSの場合、virshを使用してNetScaler VPXインスタンスをプロビジョニングするには、以下のサンプルXMLファイルを使用します。
<domain type='kvm'>

  <name>dpdk-vpx1</name>

  <uuid>aedb844b-f6bc-48e6-a4c6-36577f2d68d6</uuid>

  <memory unit='KiB'>16777216</memory>

  <currentMemory unit='KiB'>16777216</currentMemory>

  <memoryBacking>

    <hugepages>

      <page size='1048576' unit='KiB'/>

    </hugepages>

  </memoryBacking>

  <vcpu placement='static'>6</vcpu>

  <cputune>

    <shares>4096</shares>

    <vcpupin vcpu='0' cpuset='0'/>

    <vcpupin vcpu='1' cpuset='2'/>

    <vcpupin vcpu='2' cpuset='4'/>

    <vcpupin vcpu='3' cpuset='6'/>

    <emulatorpin cpuset='0,2,4,6'/>

  </cputune>

  <numatune>

    <memory mode='strict' nodeset='0'/>

  </numatune>

  <resource>

    <partition>/machine</partition>

  </resource>

  <os>

    <type arch='x86\_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>

    <boot dev='hd'/>

  </os>

  <features>

    <acpi/>

    <apic/>

  </features>

  <cpu mode='custom' match='minimum' check='full'>

    <model fallback='allow'>Haswell-noTSX</model>

    <vendor>Intel</vendor>

    <topology sockets='1' cores='6' threads='1'/>

    <feature policy='require' name='ss'/>

    <feature policy='require' name='pcid'/>

    <feature policy='require' name='hypervisor'/>

    <feature policy='require' name='arat'/>

<domain type='kvm'>

  <name>dpdk-vpx1</name>

  <uuid>aedb844b-f6bc-48e6-a4c6-36577f2d68d6</uuid>

  <memory unit='KiB'>16777216</memory>

  <currentMemory unit='KiB'>16777216</currentMemory>

  <memoryBacking>

    <hugepages>

      <page size='1048576' unit='KiB'/>

    </hugepages>

  </memoryBacking>

  <vcpu placement='static'>6</vcpu>

  <cputune>

    <shares>4096</shares>

    <vcpupin vcpu='0' cpuset='0'/>

    <vcpupin vcpu='1' cpuset='2'/>

    <vcpupin vcpu='2' cpuset='4'/>

    <vcpupin vcpu='3' cpuset='6'/>

    <emulatorpin cpuset='0,2,4,6'/>

  </cputune>

  <numatune>

    <memory mode='strict' nodeset='0'/>

  </numatune>

  <resource>

    <partition>/machine</partition>

  </resource>

  <os>

    <type arch='x86\_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>

    <boot dev='hd'/>

  </os>

  <features>

    <acpi/>

    <apic/>

  </features>

  <cpu mode='custom' match='minimum' check='full'>

    <model fallback='allow'>Haswell-noTSX</model>

    <vendor>Intel</vendor>

    <topology sockets='1' cores='6' threads='1'/>

    <feature policy='require' name='ss'/>

    <feature policy='require' name='pcid'/>

    <feature policy='require' name='hypervisor'/>

    <feature policy='require' name='arat'/>

    <feature policy='require' name='tsc\_adjust'/>

    <feature policy='require' name='xsaveopt'/>

    <feature policy='require' name='pdpe1gb'/>

    <numa>

      <cell id='0' cpus='0-5' memory='16777216' unit='KiB' memAccess='shared'/>

    </numa>

  </cpu>

  <clock offset='utc'/>

  <on\_poweroff>destroy</on\_poweroff>

  <on\_reboot>restart</on\_reboot>

  <on\_crash>destroy</on\_crash>

  <devices>

    <emulator>/usr/libexec/qemu-kvm</emulator>

    <disk type='file' device='disk'>

      <driver name='qemu' type='qcow2' cache='none'/>

      <source file='/home/NSVPX-KVM-12.0-52.18\_nc.qcow2'/>

      <target dev='vda' bus='virtio'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

    </disk>

    <controller type='ide' index='0'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>

    </controller>

    <controller type='usb' index='0' model='piix3-uhci'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>

    </controller>

    <controller type='pci' index='0' model='pci-root'/>

    <interface type='direct'>

      <mac address='52:54:00:bb:ac:05'/>

      <source dev='enp129s0f0' mode='bridge'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

    </interface>

    <interface type='vhostuser'>

      <mac address='52:54:00:55:55:56'/>

      <source type='unix' path='/var/run/openvswitch/vhost-user1' mode='client'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>

    </interface>

    <interface type='vhostuser'>

      <mac address='52:54:00:2a:32:64'/>

      <source type='unix' path='/var/run/openvswitch/vhost-user2' mode='client'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>

    </interface>

    <interface type='vhostuser'>

      <mac address='52:54:00:2a:32:74'/>

      <source type='unix' path='/var/run/openvswitch/vhost-user3' mode='client'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>

    </interface>

    <interface type='vhostuser'>

      <mac address='52:54:00:2a:32:84'/>

      <source type='unix' path='/var/run/openvswitch/vhost-user4' mode='client'/>

     <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>

    </interface>

    <serial type='pty'>

      <target port='0'/>

    </serial>

    <console type='pty'>

      <target type='serial' port='0'/>

    </console>

    <input type='mouse' bus='ps2'/>

    <input type='keyboard' bus='ps2'/>

    <graphics type='vnc' port='-1' autoport='yes'>

      <listen type='address'/>

    </graphics>

    <video>

      <model type='cirrus' vram='16384' heads='1' primary='yes'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

    </video>

    <memballoon model='virtio'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>

    </memballoon>

  </devices>

</domain

注意点

XMLファイルでは、サンプルファイルに示されているように、hugepageのサイズは1 GBである必要があります。
<memoryBacking>

    <hugepages>

      <page size='1048576' unit='KiB'/>

    </hugepages>
また、サンプルファイルでは、vhost-user1はovs-br0にバインドされたvhostユーザーポートです。
<interface type='vhostuser'>

      <mac address='52:54:00:55:55:56'/>

      <source type='unix' path='/var/run/openvswitch/vhost-user1' mode='client'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>

    </interface>
NetScaler VPX インスタンスを起動するには、virsh コマンドを使用して開始します。