From owner-freebsd-questions@freebsd.org Thu Aug 24 10:10:25 2017 Return-Path: Delivered-To: freebsd-questions@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 E202CDDBBF9 for ; Thu, 24 Aug 2017 10:10:25 +0000 (UTC) (envelope-from frank2@fjl.co.uk) Received: from bs1.fjl.org.uk (bs1.fjl.org.uk [84.45.41.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bs1.fjl.org.uk", Issuer "bs1.fjl.org.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 605A272840 for ; Thu, 24 Aug 2017 10:10:25 +0000 (UTC) (envelope-from frank2@fjl.co.uk) Received: from [192.168.1.35] (host86-191-18-76.range86-191.btcentralplus.com [86.191.18.76]) (authenticated bits=0) by bs1.fjl.org.uk (8.14.4/8.14.4) with ESMTP id v7OAAN9v079355 for ; Thu, 24 Aug 2017 11:10:23 +0100 (BST) (envelope-from frank2@fjl.co.uk) Subject: Re: FreeBSD 11.1 xen trying to create linux domU instance To: freebsd-questions@freebsd.org References: From: Frank Leonhardt Message-ID: Date: Thu, 24 Aug 2017 11:10:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2017 10:10:26 -0000 Hi James, As you might have discovered, the handbook article is wrong on a few points (mainly omissions I think). Hang in there; it does actually work. I'm running Windoze using it perfectly well. First question - I thought that too. Every time it boots you look to check the setting and it's turned of "off", right? Well it isn't. Unless you look. It boots the xen kernel anyway if you just leave it. I think the 4th stuff loads defaults when you open that options menu. The handbook tells you to create a ZFS zvol for the virtual HD. I'm not keen on that idea for all sorts of reasons (mainly CoW) and use a file instead. I can't see anything wrong with your config assuming the specific stuff is correct. To help in debugging, comment out (with a #) the vif line. You DON'T need this for the VNC viewer to connect. (And you may have noticed that the autobridge stuff in rc.conf doesn't play anyway). The disk definition is very flexible. I think your way of doing it is fine, except that you're re-specifying some default values for no reason. xl barfs at the slightest problem, so the syntax is probably good. The next I'd try would be to use a straightforward file instead of the zvol. I just create them using dd to the size I want and it "just works". One non-obvous thing is that "hda" means Hard Disk 'A'. hdc means C. What about hdb? It doesn't matter if you leave a gap, but unless you realise this you'll have chaos and confusion when to define extra disks. You ARE running xl as root, aren't you? Regards, Frank. On 18/08/2017 23:34, James E. Pace wrote: > Hi, > > I have a couple questions about running xen with FreeBSD 11.1 (amd64) as > Dom0. I am pretty new to this whole concept, so it is very likely I am not > understanding something. > > First, each time I boot the (physical) system, I have to tell the FreeBSD > boot loader to turn on xen. (That is, hit 6 to set options, then 7 to > enable xen, then 1 to return to the main menu, then 1 to boot). Is there a > way to make this the default behavior? > > Second, I want to create a Linux domU instance. I have been successful in > getting a FreeBSD 11.1 domU running, but changing that config file to use a > Linux CD doesn't boot (or crashes on boot?). > > Here's my xen config file: > > builder = "hvm" > name = "xen-ubuntu" > memory = 1024 > vcpus = 1 > vif = [ 'bridge=bridge0' ] > disk = [ > '/dev/zvol/pool/xen-ubuntu,,hda,rw', > '/pool/Downloads/ubuntu-15.10-desktop-amd64.iso,raw,hdc:cdrom,r' > ] > vnc = 1 > vnclisten = "0.0.0.0" > serial = "pty" > > I created the backing filesystem with: > zfs create -V20G -o volmode=dev pool/xen-ubuntu > > "xl create foo.cfg" returns fine, and "xl list" shows the instance, but the > running instance (in vncviewer) eventually spits out: > > 4.130084] vbd vbd-5632: 19 xenbus_dev_probe on device/vbd/5632 > 4.130956] vbd vbd-5632: failed to write error node for device > device/vbd/5632 (19 xenbus_dev_probe on device/vbd/5632) > > I suspect the linux kernel isn't booting because it can't figure out > something about the zfs volume. But I'm not sure, and I don't know how to > work around it. > > Google has been pretty unhelpful... > > Thanks for help, tips, or pointers to info! > > James >