Starting 2 VMs

Getting Started with Napatech Link-Virtualization™ Software

Platform
Napatech SmartNIC
Content Type
Getting Started
Getting Started Guide
Capture Software Version
Link-Virtualization™ Software 4.5

Procedure

  1. Start two VMs on host1:
    /usr/libexec/qemu-kvm \
      -enable-kvm -cpu host -m 4G -smp 4 \
      -object memory-backend-file,id=mem,size=4G,mem-path=/mnt/huge,share=on \
      -chardev socket,id=char0,path=/usr/local/var/run/stdvio5,server=on \
      -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce=on \
      -device virtio-net-pci,netdev=mynet1,mac=DE:AD:BE:EF:0A:01 \
      -numa node,memdev=mem -mem-prealloc \
      -net user,hostfwd=tcp::10021-:22 \
      -net nic,macaddr=BA:AD:CA:FE:0A:01 \
      -nographic \
      /path/to/images/vm1.img
    
    /usr/libexec/qemu-kvm \
      -enable-kvm -cpu host -m 4G -smp 4 \
      -object memory-backend-file,id=mem,size=4G,mem-path=/mnt/huge,share=on \
      -chardev socket,id=char0,path=/usr/local/var/run/stdvio6,server=on \
      -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce=on \
      -device virtio-net-pci,netdev=mynet1,mac=DE:AD:BE:EF:0A:02 \
      -numa node,memdev=mem -mem-prealloc \
      -net user,hostfwd=tcp::10022-:22 \
      -net nic,macaddr=BA:AD:CA:FE:0A:02 \
      -nographic \
      /path/to/images/vm2.img
    
  2. In each VM, start an application to loopback or forward received traffic on the user network interface. One of the DPDK sample applications (testpmd or l2fwd) could be used here to emulate a network service function: