virt-builder fail with "bridge ‘virbr0’ not found" (fixed by LIBGUESTFS_BACKEND=direct ?!)
I'm trying to build fedora-27 image for testing uploads: $ virt-builder fedora-27 -o /var/tmp/fedora-27.img ... [ 25.2] Opening the new disk virt-builder: error: libguestfs error: bridge ‘virbr0’ not found. Try running: brctl show to get a list of bridges on the host, and then selecting the bridge you wish the appliance network to connect to using: export _SETTINGS=network_bridge=<bridge name> I don't want to add bridges to my new fresh oVirt test host, and remember that this used to work previously without the bridge. So I tried the usual "fix" (I know it should not be used in production): $ export LIBGUESTFS_BACKEND=direct And for some reason this works now: $ virt-builder fedora-27 -o /var/tmp/fedora-27.img ... [ 41.2] Finishing off Output file: /var/tmp/fedora-27.img Output size: 6.0G Output format: raw Total usable space: 5.3G Free space: 4.4G (81%) How LIBGUESTFS_BACKEND is related to the bridge? why do we need the bridge for building an image? Nir
On Tuesday, 9 October 2018 20:16:04 CEST Nir Soffer wrote:
I'm trying to build fedora-27 image for testing uploads:
$ virt-builder fedora-27 -o /var/tmp/fedora-27.img ... [ 25.2] Opening the new disk virt-builder: error: libguestfs error: bridge ‘virbr0’ not found. Try running:
brctl show
to get a list of bridges on the host, and then selecting the bridge you wish the appliance network to connect to using:
export _SETTINGS=network_bridge=<bridge name>
The libvirt backend uses a network bridge on the host to setup the networking in the guest, which is enabled by default in virt-builder.
I don't want to add bridges to my new fresh oVirt test host, and remember that this used to work previously without the bridge.
"used to work" which version with? And which version are you using now? -- Pino Toscano
On Wed, Oct 10, 2018 at 10:18 AM Pino Toscano <ptoscano@redhat.com> wrote:
On Tuesday, 9 October 2018 20:16:04 CEST Nir Soffer wrote:
I'm trying to build fedora-27 image for testing uploads:
$ virt-builder fedora-27 -o /var/tmp/fedora-27.img ... [ 25.2] Opening the new disk virt-builder: error: libguestfs error: bridge ‘virbr0’ not found. Try running:
brctl show
to get a list of bridges on the host, and then selecting the bridge you wish the appliance network to connect to using:
export _SETTINGS=network_bridge=<bridge name>
The libvirt backend uses a network bridge on the host to setup the networking in the guest, which is enabled by default in virt-builder.
OK, now it is clear why bypassing libvirt avoids this issue. So maybe I'm missing some libvirt package required for creating the bridge? libvirt is installed by vdsm, which requires: libvirt-client libvirt-daemon-config-nwfilter libvirt-daemon-kvm libvirt-lock-sanlock libvirt-python
I don't want to add bridges to my new fresh oVirt test host, and remember that this used to work previously without the bridge.
"used to work" which version with?
What was available in Fedora 28 2-3 month ago. The vm used for running this was lost, so I don't have more specific info.
And which version are you using now?
$ rpm -q libguestfs-tools-c libguestfs-tools-c-1.38.4-1.fc28.x86_64 Nir
On Wed, Oct 10, 2018 at 02:27:44PM +0300, Nir Soffer wrote:
On Wed, Oct 10, 2018 at 10:18 AM Pino Toscano <ptoscano@redhat.com> wrote:
On Tuesday, 9 October 2018 20:16:04 CEST Nir Soffer wrote:
I'm trying to build fedora-27 image for testing uploads:
$ virt-builder fedora-27 -o /var/tmp/fedora-27.img ... [ 25.2] Opening the new disk virt-builder: error: libguestfs error: bridge ‘virbr0’ not found. Try running:
brctl show
to get a list of bridges on the host, and then selecting the bridge you wish the appliance network to connect to using:
export _SETTINGS=network_bridge=<bridge name>
The libvirt backend uses a network bridge on the host to setup the networking in the guest, which is enabled by default in virt-builder.
OK, now it is clear why bypassing libvirt avoids this issue.
So maybe I'm missing some libvirt package required for creating the bridge?
libvirt is installed by vdsm, which requires: libvirt-client libvirt-daemon-config-nwfilter libvirt-daemon-kvm libvirt-lock-sanlock libvirt-python
virbr0 is provided by the libvirt default virtual network, which sets up NAT based forwarding VDSM doesn't want this network connectivity so it doesn't install the libvirt default network, hence you don't have any virbr0. You can get it by installing the libvirt-daemon-config-network RPM Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
On Wed, Oct 10, 2018 at 2:49 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
On Wed, Oct 10, 2018 at 02:27:44PM +0300, Nir Soffer wrote:
On Wed, Oct 10, 2018 at 10:18 AM Pino Toscano <ptoscano@redhat.com> wrote:
On Tuesday, 9 October 2018 20:16:04 CEST Nir Soffer wrote:
I'm trying to build fedora-27 image for testing uploads:
$ virt-builder fedora-27 -o /var/tmp/fedora-27.img ... [ 25.2] Opening the new disk virt-builder: error: libguestfs error: bridge ‘virbr0’ not found. Try running:
brctl show
to get a list of bridges on the host, and then selecting the bridge you wish the appliance network to connect to using:
export _SETTINGS=network_bridge=<bridge name>
The libvirt backend uses a network bridge on the host to setup the networking in the guest, which is enabled by default in virt-builder.
OK, now it is clear why bypassing libvirt avoids this issue.
So maybe I'm missing some libvirt package required for creating the bridge?
libvirt is installed by vdsm, which requires: libvirt-client libvirt-daemon-config-nwfilter libvirt-daemon-kvm libvirt-lock-sanlock libvirt-python
virbr0 is provided by the libvirt default virtual network, which sets up NAT based forwarding
VDSM doesn't want this network connectivity so it doesn't install the libvirt default network, hence you don't have any virbr0.
You can get it by installing the libvirt-daemon-config-network RPM
So maybe libguestfs-tools-c should depend on it? Nir
On Wed, Oct 10, 2018 at 04:22:36PM +0300, Nir Soffer wrote:
On Wed, Oct 10, 2018 at 2:49 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
On Wed, Oct 10, 2018 at 02:27:44PM +0300, Nir Soffer wrote:
On Wed, Oct 10, 2018 at 10:18 AM Pino Toscano <ptoscano@redhat.com> wrote:
On Tuesday, 9 October 2018 20:16:04 CEST Nir Soffer wrote:
I'm trying to build fedora-27 image for testing uploads:
$ virt-builder fedora-27 -o /var/tmp/fedora-27.img ... [ 25.2] Opening the new disk virt-builder: error: libguestfs error: bridge ‘virbr0’ not found. Try running:
brctl show
to get a list of bridges on the host, and then selecting the bridge you wish the appliance network to connect to using:
export _SETTINGS=network_bridge=<bridge name>
The libvirt backend uses a network bridge on the host to setup the networking in the guest, which is enabled by default in virt-builder.
OK, now it is clear why bypassing libvirt avoids this issue.
So maybe I'm missing some libvirt package required for creating the bridge?
libvirt is installed by vdsm, which requires: libvirt-client libvirt-daemon-config-nwfilter libvirt-daemon-kvm libvirt-lock-sanlock libvirt-python
virbr0 is provided by the libvirt default virtual network, which sets up NAT based forwarding
VDSM doesn't want this network connectivity so it doesn't install the libvirt default network, hence you don't have any virbr0.
You can get it by installing the libvirt-daemon-config-network RPM
So maybe libguestfs-tools-c should depend on it?
It should probably only be a "Recommends", but yes I agree. (Also it's a dependency of libguestfs itself, not just the tools, since anything that wants networking might need it.) I pushed this change to Fedora 30+: https://src.fedoraproject.org/rpms/libguestfs/c/3c0504323ef572cfe0b6d8158d4c... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
participants (4)
-
Daniel P. Berrangé -
Nir Soffer -
Pino Toscano -
Richard W.M. Jones