From: Guido Günther Date: Thu, 13 Aug 2015 12:19:50 +0000 (+0200) Subject: Check if qemu-bridge-helper exists and is executable X-Git-Tag: v1.2.18.1~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca2081198432ebfeb83d31eaf9fc9edc9ceea24c;p=thirdparty%2Flibvirt.git Check if qemu-bridge-helper exists and is executable Otherwise the error is just error: Failed to create domain from test1.xml error: failed to retrieve file descriptor for interface: Transport endpoint is not connected since we don't get a sensible error after the fork. (cherry picked from commit 151ba022939dad1e562c4156cb62e7a3ade6a7f5) --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2d222da5fd..d12eb54d13 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -296,6 +296,12 @@ static int qemuCreateInBridgePortWithHelper(virQEMUDriverConfigPtr cfg, return -1; } + if (!virFileIsExecutable(cfg->bridgeHelperName)) { + virReportSystemError(errno, _("'%s' is not a suitable bridge helper"), + cfg->bridgeHelperName); + return -1; + } + cmd = virCommandNew(cfg->bridgeHelperName); if (flags & VIR_NETDEV_TAP_CREATE_VNET_HDR) virCommandAddArgFormat(cmd, "--use-vnet");