Bug 244788 - virt-manager/libvirt creates Windows XP virtual machine with no explicit 'vethX' interface name leading to conflict with 'veth0' in other virtual machine
Summary: virt-manager/libvirt creates Windows XP virtual machine with no explicit 'vet...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 7
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-19 07:51 UTC by Nathan Watson
Modified: 2008-06-17 01:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-17 01:39:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nathan Watson 2007-06-19 07:51:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

Description of problem:
I have two virtual QEMU/KVM virtual machines on a Fedora 7 x86_64 machine.
Both are running "hardware-accelerated ?" (QEMU + KVM).  The 'virbr0'
virtual network is started by default by libvirtd et. al. (?) on
machine startup.

I can run both machines separately, i.e., one at a time, but cannot
run both together.  Whenever trying to start the second virtual
machine I get a particular error which I'll describe later.

One virtual machine is Fedora Core 7 running x86_64 (QEMU + KVM).
The other virtual machine is Windows XP Pro SP 2 (SP 2 from install,
not applied post-install), running on i686 (QEMU + KVM, I'm supposing
hardware KVM works on x86_64 for i686 since the virtual machine runs
fine in i686 other than this networking issue).


Version-Release number of selected component (if applicable):
qemu-0.9.0-2.fc7 libvirt-0.2.3-1.fc7 kvm-24-1 (libvirt-python-0.2.3-1.fc7 ??)

How reproducible:
Always


Steps to Reproduce:
[1] Boot machine into *.fc7 (not *.fc7xen) kernel, along with
    'qemu' and 'libvirtd' daemons started at beginning

[2] virtual network 'virbr0' started automatically, config file
    shown below

[3] start either virtual machine 'BogatzaFedora7M01' or
    'BogatzaWinXpProM02', both are configured to attach to
    'virbr0' (this step succeeds) -- NOTE:  I used virt-manager
    to create/install both virtual machines, and also to
    start/stop the virtual machines

[4] while first virtual machine is one, try to start the
    other virtual machine, which also attaches to 'virbr0'
    virtual network (start from virt-manager) --
    THIS STEP FAILS WITH ERROR SHOW IN THE "Actual Results"
    section


Actual Results:
In every case where I try to start second virtual machine I get
a virt-manager error dialog box exposing an error seen at the Python
level (must be virt-manager impl lang?).  The dialog box has as
heading:

  virDomainCreate() failed internal error Failed to add tap
  interface 'vnet0' to bridge 'virbr0':  Device or resource busy

... there is a Details "button" allowing one to see more error
details, the details read:

Unable to start virtual machine '<class 'libvirt.libvirtError'> virDomainCreate() failed internal error Failed to add tap interface 'vnet0' to bridge
'virbr0' : Device or resource busy
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/console.py", line 348, in control_vm_run
    self.vm.startup()
  File "/usr/share/virt-manager/virtManager/domain.py", line 361, in startup
    self.vm.create()
  File "/usr/lib64/python2.5/site-packages/libvirt.py", line 217, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: virDomainCreate() failed internal error Failed to add tap interface 'vnet0' to bridge 'virbr0' : Device or resource busy
'

There is no workaround that I can see since it's necessary and
essential to attach multiple machines to the same virtual
network.

Expected Results:
virt-manager/libvirt, etc., should start second virtual machine without
complaining and without problem.

(And I assume the 'veth0' is a virtual-machine-visible interface
name, and that the 'veth0' apparently started by the two machines
should not conflict in namespace with each other.  In any case,
I'll probably try to state an explicit 'veth1' for the Windows XP
virtual machine definition, because (a) it's missing; and (b) it
might resolve the problem by avoiding namespace/perceived-device
clash.)

(I might also try creating a second virtual network 'virbr1' and
attaching the two machines to independent networks or to the
second network and see what happens there.)

Additional info:

--- DIRECTORY LISTING FOR:  /etc/libvirt/qemu (config dir for QEMU virt env)

.:
BogatzaFedora7m01.xml
BogatzaWinXpProM02.xml
networks

./networks:
autostart
default.xml

./networks/autostart:
default.xml

--- config for Fedora 7 virt machine, untouched/unedited, as created/maintained
    by virt-manager

<domain type='kvm'>
  <name>BogatzaFedora7m01</name>
  <uuid>b1b4fa10-927b-fde1-c6de-eabfbbd8ecf0</uuid>
  <memory>1024000</memory>
  <currentMemory>1024000</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='block' device='disk'>
      <source dev='/dev/NoRaidVolGroupB/BogatzaFedora7m01_RootFs'/>
      <target dev='hda'/>
    </disk>
    <interface type='network'>
      <mac address='00:16:3e:56:4b:5a'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>
    <graphics type='vnc' port='-1'/>
  </devices>
</domain>

--- config for in XP virt machine, untouched/unedited, as created/maintained
    by virt-manager

<domain type='kvm'>
  <name>BogatzaWinXpProM02</name>
  <uuid>2414b75d-bee1-b91d-bb64-93f3f318edeb</uuid>
  <memory>512000</memory>
  <currentMemory>512000</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='block' device='disk'>
      <source dev='/dev/NoRaidVolGroupB/BogatzaWinXpProM02_RootFs'/>
      <target dev='hda'/>
    </disk>
    <interface type='network'>
      <mac address='00:16:3e:63:42:f4'/>
      <source network='default'/>
    </interface>
    <graphics type='vnc' port='-1'/>
  </devices>
</domain>

--- config for 'default' network 'virbr0', edited only to change the
    DHCP range (and the problem occurred before ever changing this
    DHCP range by hand and re-booting)

<network>
  <name>default</name>
  <uuid>d83670ee-a32a-4d07-9939-e83071852405</uuid>
  <bridge name="virbr0" />
  <forward/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.100" end="192.168.122.110" />
    </dhcp>
  </ip>
</network>

Comment 1 Nathan Watson 2007-06-19 08:10:56 UTC
One more thing:  whenever I run into the problem starting
the second virtual machine, if I shut down the first virtual
machine and then try again to start the "second" virtual
machine, it succeeds.

Comment 2 Nathan Watson 2007-06-19 08:24:25 UTC
OK ... the thing where I add an explicit 'veth1' to the
Windows XP thing seems to work OK ... haven't tried the
networking in the Windows XP virtual machine (i.e., I'm
not sure the Win XP machine will actually find the new
virtual interface), but at least both machines start up.

... with some more work ... I find that both virtual
machines now can start up together, and that they both
can 'ping' internal and external targets, and internet
browsers can reach and pull down www.yahoo.com.

Based on this I'm changing the bug title from:  "Running 2nd
QEMU/KVM virtual machine fails when setting up virtual
networking to bridge 'virbr0'" to "virt-manager/libvirt
creates Windows XP virtual machine with no explicit
'vethX' interface name leading to conflict with
'veth0' in other virtual machine" -- I believe that's what happened.

I suppose the 'vethX' stuff can conflict namespace-wise at
the host level and must be unique across all virtual machines (?).

Comment 3 Bug Zapper 2008-05-14 13:11:23 UTC
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Bug Zapper 2008-06-17 01:39:05 UTC
Fedora 7 changed to end-of-life (EOL) status on June 13, 2008. 
Fedora 7 is no longer maintained, which means that it will not 
receive any further security or bug fix updates. As a result we 
are closing this bug. 

If you can reproduce this bug against a currently maintained version 
of Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.