Napatech Port to Napatech Port Live Migration

Getting Started with Napatech Link-Virtualization™ Software

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

After setting up OVS offload, you will start the migration source and destination VMs, finally executing a live migration.

Procedure

  1. Setup OVS offload as described in OVS-DPDK Configuration Examples without starting the VM as described in Booting the VM
  2. Start the VM on server 1, which is the migration source:
    taskset -c 8,10,12,14 qemu-system-x86_64 \
    	-enable-kvm -cpu host -m 4096 -smp 4 \
    	-chardev socket,id=char0,path=/usr/local/var/run/stdvio5,server \
    	-object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share \
    	-netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
    	-device virtio-net-pci,packed=on,netdev=mynet1,mac=52:55:00:02:d9:03 \
    	-numa node,memdev=mem -mem-prealloc \
    	-net nic,macaddr=52:54:00:12:34:58 \
    	-net user,hostfwd=tcp::10021-:22 \
    	-nographic \
    	-monitor telnet:127.0.0.1:3333,server,nowait \
    	./centos7_1.img
    
    Note: -monitor telnet:127.0.0.1:3333,server,nowait configures QEMU to run the VM with a control port.
  3. Start the VM on server 2, which is the migration destination:
    taskset -c 2,4,6,8 qemu-system-x86_64 \
    	-enable-kvm -cpu host -m 4G -smp 4 \
    	-object memory-backend-file,id=mem,size=4G,mem-path=/mnt/huge,share \
    	-numa node,memdev=mem -mem-prealloc \
    	-chardev socket,id=char0,path=/usr/local/var/run/stdvio5,server \
    	-netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
    	-device virtio-net-pci,packed=on,netdev=mynet1,mac=52:55:00:02:d9:03 \
    	-net user,hostfwd=tcp::10021-:22 \
    	-net nic,macaddr=52:54:00:12:34:59 \
    	-incoming tcp:0:4444 \
    	centos7_1.img
    

    This VM will, initially, not start, but waits on an incoming channel for the migration command.

    Note: It is important to have the exact same VM image file on both servers.
    Note: It is important to have the exact same MAC address, mac=52:55:00:02:d9:03, for the OVS virtual ports on both servers.
  4. Use your preferred tool to validate VM connectivity:
  5. Start live migration. On server 1, connect to QEMU using telnet:
    telnet 127.0.0.1 3333
  6. Execute the migration command in the QEMU terminal:
    migrate -d tcp:<server 2 ip>:4444
    Note: Packet drop while migrating is caused by the re-programming time from stopping the first stream to redirecting the flow to the other phy. This is approx. 0.2s of traffic.