Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-926

[failover vf migration][windows vm] After migrating the vm, the info of the failover VF in the dst Win10 vm is displayed incorrectly

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • virtio-win-prewhql-0.1-242
    • None
    • Moderate
    • rhel-virt-windows
    • ssg_virtualization
    • 26
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      When migrating the Win10 vm from src host to dst host, the original failover VF in the src vm will be hot-unplugged, and a new failover VF on the dst host will be hot-plugged into the dst vm.

      The failover VF device we observed in the dst vm should be the new one that was hot-plugged from dst host.

      Version-Release number of selected component (if applicable):
      host:
      4.18.0-259.el8.dt3.x86_64
      qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a.x86_64

      vm:
      en_windows_10_business_editions_version_2004_updated_may_2020_x64_dvd_aa8db2cc.iso
      virtio-win-prewhql-0.1-191

      How reproducible:
      100%

      Steps to Reproduce:
      1.create BCM57810 VFs and set the mac address of the VF
      echo 1 > /sys/bus/pci/devices/0000\:82\:00.0/sriov_numvfs
      echo 0000:82:01.0 > /sys/bus/pci/devices/0000\:82\:01.0/driver/unbind
      echo "14e4 16af" > /sys/bus/pci/drivers/vfio-pci/new_id
      echo "14e4 16af" > /sys/bus/pci/drivers/vfio-pci/remove_id
      ip link set enp130s0f0 vf 0 mac 22:2b:62:bb:a9:82

      2.start a Win10 vm with a failover vf and a failover virtio network device
      /usr/libexec/qemu-kvm -name Win10 \
      -M q35 \
      -m 4G \
      -nodefaults \
      -cpu Haswell-noTSX \
      -smp 4 \
      -device pcie-root-port,id=root.1,chassis=1,addr=0x2.0,multifunction=on \
      -device pcie-root-port,id=root.2,chassis=2,addr=0x2.1 \
      -device pcie-root-port,id=root.3,chassis=3,addr=0x2.2 \
      -device pcie-root-port,id=root.4,chassis=4,addr=0x2.3 \
      -device pcie-root-port,id=root.5,chassis=5,addr=0x2.4 \
      -device pcie-root-port,id=root.6,chassis=6,addr=0x2.5 \
      -device pcie-root-port,id=root.7,chassis=7,addr=0x2.6 \
      -device pcie-root-port,id=root.8,chassis=8,addr=0x2.7 \
      -blockdev driver=file,cache.direct=off,cache.no-flush=on,filename=/nfsmount/migra_test/win10.qcow2,node-name=my_file \
      -blockdev driver=qcow2,node-name=my,file=my_file \
      -device virtio-blk-pci,drive=my,id=virtio-blk0,bus=root.1 \
      -vnc :0 \
      -vga qxl \
      -monitor stdio \
      -usb -device usb-tablet \
      -boot menu=on \
      -qmp tcp:0:5555,server,nowait \
      -netdev tap,id=hostnet0,vhost=on \
      -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:2b:62:bb:a9:82,bus=root.3,failover=on \
      -device vfio-pci,host=82:01.0,id=hostdev0,bus=root.4,failover_pair_id=net0 \

      3.Download the virtio-win-prewhql package in the Win10 vm and install the VIOPROT protocol

      1. cd virtio-win-prewhql1-0.1\Win10\amd64\
      2. netcfg -v -l vioprot.inf -c p -i VIOPROT

      4.Check the network adapters status in the src Win10 vm

      1. ipconfig -all

      Windows IP Configuration

      Host Name . . . . . . . . . . . . : DESKTOP-5U219H7
      Primary Dns Suffix . . . . . . . :
      Node Type . . . . . . . . . . . . : Hybrid
      IP Routing Enabled. . . . . . . . : No
      WINS Proxy Enabled. . . . . . . . : No
      DNS Suffix Search List. . . . . . : lab.eng.pek2.redhat.com

      Ethernet adapter Ethernet 2:

      Connection-specific DNS Suffix . : lab.eng.pek2.redhat.com
      Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter #2
      Physical Address. . . . . . . . . : 22-2B-62-BB-A9-82
      DHCP Enabled. . . . . . . . . . . : Yes
      Autoconfiguration Enabled . . . . : Yes
      IPv6 Address. . . . . . . . . . . : 2620:52:0:4920:1113:7156:8d6a:d402(Preferred)
      Temporary IPv6 Address. . . . . . : 2620:52:0:4920:4d69:2bac:1f29:4dd1(Preferred)
      Link-local IPv6 Address . . . . . : fe80::1113:7156:8d6a:d402%3(Preferred)
      IPv4 Address. . . . . . . . . . . : 10.73.33.115(Preferred)
      Subnet Mask . . . . . . . . . . . : 255.255.254.0
      Lease Obtained. . . . . . . . . . : Sunday, December 13, 2020 7:57:11 AM
      Lease Expires . . . . . . . . . . : Sunday, December 13, 2020 7:57:11 PM
      Default Gateway . . . . . . . . . : fe80:52:0:4920::1fe%3
      10.73.33.254
      DHCP Server . . . . . . . . . . . : 10.73.2.108
      DHCPv6 IAID . . . . . . . . . . . : 119679842
      DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-57-F0-F7-9A-53-43-CD-D4-24
      DNS Servers . . . . . . . . . . . : 10.73.2.107
      10.73.2.108
      10.66.127.10
      NetBIOS over Tcpip. . . . . . . . : Enabled

      ping the ip address of the src host successfully
      ping the ip address of the dst host successfully

      5. On dst host,create 82599ES VF and set the mac address of the VF

      1. echo 1 > /sys/bus/pci/devices/0000\:06\:00.0/sriov_numvfs
      2. echo 0000:06:10.0 > /sys/bus/pci/devices/0000\:06\:10.0/driver/unbind
      3. echo "8086 10ed" > /sys/bus/pci/drivers/vfio-pci/new_id
      4. echo "8086 10ed" > /sys/bus/pci/drivers/vfio-pci/remove_id
      5. ip link set enp6s0f0 vf 0 mac 22:2b:62:bb:a9:82

      5.start a dst vm in listening mode
      ...
      -netdev tap,id=hostnet0,vhost=on \
      -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:2b:62:bb:a9:82,bus=root.3,failover=on \
      -device vfio-pci,host=0000:06:10.0,id=hostdev0,bus=root.4,failover_pair_id=net0 \
      -incoming defer \

      1. telnet 10.73.33.190 5555
        ...
        {"execute": "migrate-incoming","arguments": {"uri": "tcp:[::]:5800"}}
        {"timestamp": {"seconds": 1607847737, "microseconds": 839020}

        , "event": "MIGRATION", "data": {"status": "setup"}}
        {"return": {}}

      (qemu) info migrate
      globals:
      store-global-state: on
      only-migratable: off
      send-configuration: on
      send-section-footer: on
      decompress-error-check: on
      clear-bitmap-shift: 18
      socket address: [
      tcp::::5800
      ]

      6.migrate Win10 vm from src host to dst host

      src host:

      1. telnet 10.73.33.244 5555
        ...
        {"execute": "migrate","arguments":{"uri": "tcp:10.73.33.190:5800"}}
        {"return": {}}
        {"timestamp": {"seconds": 1607849301, "microseconds": 735909}

        , "event": "UNPLUG_PRIMARY", "data": {"device-id": "hostdev0"}}

        Unknown macro: {"timestamp"}

      dst host:

      1. telnet 10.73.33.190 5555
        ...
        {"timestamp": {"seconds": 1607849328, "microseconds": 746610}

        , "event": "FAILOVER_NEGOTIATED", "data": {"device-id": "net0"}}

        Unknown macro: {"timestamp"}

      7.check the migration info

      src host:
      (qemu) info migrate
      globals:
      store-global-state: on
      only-migratable: off
      send-configuration: on
      send-section-footer: on
      decompress-error-check: on
      clear-bitmap-shift: 18
      Migration status: completed
      total time: 27003 ms
      downtime: 77 ms
      setup: 7004 ms
      transferred ram: 2569021 kbytes
      throughput: 1052.43 mbps
      remaining ram: 0 kbytes
      total ram: 4326224 kbytes
      duplicate: 607375 pages
      skipped: 0 pages
      normal: 639671 pages
      normal bytes: 2558684 kbytes
      dirty sync count: 6
      page size: 4 kbytes
      multifd bytes: 0 kbytes
      pages-per-second: 33170

      dst host:
      (qemu) info migrate
      globals:
      store-global-state: on
      only-migratable: off
      send-configuration: on
      send-section-footer: on
      decompress-error-check: on
      clear-bitmap-shift: 18
      Migration status: completed
      total time: 0 ms

      8.check the device info in "Device Manager" of dst Win10 vm

      (qemu) info qtree
      ...
      bus: root.4
      type PCIE
      dev: vfio-pci, id "hostdev0"
      host = "0000:06:10.0"
      sysfsdev = "/sys/bus/pci/devices/0000:06:10.0"
      x-pre-copy-dirty-page-tracking = "on"
      display = "off"
      xres = 0 (0x0)
      yres = 0 (0x0)
      x-intx-mmap-timeout-ms = 1100 (0x44c)
      x-vga = false
      x-req = true
      x-igd-opregion = false
      x-enable-migration = false
      x-no-mmap = false
      x-balloon-allowed = false
      x-no-kvm-intx = false
      x-no-kvm-msi = false
      x-no-kvm-msix = false
      x-no-geforce-quirks = true
      x-assigned-device-limit = 64 (0x40)
      x-no-kvm-ioeventfd = false
      x-no-vfio-ioeventfd = false
      x-pci-vendor-id = 32902 (0x8086)
      x-pci-device-id = 4333 (0x10ed)
      x-pci-sub-vendor-id = 4294967295 (0xffffffff)
      x-pci-sub-device-id = 4294967295 (0xffffffff)
      x-igd-gms = 0 (0x0)
      x-nv-gpudirect-clique = 255 (0xff)
      x-msix-relocation = "off"
      addr = 00.0
      romfile = ""
      rombar = 1 (0x1)
      multifunction = false
      x-pcie-lnksta-dllla = true
      x-pcie-extcap-init = true
      failover_pair_id = "net0"
      class Ethernet controller, addr 04:00.0, pci id 8086:10ed (sub 8086:7a11) <-- 82599ES
      bar 0: mem at 0xffffffffffffffff [0x3ffe]
      bar 3: mem at 0xffffffffffffffff [0x3ffe]

      We expect to see the device information about 82599ES in the “Device Manager” of the dst Win10 vm,
      but what is observed in the "Device manager" of the dst Win10 vm is the info about the src BCM57810 VF device.

      Actual results:
      After migrating the vm of Win10 vm, what is observed in the "Device manager" of the dst Win10 vm is the information of the src failover VF device

      Expected results:
      After migrating the vm of Win10 vm, what is observed in the "Device manager" of the dst Win10 vm is the information of the dst failover VF device

      Additional info:
      (1)Download the driver of 82599ES in Win10 vm from https://downloadcenter.intel.com/download/22283

              ybendito@redhat.com Yuri Benditovich
              yanghliu@redhat.com YangHang Liu
              virt-maint virt-maint
              Yanhui Ma Yanhui Ma
              Votes:
              0 Vote for this issue
              Watchers:
              16 Start watching this issue

                Created:
                Updated:
                Resolved: