attach-interface only works every other time

Bug #618916 reported by Jamie Strandboge
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Maverick by Jack Leigh

Bug Description

After starting a VM, attach-interface does not work the first time, but does the second. Notice the following set of commands:

$ virsh -c qemu:///system attach-interface "qatest-i386" network default --mac "52:00:00:00:00:00"
error: Failed to attach interface
error: operation failed: adding rtl8139,vlan=1,id=net1,mac=52:00:00:00:00:00,bus=pci.0,addr=0x5 device failed: pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
$ virsh dumpxml qatest-i386 | grep 52:00
$ virsh -c qemu:///system attach-interface "qatest-i386" network default --mac "52:00:00:00:00:00"
Interface attached successfully
$ virsh dumpxml qatest-i386 |grep 52:00
      <mac address='52:00:00:00:00:00'/>
$ virsh -c qemu:///system attach-interface "qatest-i386" network default --mac "52:00:00:00:00:00"
error: Failed to attach interface
error: operation failed: adding rtl8139,vlan=2,id=net2,mac=52:00:00:00:00:00,bus=pci.0,addr=0x7 device failed: pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
$ virsh dumpxml qatest-i386 |grep 52:00
      <mac address='52:00:00:00:00:00'/>
$ virsh -c qemu:///system attach-interface "qatest-i386" network default --mac "52:00:00:00:00:00"
Interface attached successfully
$ virsh dumpxml qatest-i386 |grep 52:00
      <mac address='52:00:00:00:00:00'/>
      <mac address='52:00:00:00:00:00'/>

I have the kvm-pxe package installed and "pxe-rtl8139.bin" is available, so I don't know why qemu is complaining. This is not an AppArmor problem (it would block every time). This was found by using the test-libvirt.py script in lp:qa-regression-testing.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: libvirt-bin 0.8.3-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.35-15.21-generic 2.6.35.1
Uname: Linux 2.6.35-15-generic x86_64
Architecture: amd64
Date: Mon Aug 16 16:18:46 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: libvirt

Revision history for this message
Jamie Strandboge (jdstrand) wrote :
tags: added: regression-potential
Revision history for this message
Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Could you attach the complete xmldump of the guest before and after the different commands?

Changed in libvirt (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Mathias, as mentioned, this was caught by the QRT test script. This is repeatable for me using an up to date i386 maverick VM (ie, qemu, not kvm).

Attached is a tar file with the following xml files:
before_start.xml: output of virsh dumpxml before the domain is started
first_attach_fail.xml: output of virsh dumpxml after the domain is started and the first virsh attach-interface failed
second_attach_success.xml: output of virsh dumpxml after the domain is started and the second attach-interface succeeded

Changed in libvirt (Ubuntu):
status: Incomplete → New
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Using the same XML (excepting modifying the path for the disk image), the attach-interface works on an amd64 system.

C de-Avillez (hggdh2)
tags: added: regression-release
removed: regression-potential
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi Jamie,

Do you see this problem in natty?

Can you still reproduce it in maverick?

Changed in libvirt (Ubuntu):
status: New → Incomplete
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This works properly in Natty using 0.8.8-1ubuntu4 on i386.

Changed in libvirt (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.