[Bug 1679674] Re: s390x: Interface order in kvm guest image not predictable

Dimitri John Ledkov launchpad at surgut.co.uk
Tue Apr 11 14:30:18 UTC 2017


This change got uploaded into ubuntu on 2017-03-28, before this bug
report was filed, but due to various regressions was not published until
2017-04-08.

With most current Ubuntu 17.04, and 232-21ubuntu2 stable interface names
are used for virtio_net defices based on the bus IDs just like on LPAR
and z/VM. Specifically interfaces names are renamed into: enc2 and enc3
for my xml of the guest, which corresponds to the devno in the xml
definition:

   <interface type='network'>
      <mac address='52:54:00:d7:31:0f'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
    </interface>
    <interface type='network'>
      <mac address='52:54:00:0a:4e:5f'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet1'/>
      <model type='virtio'/>
      <alias name='net1'/>
      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0003'/>
    </interface>

I am marking this bug as fix released.

** Changed in: systemd (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1679674

Title:
  s390x: Interface order in kvm guest image not predictable

Status in systemd package in Ubuntu:
  Fix Released

Bug description:
  ---Problem Description---
  Running the Ubuntu16 cloud image on an ubuntu 16.04 KVM host. The KVM guest is launched with 2 network interfaces connected to 2 different open vswitch bridges.

  The problem is 2-fold:
  #1 In the guest it seems like that the interface order is not predicitve. Device names used are eth0, eth1. The device that is listed first in libvirts domain.xml is not necessarily eth0. 
  #2 The device names are not persistet. On the next boot eth0 might be eth1 and vice verca.
   
  Contact Information = andreas.scheuring at de.ibm.com 
   
  ---uname output---
  Linux Ubuntu16 4.4.0-70-generic #91-Ubuntu SMP Wed Mar 22 12:48:02 UTC 2017 s390x s390x s390x GNU/Linux
   
  Machine Type = KVM guest 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   guest Domain xml:
  <domain type='kvm' id='6'>
    <name>Ubuntu16VM</name>
    <uuid>455e6998-cec1-4010-99a6-d033ee6d3385</uuid>
    <memory unit='KiB'>524288</memory>
    <currentMemory unit='KiB'>524288</currentMemory>
    <vcpu placement='static'>2</vcpu>
    <resource>
      <partition>/machine</partition>
    </resource>
    <os>
      <type arch='s390x' machine='s390-ccw-virtio-xenial'>hvm</type>
      <boot dev='hd'/>
    </os>
    <clock offset='utc'/>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>preserve</on_crash>
    <devices>
      <emulator>/usr/bin/qemu-system-s390x</emulator>
      <disk type='file' device='disk'>
        <driver name='qemu' type='qcow2' cache='none'/>
        <source file='/var/lib/libvirt/images/xenial-server-cloudimg-s390x-disk1.img'/>
        <backingStore/>
        <target dev='vda' bus='virtio'/>
        <alias name='virtio-disk0'/>
        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
      </disk>
      <disk type='file' device='cdrom'>
        <driver name='qemu' type='raw'/>
        <source file='/var/lib/libvirt/images/config.iso'/>
        <backingStore/>
        <target dev='sda' bus='scsi'/>
        <readonly/>
        <alias name='scsi0-0-0-0'/>
        <address type='drive' controller='0' bus='0' target='0' unit='0'/>
      </disk>
      <controller type='scsi' index='0' model='virtio-scsi'>
        <alias name='scsi0'/>
        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0003'/>
      </controller>
      <interface type='bridge'>
        <mac address='52:54:00:4b:78:fa'/>
        <source bridge='br-mgmt'/>
        <virtualport type='openvswitch'>
          <parameters interfaceid='e45852b2-d0e9-4049-a215-d0996c607f51'/>
        </virtualport>
        <target dev='vnet0'/>
        <model type='virtio'/>
        <alias name='net0'/>
        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
      </interface>
      <interface type='bridge'>
        <mac address='52:54:00:21:13:b8'/>
        <source bridge='br-data'/>
        <virtualport type='openvswitch'>
          <parameters interfaceid='8d383a71-3a5f-4813-949a-b5931828e12f'/>
        </virtualport>
        <target dev='vnet1'/>
        <model type='virtio'/>
        <alias name='net1'/>
        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
      </interface>
      <console type='pty' tty='/dev/pts/1'>
        <source path='/dev/pts/1'/>
        <target type='sclp' port='0'/>
        <alias name='console0'/>
      </console>
      <memballoon model='virtio'>
        <alias name='balloon0'/>
        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0004'/>
      </memballoon>
    </devices>
    <seclabel type='dynamic' model='apparmor' relabel='yes'>
      <label>libvirt-455e6998-cec1-4010-99a6-d033ee6d3385</label>
      <imagelabel>libvirt-455e6998-cec1-4010-99a6-d033ee6d3385</imagelabel>
    </seclabel>
  </domain>

  
  in the guest check interfaces and remember the mac address
  # ip a
  Do a reboot (or multiple) and check again if the interface-mac combination is still the same

  The interface order should change from time to time
   
  Userspace tool common name: udev? 

  Userspace rpm: ? 
   
  The userspace tool has the following bit modes: 64 

  Userspace tool obtained from project website:  na

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1679674/+subscriptions



More information about the foundations-bugs mailing list