From owner-freebsd-virtualization@freebsd.org Wed Jun 1 16:05:26 2016 Return-Path: Delivered-To: freebsd-virtualization@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 0F2DFB61223 for ; Wed, 1 Jun 2016 16:05:26 +0000 (UTC) (envelope-from jeff@altometrics.com) Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::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 CCA8A133E for ; Wed, 1 Jun 2016 16:05:25 +0000 (UTC) (envelope-from jeff@altometrics.com) Received: by mail-oi0-x235.google.com with SMTP id j1so34619175oih.3 for ; Wed, 01 Jun 2016 09:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altometrics.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=NBFJX8MSvnxeZr64o819mma2xTLUlgr+g+ia7QU003k=; b=Cnig+NF9i3GsaJA/RaF26bI0kqqQ0Wq58+9x/BGYOPsyZBEtVXSXATJ/YR/yNEe8Yj GVGTxYWXtuLK2yxt1SGI9SEzfDb9B5Q+GN2w0splCzJXrgtRsrBkTCsYW4BABqmjFvfm sn+qA9+jn56hqlMiOxkBXa0RRIxiUv4VXCkgI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=NBFJX8MSvnxeZr64o819mma2xTLUlgr+g+ia7QU003k=; b=SLn9tJ5BFiVaun8qXppiTy+oQzUPsdF+1wm2g0YdAp+YZjanRbvKhCYRenjn08B84T y8W/Y3lXIVzAp5SQGutqR/oa4wNAO7F3AVItVxTpYgX5nkKbODLollqAiJdDezeHxRnJ 3SQjXNo9+z70r8OAejnplQ6W7NpyGX5vsm4n0BZIhQ7FIPxK78glsPuW74a1WYxNsUoA T8I/LTOud36tpxhzDNCKRuQ0VZt58X0Bywgztmqm48Y6P6HS8RLThUlg3ZOlkzvPZdmJ 3FSI+QOXOh6QCfJOozxxKDAqP0nTBf82evXDPgqWDHw4jx0qP3NBp1C/JymtGW2FFzqb nWJA== X-Gm-Message-State: ALyK8tKo+aJuNB6fYhypHFTwJkURv7PBt2NTdSEWHvaPgfy84CWYzKtAS5cSi6SJK0mNZgp5oJvmyCwxI5HdDg== X-Received: by 10.202.84.199 with SMTP id i190mr14480714oib.78.1464797125039; Wed, 01 Jun 2016 09:05:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.245.75 with HTTP; Wed, 1 Jun 2016 09:04:44 -0700 (PDT) X-Originating-IP: [174.109.105.28] In-Reply-To: References: From: Jeff Terrell Date: Wed, 1 Jun 2016 12:04:44 -0400 Message-ID: Subject: Re: Running FreeBSD docker images on non-FreeBSD hosts To: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2016 16:05:26 -0000 On Tue, May 31, 2016 at 6:08 PM, Kurt Lidl wrote: > What isn't really explained in so many words -- the container uses the > system calls from the hosting computer to evaluate anything that it > needs the "kernel" to do. So your "FreeBSD docker" image, when run on > a Linux machine, is attempting to make FreeBSD system calls into the > Linux kernel. > > You'd have to use some other solution to provide a "FreeBSD system call interface" to your FreeBSD docker image. > > The recent import of Linux 64bit emulation in FreeBSD allows for running > stock "docker" images on FreeBSD, because there's now a shim that > translates Linux system calls to FreeBSD ones. > > On the Mac, they have shims that provide filesystem access to the Mac's filesystems, and a virtualized machine using the xhyve stuff, providing > the Linux system call interface. > > Make no mistake about, docker is Linux inside. > > If you want to run FreeBSD inside a virtual machine, try the xhyve stuff > on the Mac, or under KVM on Linux. > > -Kurt Ah, now I get it. I didn't realize that system calls were the interface between the docker images in a container and the host. But that definitely explains why the FreeBSD images won't work apart from a FreeBSD host. So it looks like, if I'm committed to docker, I could run FreeBSD inside a KVM inside a container on Linux. Then others who might be interested in FreeBSD could play around with it on their Linux hosts via docker. And I suppose, since I need to mount a volume, I'd need to mount it both into the docker container and, from there, through KVM to FreeBSD. Not fun, but plausible at least. Thanks very much for the explanation, Kurt! -- Jeff Terrell, Ph.D. | Chief Technology Officer ALTOMETRICS, Inc. (919) 357-3116 | www.altometrics.com