From owner-freebsd-virtualization@FreeBSD.ORG Fri Oct 24 13:12:00 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1874F7B3 for ; Fri, 24 Oct 2014 13:12:00 +0000 (UTC) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [IPv6:2607:f8b0:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA1BA10D for ; Fri, 24 Oct 2014 13:11:59 +0000 (UTC) Received: by mail-vc0-f174.google.com with SMTP id hq12so215972vcb.19 for ; Fri, 24 Oct 2014 06:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YqOSV4ft9Jo7gyd8tbCCJ0G82f4ZmP6nWlLe+wb3htQ=; b=XdjXz6JdRh+C+aBZZZRD+2O0ma/0MF8AmTSIIPDXBDE10OVJVnBPx9HIhySFE686XA qKvsps6AHfLsEMADzUMYMF8kukV+R/gfjdc5NV82H2DOZKLL7oXKz8Luq5mq+quVe5wl tXy+nTDuJds6JdzDfkqQiqtW3ftM5kx/7Q6ANGRcnyl2RynWPLZuTjMhN1nhRTxJhOAd TWlbDRs7zsGWH3EjW5c8aSoN+vNXx0emiFRsIAzzZxLDjzPNylQtysC2aduD3guGCdA4 4/Qeja5mKAqQEa+t08pA7UDgwA4v5XdlcDNoUS3E3WEQVzgX5fcqFQCAxAiOv7Od3Nxa UjGg== MIME-Version: 1.0 X-Received: by 10.52.252.172 with SMTP id zt12mr2443144vdc.7.1414156318868; Fri, 24 Oct 2014 06:11:58 -0700 (PDT) Received: by 10.220.150.68 with HTTP; Fri, 24 Oct 2014 06:11:58 -0700 (PDT) In-Reply-To: <20141024045844.GA12422@dev.san.ru> References: <1414106923-32313-1-git-send-email-cse.cem@gmail.com> <1414106923-32313-2-git-send-email-cse.cem@gmail.com> <20141024045844.GA12422@dev.san.ru> Date: Fri, 24 Oct 2014 09:11:58 -0400 Message-ID: Subject: Re: [PATCHv2 1/2] bhyve: Support /domain/bootloader configuration for non-FreeBSD guests. From: Conrad Rad To: Roman Bogorodskiy Content-Type: text/plain; charset=UTF-8 Cc: libvir-list@redhat.com, "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 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: Fri, 24 Oct 2014 13:12:00 -0000 On Fri, Oct 24, 2014 at 12:58 AM, Roman Bogorodskiy wrote: > Conrad Meyer wrote: > Hi Conrad. > > Thanks for the patch. As for the /tmp, probably storing it somewhere in > BHYVE_STATE_DIR would be more clean. Sure. > However, I'm concerned about libvirt dealing with the grub-bhyve > specifics as it involves some assumptions about its behaviour ahd has > limitations, like the one you pointed with installing from CD. Sure. However, the user can always override the assumptions. And I think the CD case is actually quite easy to fix, if that's a blocking issue. > My idea was to add the following behaviour: > > * bootloader specified and bootloader_args specified -- use that as is > * bootloader not specified, bootloader_args specified -- call > bhyveload $bootloader_args $default_bhyveloader_args > * bootloader and bootloader_args not set -- use defaults (current > behaviour) > * bootloader specified, bootloader_args missing -- fail here Ok. I think the grub-bhyve stuff is just a special case of the 4th bullet here; but otherwise my patch matches up with this behavior. > Actually, I've implemented that already, but didn't send because it > needs some more testing. Ok. I am happy to guinea-pig bhyve improvements for libvirt, if you need it. > The reason of my concern about adding a special handling of grub-bhyve > case that, as I've mentioned, we have to make assumptions and there are > also caveats you mentioned. Probably it'd worth to wait for bhyve to > provide single-step VM boot, i.e. UEFI support, that should appear soon > anyway. Any idea how soon? Months? A year? 5 years? I'm not comfortable postponing improvements indefinitely for vaporware. In the wonderful bhyve-UEFI future, we can ignore/warn about . > There are some comments inline. Thanks! >> - /* Image path */ >> - virCommandAddArg(cmd, "-d"); >> - virCommandAddArg(cmd, virDomainDiskGetSource(disk)); >> + /* XXX cleanup this file. */ >> + fd = mkstemp(tmpmapfile); > > This yields an error in 'syntax-check'. Running 'make syntax-check' > allows to avoid some of the general code and formatting issues. I did run syntax-check, but did not see any error around there. syntax-check has lots of console output; does it log somewhere else too? Thanks, Conrad