Bug 1262127 - Better diagnostic message when virbr0 doesn't exist
Summary: Better diagnostic message when virbr0 doesn't exist
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-10 21:18 UTC by Richard W.M. Jones
Modified: 2015-09-11 11:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-11 11:01:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2015-09-10 21:18:53 UTC
Description of problem:

If virbr0 (or whatever LIBGUESTFS_BACKEND_SETTINGS=network_bridge=...
points to) doesn't exist, then when we start libvirt we get a
pretty useless error:

  virt-builder: error: libguestfs error: could not create appliance through 
  libvirt.

  Try running qemu directly without libvirt using this environment variable:
  export LIBGUESTFS_BACKEND=direct

  Original error from libvirt: Cannot get interface MTU on 'virbr0': No such 
  device [code=38 domain=0]

We could avoid this error entirely by checking if the network
exists before starting libvirt.

Version-Release number of selected component (if applicable):

libguestfs from git

How reproducible:

100%

Steps to Reproduce:

$ LIBGUESTFS_BACKEND=libvirt \
  LIBGUESTFS_BACKEND_SETTINGS=network_bridge=nosuchnetwork \
  guestfish --network run
libguestfs: error: could not create appliance through libvirt.

Try running qemu directly without libvirt using this environment variable:
export LIBGUESTFS_BACKEND=direct

Original error from libvirt: failed to retrieve file descriptor for interface: Transport endpoint is not connected [code=38 domain=10]

Comment 2 Richard W.M. Jones 2015-09-10 22:07:28 UTC
Patch posted:
https://www.redhat.com/archives/libguestfs/2015-September/msg00042.html

Comment 3 Richard W.M. Jones 2015-09-11 11:01:26 UTC
Fixed upstream in libguestfs >= 1.31.6.


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