How can I have a list of interfaces in virt-manager network config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a standalone VM host running Debian bookworm, which features
libvirt 9.0.0 and qemu 7.2. My users mostly have Debian unstable on
their notebooks, which currently comes with virt manager 4.1.0. The host
has a 802.1Q VLAN trunk to the network with contains a number of VLANs.
Each VLAN has a bridge host-side, for example VLAN 188:

[3/114]mh@spiral:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 4c:52:62:b4:53:12 brd ff:ff:ff:ff:ff:ff
    altname enp2s0
    inet6 fe80::4e52:62ff:feb4:5312/64 scope link 
       valid_lft forever preferred_lft forever
5: int188: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 96:f3:9b:c6:7f:db brd ff:ff:ff:ff:ff:ff
    inet6 fe80::94f3:9bff:fec6:7fdb/64 scope link 
       valid_lft forever preferred_lft forever
21: vlan188@eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master int188 state UP group default qlen 1000
    link/ether 4c:52:62:b4:53:12 brd ff:ff:ff:ff:ff:ff

This is configured with systemd-networkd:
==> /etc/systemd/network/10-eno1.network <==
[Match]
Name=eno1

[Network]
Description=eno1 VLAN 1xx
DHCP=no
IPForward=no
IPv6AcceptRA=no
IPv6SendRA=no
DHCPv6PrefixDelegation=no

[Network]
VLAN=vlan188

/etc/systemd/network/int188.netdev <==
[NetDev]
Name=int188
Kind=bridge

==> /etc/systemd/network/int188.network <==
[Match]
Name=int188

[Network]
Description=int188 Labor
DHCP=no
IPForward=no
IPv6AcceptRA=no
IPv6SendRA=no
DHCPv6PrefixDelegation=no

==> /etc/systemd/network/vlan188.netdev <==
[NetDev]
Name=vlan188
Kind=vlan

[VLAN]
Id=188

==> /etc/systemd/network/vlan188.network <==
[Match]
Name=vlan188

[Network]
Description=vlan188 Labor
Bridge=int188
DHCP=no
IPForward=no
IPv6AcceptRA=no
IPv6SendRA=no
DHCPv6PrefixDelegation=no

I can attach a VM to that vlan in virt-manager by selecting the virtual
NIC, network source: bridge device, device name: int188. This works and
results in the following XML snippet:
<interface type="bridge">
  <mac address="52:54:00:af:fd:f8"/>
  <source bridge="int188"/>
  <model type="virtio"/>
  <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>

Network configuration host-wise looks like this:
1 [13/119]mh@spiral:~ $ virsh net-list
 Name   State   Autostart   Persistent
----------------------------------------

[14/120]mh@spiral:~ $ virsh iface-list
 Name     State    MAC Address
--------------------------------------
 eno1     active   4c:52:62:b4:53:12
 int188   active   96:f3:9b:c6:7f:db

[15/120]mh@spiral:~ $ virsh iface-dumpxml int188
<interface type='bridge' name='int188'>
  <mtu size='1500'/>
  <bridge stp='off' delay='1500'>
    <interface type='vlan' name='vlan188'>
      <link speed='1000' state='up'/>
      <vlan tag='188'>
        <interface name='eno1'/>
      </vlan>
    </interface>
  </bridge>
</interface>

[16/121]mh@spiral:~ $

So far so good, this is useable. However, I need to document a list of
available interfaces since the interface name "int188" needs to be
entered in a text area in virt-manager.

The dialog in virt-manager also has a list box that is pre-filled with
"Virtual Network 'default'", "Bridge Device..." and "Macvtap device...",
and the text area for the bridge device name shows up once "Bridge
device" is selected.

Can I configure somewhere (may it be in libvirt, may it be in
virt-manager) a list of network interfaces, so that this list box has
like "Bridge Device int181", "Bridge Device int188" etc in addition to
the three entries that are already present, to give my users a hint
about which interfaces might be available?

You can also point me towards documentation if I might have missed
something.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421
_______________________________________________
Users mailing list -- users@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux