From owner-freebsd-virtualization@FreeBSD.ORG Wed Oct 29 00:19:37 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 A85E1BD2
for ; Wed, 29 Oct 2014 00:19:37 +0000 (UTC)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mx1.redhat.com",
Issuer "DigiCert SHA2 Extended Validation Server CA" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 80B42D98
for ; Wed, 29 Oct 2014 00:19:37 +0000 (UTC)
Received: from int-mx13.intmail.prod.int.phx2.redhat.com
(int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9T0JVaa015661
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Tue, 28 Oct 2014 20:19:31 -0400
Received: from [10.14.16.179] (dhcp-16-179.sjc.redhat.com [10.14.16.179])
by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
s9T0JUQw007067; Tue, 28 Oct 2014 20:19:30 -0400
Message-ID: <54503292.9040907@redhat.com>
Date: Wed, 29 Oct 2014 01:19:30 +0100
From: Michal Privoznik
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: Conrad Meyer , libvir-list@redhat.com
Subject: Re: [libvirt] [PATCH 1/2] bhyve: Support /domain/bootloader
configuration for non-FreeBSD guests.
References: <1414094284-29055-1-git-send-email-cse.cem@gmail.com>
<1414094284-29055-2-git-send-email-cse.cem@gmail.com>
In-Reply-To: <1414094284-29055-2-git-send-email-cse.cem@gmail.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
Cc: Conrad Meyer , 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: Wed, 29 Oct 2014 00:19:37 -0000
On 23.10.2014 21:58, Conrad Meyer wrote:
> Also, flip Bhyve /domain/os/type support from HVM to Xen. Bhyve only
> supports paravirtualized guests, and 'xen' is closest to that. We still
> default to bhyveloader(1) if no explicit bootloader configuration is
> supplied in the domain.
>
> If the /domain/bootloader looks like grub-bhyve and the user doesn't
> supply /domain/bootloader_args, we make an intelligent guess and try
> chainloading the first partition on the disk.
>
> Caveats:
> - We can't install from CD without explicit bootloader_args.
> - We leave a device.map file lying around in /tmp. I don't see a good
> way not to do so without reworking the API somewhat.
>
> Sponsored by: EMC / Isilon storage division
>
> Signed-off-by: Conrad Meyer
> ---
> docs/drvbhyve.html.in | 30 +++++-
> docs/formatdomain.html.in | 4 +-
> po/libvirt.pot | 4 +
> src/bhyve/bhyve_capabilities.c | 2 +-
> src/bhyve/bhyve_command.c | 107 +++++++++++++++++++--
> tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.xml | 2 +-
> tests/bhyvexml2argvdata/bhyvexml2argv-base.xml | 2 +-
> tests/bhyvexml2argvdata/bhyvexml2argv-console.xml | 2 +-
> .../bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.xml | 2 +-
> .../bhyvexml2argv-disk-virtio.xml | 2 +-
> tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.xml | 2 +-
> tests/bhyvexml2argvdata/bhyvexml2argv-metadata.xml | 2 +-
> tests/bhyvexml2argvdata/bhyvexml2argv-serial.xml | 2 +-
> .../bhyvexml2xmlout-metadata.xml | 2 +-
> 14 files changed, 139 insertions(+), 26 deletions(-)
>
> diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in
> index 39afdf5..c6c79d7 100644
> --- a/docs/drvbhyve.html.in
> +++ b/docs/drvbhyve.html.in
> @@ -37,8 +37,7 @@ bhyve+ssh://root@example.com/system (remote access, SSH tunnelled)
> Example config
>
> The bhyve driver in libvirt is in its early stage and under active development. So it supports
> -only limited number of features bhyve provides. All the supported features could be found
> -in this sample domain XML.
> +only limited number of features bhyve provides.
>
>
>
> @@ -50,13 +49,13 @@ up to 31 PCI devices.
>
>
> <domain type='bhyve'>
> - <name>bhyve</name>
> - <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
> + <name>bhyve</name>
> + <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
> <memory>219136</memory>
> <currentMemory>219136</currentMemory>
> <vcpu>1</vcpu>
> <os>
> - <type>hvm</type>
> + <type>xen</type>
> </os>
> <features>
> <apic/>
> @@ -157,5 +156,26 @@ An example of domain XML device entry for that will look like:
> Please refer to the Storage documentation for more details on storage
> management.
>
> +
> +
> +It's possible to boot non-FreeBSD guests by specifying an explicit
> +bootloader, e.g. grub-bhyve(1)
. Arguments to the bootloader may be
> +specified as well. If no arguments are given and bootloader is
> +grub-bhyve
, libvirt will try and boot from the first partition of
> +the disk image.
> +
> +
> + ...
> + <bootloader>/usr/local/sbin/grub-bhyve</bootloader>
> + <bootloader_args>...</bootloader_args>
> + ...
> +
> +
> +(Of course, to install from a CD a user will have to supply explicit
> +arguments to grub-bhyve
.)
> +
> +Caveat: bootloader_args
does not support any quoting.
> +Filenames, etc, must not have spaces or they will be tokenized incorrectly.
> +
>