Bug 1109574 - "Create Virtual Machine" wizard: Step 5 only lists the last virtual bridge declared in /etc/network/interfaces
Summary: "Create Virtual Machine" wizard: Step 5 only lists the last virtual bridge de...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-15 15:47 UTC by kdex
Modified: 2014-06-18 20:24 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-06-18 16:45:59 UTC
Embargoed:


Attachments (Terms of Use)
Full debug output up to step 5/5. (7.79 KB, text/plain)
2014-06-16 05:09 UTC, kdex
no flags Details
/etc/network/interfaces (trimmed) (2.22 KB, text/plain)
2014-06-16 05:20 UTC, kdex
no flags Details
Command output on server (2.06 KB, text/plain)
2014-06-17 05:57 UTC, kdex
no flags Details
ifconfig -a (3.56 KB, text/plain)
2014-06-17 06:03 UTC, kdex
no flags Details

Description kdex 2014-06-15 15:47:35 UTC
Description of problem:

Step 5/5 in "Create Virtual Machine" wizard only lists the last virtual bridge declared in /etc/network/interfaces.

Version-Release number of selected component (if applicable): Current git version. Git version details:
commit d3e9af832899088a17aeb44441e8316177f563ae
Author: Cole Robinson <crobinso>
Date:   Mon Jun 2 12:17:21 2014 -0400


How reproducible:


Steps to Reproduce:
1. Open the "Create Virtual Machine" wizard
2. Proceed until you reach step 5
3. Examine the "Advanced options" drop-down list.

Actual results:
In the advanced options, the only virtual bridges that you can choose will be the last virtual bridge that has been declared in /etc/networking/interfaces. All declared virtual bridges in /etc/networking/interfaces that precede the last bridge are not listed.

Expected results:
I would expect that I can freely choose any virtual bridge, not just the last in the previously mentioned file.


Additional info:
I have not tested if this bug was due to the naming I chose. As for my case, the specific naming for my interfaces was "vmbr0" and "vmbr1", but this, too, shouldn't matter.

The following entries were available in my list:

- Host device eth0: macvtap
- Host device vmbr1 (Empty bridge)
- Host device vnet4: macvtap
- Virtual network 'default': NAT (inactive)
- Specify shared device name

Once I uncommented the interface vmbr1 in /etc/networking/interfaces, the list contained these entries, once I rebooted my server:

- Host device eth0: macvtap
- Host device vmbr0 (Empty bridge)
- Host device vnet4: macvtap
- Virtual network 'default': NAT (inactive)
- Specify shared device name

Note that now, vmbr0 is in the list. Thus, I can conclude that only the last virtual bridge declared in /etc/network/interfaces will actually appear in the list, which should definitely be classified as a bug.

Comment 1 kdex 2014-06-15 16:09:13 UTC
After restarting virt-manger, I again tried to reproduce this issue and noticed that the list of entries shrank down even further. Without performing any changes on my server, the list now contains:

- Host device eth0: macvtap
- Virtual network 'default': NAT (inactive)
- Specify shared device name

Note that for some reason, vmbr0 has gone missing now, as well. Also, vnet4 (I'm not quite sure about what this is) has disappeared, which makes me think that their might be a small nondeterminism (or let's just call it a bug) when fetching the available host devices.

Comment 2 Cole Robinson 2014-06-15 17:21:08 UTC
Please provide:

- your distro
- your libvirt version
- output of: sudo virsh iface-list --all
- output of: sudo virsh nodedev-list --cap net

Comment 3 kdex 2014-06-15 19:58:25 UTC
Client distro: Arch Linux, 3.14.6-1-ARCH
Server distro: Debian Linux, 3.2.0-4-amd64
Libvirt version, client: 1.2.5
Libvirt version, server: 0.9.12.3

Server's output of the proposed commands:


root@kdex ~ # virsh iface-list --all
Name                 State      MAC Address
--------------------------------------------
eth0                 active     08:60:6e:69:56:a3
lo                   active     00:00:00:00:00:00
vmbr0                active     fe:54:00:27:fd:c7


root@kdex ~ # virsh nodedev-list --cap net
net_eth0_08_60_6e_69_56_a3
net_lo_00_00_00_00_00_00
net_vnet0_fe_54_00_de_4c_8c
net_vnet1_fe_54_00_27_fd_c7
net_vnet2_fe_54_00_9d_5b_e2
net_vnet3_fe_54_00_3f_10_db
net_vnet4_fe_54_00_64_b9_a0
net_vnet5_fe_54_00_81_c3_d8

Comment 4 Cole Robinson 2014-06-15 20:04:14 UTC
Those commands are run on the server, right?

Basically, if your interfaces don't show up in either of those lists, then virt-manager doesn't know anything about them. I'm guessing that netcf's handling of /etc/network/interfaces is incomplete and isn't picking up your other interface definitions.

Can you check sudo ncftool list --all on the virt server?

If the interfaces aren't showing up there, either file a bug against debian/ubuntu->netcf or try upstream netcf and if it's still broken file a bug with them.

FWIW, you can work around this in virt-manager by selecting 'Shared network device' and manually typing the bridge name you want to use... provided it's actually up and running on the host.

Comment 5 kdex 2014-06-15 21:47:40 UTC
Thanks for your prompt feedback. Yes, those commands were run on the server.

Interestingly, netcf seems to handle /etc/network/interfaces just right (note that vmbr1 is uncommented, so this following output seems okay):

root@kdex ~ #  ncftool list --all
eth0
lo
vmbr0

I was aware of the workaround you propose, but it's a little annoying (even if not many of us create new VMs on a daily basis). Given that netcf seems to work, who should I address to fix this?

Comment 6 Cole Robinson 2014-06-15 22:27:21 UTC
Hmm. I thought you were saying there are more vmbrX interfaces that weren't showing up in any of the virsh output?

Can you post the content of /etc/network/interfaces and explain again what output you expect to see in virt-manager, that you aren't seeing?

Also please post virt-manager --debug output when reproducing

Comment 7 kdex 2014-06-16 05:07:36 UTC
Initially, that indeed was what I was saying, but now, it seems that the output of ncftool list --all might contain interfaces that aren't listed by virt-manager in general.

My /etc/network/interfaces is gigantic, so I'll trim it a little. I'll post it in a minute.

As for my upcoming ./virt-manager --debug output, please note lines 150 to 153 explicitly stating:

[Mon, 16 Jun 2014 07:02:19 virt-manager 17114] DEBUG (connection:1315) interface=vmbr0 added
[Mon, 16 Jun 2014 07:02:19 virt-manager 17114] DEBUG (connection:1315) interface=lo added
[Mon, 16 Jun 2014 07:02:19 virt-manager 17114] DEBUG (connection:1315) interface=vmbr1 added
[Mon, 16 Jun 2014 07:02:19 virt-manager 17114] DEBUG (connection:1315) interface=eth0 added

Comment 8 kdex 2014-06-16 05:09:24 UTC
Created attachment 909004 [details]
Full debug output up to step 5/5.

Note lines 150 to 153 where you can see that virt-manager appears to recognize the interfaces, but fails to put them in the interface list at step 5/5.

Comment 9 kdex 2014-06-16 05:20:53 UTC
Created attachment 909007 [details]
/etc/network/interfaces (trimmed)

This file has been trimmed (it's gigantic and massively repetitive, there's not much to see other than port forwardings to various VMs).

Comment 10 kdex 2014-06-16 05:35:08 UTC
Sorry for this little comment flood, but I just noticed that I forgot to answer one of your questions:

Expected behavior: 

As I have two vmbrX interfaces, I would expect both of them to show up in step 5/5, i.e. something like this:

- Host device eth0: macvtap
- Host device vmbr0 (Empty bridge)
- Host device vmbr1 (Empty bridge)
- Virtual network 'default': NAT (inactive)
- Specify shared device name

But instead, only the lowest (thus, last declared) entry in /etc/network/interfaces vmbrX interface is shown, so right now I am seeing this:

- Host device eth0: macvtap
- Host device vmbr1 (Empty bridge)
- Virtual network 'default': NAT (inactive)
- Specify shared device name

Back in "comment 1", I was trying to to reproduce this issue again after restarting virt-manager. For some obscure reason, none of my virtual bridges were displayed then, so I was seeing this:

- Host device eth0: macvtap
- Virtual network 'default': NAT (inactive)
- Specify shared device name

This behavior is what baffles me and I think might be a bug.

Comment 11 Cole Robinson 2014-06-16 19:52:50 UTC
This is confusing. Your virt-manager --debug output says it is seeing vmbr0 and vmbr1, you say the UI is only showing vmbr1, yet ncftool and virsh iface-list only show vmbr0?

Can you show the output of 

virsh iface-list
virsh iface-list --all
for each iface: sudo virsh iface-dumpxml $iface
ifconfig -a

I'm trying to figure out where vmbr1 is coming from

Comment 12 kdex 2014-06-17 05:57:51 UTC
Created attachment 909384 [details]
Command output on server

Sure, here you go.

Comment 13 kdex 2014-06-17 06:03:22 UTC
Created attachment 909386 [details]
ifconfig -a

Comment 14 Cole Robinson 2014-06-18 16:45:59 UTC
Thanks for the info, I found the issue. Basically if bridge contained only interfaces which weren't reported to us by the interface APIs or the nodedev APIs, we failed to list it. I pushed a commit now that should fix it:

commit c78974c0d99a8b16d22d1868d649298824b066e0
Author: Cole Robinson <crobinso>
Date:   Tue Jun 17 17:04:49 2014 -0400

    connection: Drop netdev abstraction


Please pull latest git and confirm. If there are still issues, please reopen.

Comment 15 kdex 2014-06-18 20:24:27 UTC
I can confirm that this issue has been resolved by the commit you're referencing. Thanks a lot!


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