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

Static IP address is not preserved for Ubuntu VMs that use "interfaces"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Critical Critical
    • 2.7.6
    • 2.7.4
    • Guest
    • None
    • False
    • None
    • True
    • Important

      Description of problem:

      Although “ifupdown” is deprecated in favor of netplan[1], it’s possible to use it and configure networking without netplan in Ubuntu 20.04 LTS.

      root@test:~# cat /etc/network/interfaces
      # interfaces(5) file used by ifup(8) and ifdown(8)
      # Include files from /etc/network/interfaces.d:
      source-directory /etc/network/interfaces.d
      auto ens33
      iface ens33 inet static
          address 192.168.122.37
          netmask 255.255.255.0
          gateway 192.168.122.1
      
      # dpkg -l |egrep -i "ifupdown|netplan"
      ii  ifupdown                              0.8.35ubuntu1                     amd64        high level tools to configure network interfaces
      
      ~# systemctl status networking
      ● networking.service - Raise network interfaces
           Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
           Active: active (exited) since Tue 2024-11-26 16:28:27 UTC; 16min ago
             Docs: man:interfaces(5)
          Process: 709 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
         Main PID: 709 (code=exited, status=0/SUCCESS) 
      

      MTV is querying network-scripts, netplan and NetworkManager configuration to find the MAC IP mapping and is not considering “/etc/network/interfaces”.

      Warning: Directory /etc/sysconfig/network-scripts does not exist.
      Warning: Directory /etc/NetworkManager/system-connections does not exist.
      Warning: netplan is not installed.
      New udev rule:
      guestfsd: <= debug (0x4c) request length 84 bytes
      

      So the interface name changes in the OpenShift Virtualization and fails to configure networking (refer attached screenshots).

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

      Migration Toolkit for Virtualization Operator   2.7.4

      How reproducible:

      100%

      Steps to Reproduce:

      1. Install Ubuntu 20.04 LTS on vmware.
      2. Remove netplan.io and install the ifupdown package.
      3. Configure interface using  /etc/network/interfaces and start networking service.
      4. Migrate the virtual machine to OpenShift Virtualization using MTV. The interface name changes and networking fails to start. 

       [1]  https://wiki.ubuntu.com/MigratingToNetplan, https://wiki.ubuntu.com/ArtfulAardvark/ReleaseNotes/

        1. image-2024-12-11-15-52-49-534.png
          55 kB
          Chenli Hu
        2. image-2024-12-11-15-53-55-759.png
          50 kB
          Chenli Hu
        3. image-2024-12-11-15-56-18-491.png
          13 kB
          Chenli Hu
        4. image-2024-12-11-17-03-40-044.png
          48 kB
          Chenli Hu
        5. image-2024-12-11-17-06-27-474.png
          15 kB
          Chenli Hu
        6. Screenshot 2024-11-26 at 10.27.42 PM.png
          39 kB
          Nijin Ashok
        7. ubuntu-vm-vm-1001-zpvv4.log
          3.55 MB
          Nijin Ashok

              mnecas@redhat.com Martin Necas
              rhn-support-nashok Nijin Ashok
              Chenli Hu Chenli Hu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: