From owner-freebsd-hackers@freebsd.org Wed Aug 9 19:14:23 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 906B1DD3C64 for ; Wed, 9 Aug 2017 19:14:23 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2445881CF3 for ; Wed, 9 Aug 2017 19:14:23 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-wm0-x235.google.com with SMTP id f15so4332574wmg.1 for ; Wed, 09 Aug 2017 12:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=CTqEs8O90uLQk1SeBCqe5exg7LX6/yI3AZ7KybzYpHg=; b=lsFc/vGXKZcJa/qKq3kgHusnFVmhhGOBV4A5P3H/kRgIcxgVukSh4VFstIgFllKUEi WPtLwQLetR4ouM6PUMm+Vvubww4ylQLo9GYBDcLMkkV5g7W2IhKX+ymFAYew2YMD6xTj oYr4oQpt40rQF1oh9GVfbk79CYRslaLXFtmWVNPGqSPMqpR7cIb1fstMCKXQgDohWUNa EeJxxdoAIOFx8iY5W90hp2oyq8gdGYfsldoIOCif30Oq5UwkS6Gz9L2WvFryAMXmmUvK HOWkRxGCeXvvXOkcgH10fmchoBmYmBOA1KB7eINQC77WQ7vPB0dwpthCD+Q19kReMLKv Pxfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=CTqEs8O90uLQk1SeBCqe5exg7LX6/yI3AZ7KybzYpHg=; b=iXeOeM1WN45hFLAfOteF1lzXowX1ctowhPq+1r1RxvhszYlF0xXs20z6PX2FnDYbWs 8mzRDBRfGZTwBNbociS38siFrI2Hn82SsQZ3BbGv40e+mxlodnKLyRnHPBX2CgoEoMSN 3/1ZY795XY2kEkLOdO2KoBLVzAVaQ9q8OAacrky0XLQzfrBmTz8/KmXpjFK+qM/Nr7XV qoe4Kl1O0k2zGOhvtBMKAtw1iStQLVRw9NmkMZ6dy6MmE2pe8+2L+DuVHvfL1h10Faik 1sy88+h3GNQZPD0ooOa7Z3SjNIsa1UWQqYC5zZftXW9o5AitO5AQOKXCBszqP0QNgO+6 P8oA== X-Gm-Message-State: AHYfb5h9ncXBImF49wcn+bVTSV98lAb9MNdov8uM4AScHr7SHEAGrWXm FAl4Plp+I+0uZI1tGNsV8X0+6izbzw== X-Received: by 10.28.170.18 with SMTP id t18mr5866836wme.6.1502306061258; Wed, 09 Aug 2017 12:14:21 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.28.208.3 with HTTP; Wed, 9 Aug 2017 12:14:20 -0700 (PDT) In-Reply-To: References: From: Alan Somers Date: Wed, 9 Aug 2017 13:14:20 -0600 X-Google-Sender-Auth: bHUFYTgiY-BekiBdXn4gtsX_zKY Message-ID: Subject: Re: devd in jail To: Giulio Ferro Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2017 19:14:23 -0000 On Wed, Aug 9, 2017 at 12:47 PM, Giulio Ferro wrote: > Hello all, > > Setup : 11.1-STABLE FreeBSD 11.1-STABLE #0 r321925M amd64 > > > I'm trying to create a fully virtualized desktop enviroment in a jail by > means of installing there > a xrdp-devel server + Xorg installation (xorg + xorgrdp). > > Everything seems to work until the moment when the X server actually tries > to come up (after I choose session=xorg, username + password) > In the X logs in the jail, in fact, I have this error: > > ... > [ 9768.824] (EE) config/devd: fail to connect to devd > [ 9768.824] [config] failed to initialise devd > > > I've checked on the host machine, and I don't have that error as everything > works fine there... > > In my jail, I've setup the devfs like this (/etc/jail.conf in the host): > > --- > exec.start="/bin/sh /etc/rc"; > exec.stop="/bin/sh /etc/rc.shutdown"; > exec.clean; > mount.devfs; > devfs_ruleset=1; > > path="/usr/home/jail/$name"; > > myjail { > host.hostname="myjail.me.com"; > vnet; > vnet.interface = epair0b, epair1b; > persist; > } > --- > > > and in the /etc/devfs.conf everythink is commented out. > > In the /dev directory in the jail, I get both the devctl and devctl2 > devices. > > As the devd demon is not running in the jail, I've tried adding > devd_enable="YES" > > in the rc.conf (jail), but when I try to start it, I get: > > # /etc/rc.d/devd start > Starting devd. > devd: Can't open devctl device /dev/devctl: Device busy > /etc/rc.d/devd: WARNING: failed to start devd > > > Do you know if I'm doing something wrong, or there's a proper way to have > devd running in the jail? > > I've thought that maybe I should use the devtcl2 device, as the devctl is > used by the host, > but I don't know how to specify that to devd... > > Thanks in advance for your help. > > Giulio Unfortunately, you're not going to be able to run devd(8) in the jail. /dev/devctl can be opened by only one reader at a time, and that reader is always devd(8). /dev/devctl2 is actually a completely different device with a totally different interface. Apologies for the confusing names. But you may not need to run a totally separate instance of devd. The X server is probably trying to open either /var/run/devd.pipe or /var/run/devd.seqpacket.pipe. ktrace would tell you which. If you can bridge those sockets into the jail, then X would probably run. -Alan