Uploaded image for project: 'Migration Toolkit for Virtualization'
  1. Migration Toolkit for Virtualization
  2. MTV-2664

Network configuration scripts doesn't work well for win2008 sp2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 2.9.z
    • 2.8.5
    • Guest

      Description of problem:

      Warm migrate win 2008 sp2 VM: mtv-func-win2008 (PowerShell: 1.0) with static ips from vCenter7 to ocp cluster with preserve static ip: on, after migration the static ip settings no longer existed.
      Check the network script: 9999-network-config.ps1 execution log, hit error: "Missing expression after unary operator '-'."
      The script work well on win 2008r2 (PowerShell: 2.0), need modification for PowerShell: 1.0

      Version-Release number of selected component (if applicable):

      MTV 2.8.5-9(IIB: 979366) with CNV 4.18.5, MTV 2.8.5-7(IIB 979184) with CNV 4.19.0

      How reproducible:

      100%

      Steps to Reproduce:

      1) Create windows 2008 sp2 VM with 3 interfaces: 2 with static ip settings, 1 with dhcp

      2) Create warm migration plan to migrate VM from vCenter to OCP cluster, preserve static ip: on, Mgnt network -> NAD mybridge, VM network -> Pod network, VMMCDB112 -> NAD mybridge2

      3) Plan executed successfully, check the conversion pod log virtio_win: /usr/local/virtio-win.iso", after migration: the dhcp -> pod network, get the pod network ip address and can ping outside, check the conversion pod log as below, more details in attached file: v7-us-vm-1986-fr2pv-virt-v2v.log

      4) Static ips which map to NAD bridge networks are no longer existed,  check the network script log on target VM, it's hit error: "Missing expression after unary operator '-'."

      5) Get the NetworkAdapter by Power Shell command line, the virtio ethernet adapter driver work

      6) Rerun the script: 9999-network-config.ps1, get the error: "scripts is disabled on the system", this is because the Set-ExecutionPolicy is Restricted by default in win2008 sp2.  Change the Set-ExecutionPolicy to Unrestricted to allow the script exection.

      7) Rerun the script: 9999-network-config.ps1, get error "You must provide a value expression on the right-hand side of the '-' operator", the power shell version: 1.0.

        1. image-2025-06-03-15-11-04-159.png
          95 kB
          Chenli Hu
        2. image-2025-06-03-15-11-42-464.png
          44 kB
          Chenli Hu
        3. image-2025-06-03-15-12-04-592.png
          98 kB
          Chenli Hu
        4. image-2025-06-03-15-13-07-446.png
          56 kB
          Chenli Hu
        5. image-2025-06-03-15-14-00-880.png
          52 kB
          Chenli Hu
        6. image-2025-06-03-15-14-20-815.png
          58 kB
          Chenli Hu
        7. image-2025-06-03-15-23-43-392.png
          36 kB
          Chenli Hu
        8. image-2025-06-04-11-33-04-183.png
          35 kB
          Chenli Hu
        9. v7-us-vm-1986-fr2pv-virt-v2v.log
          3.98 MB
          Chenli Hu
        10. image-2025-06-04-11-49-25-578.png
          48 kB
          Chenli Hu
        11. cold-3vms-vm-1799-j5jql-virt-v2v.log
          4.14 MB
          Chenli Hu

              rh-ee-ehazan Elad Hazan
              chhu@redhat.com Chenli Hu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: