From owner-freebsd-virtualization@FreeBSD.ORG Thu Oct 23 23:29:06 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 A87B5BAB
for ; Thu, 23 Oct 2014 23:29:06 +0000 (UTC)
Received: from mail-yh0-x234.google.com (mail-yh0-x234.google.com
[IPv6:2607:f8b0:4002:c01::234])
(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 695A5168
for ; Thu, 23 Oct 2014 23:29:06 +0000 (UTC)
Received: by mail-yh0-f52.google.com with SMTP id f10so1170887yha.25
for ; Thu, 23 Oct 2014 16:29:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=from:to:cc:subject:date:message-id:in-reply-to:references;
bh=deuPPt1kETFU8MvhKHfVO2JXCggAV1n1iIbSwK7gxQg=;
b=aq+nzqHxPuFxsUrs/kPQMVjApS6VUlIauKcwRRbnSw2X62L1I4/QRJk5oG2RY0z1Ry
fvmJ0xrM+OUt2iIs5DwIXtVKirkZBRz8gjbDKRCYAhy1y9qwik0KSmzuQVZvJWiBgQkv
liiFdHw7dNXCa1W8kMJhXKLeeMrr2CXetBxE//+TNo0p15h4VqsdlrZZhFuGXaNkcuKf
CXGZAFxXzh8M5omJBcG3flG1Jd9bF2rS+hiolTKdZlOymXa5YcX+fn0/YAUSrto/UgCE
hFykZMlHL7z8xO7yQqdQ2lWqnkaXzRQd713ViN3vxSob4zyjetcT9oVgAdyRBDnmnHTe
suxQ==
X-Received: by 10.170.121.140 with SMTP id n134mr660455ykb.89.1414106945643;
Thu, 23 Oct 2014 16:29:05 -0700 (PDT)
Received: from m.west.isilon.com (c-98-209-117-232.hsd1.mi.comcast.net.
[98.209.117.232])
by mx.google.com with ESMTPSA id xb4sm79861igc.11.2014.10.23.16.29.04
for
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Thu, 23 Oct 2014 16:29:05 -0700 (PDT)
From: Conrad Meyer
To: libvir-list@redhat.com
Subject: [PATCHv2 1/2] bhyve: Support /domain/bootloader configuration for
non-FreeBSD guests.
Date: Thu, 23 Oct 2014 19:28:42 -0400
Message-Id: <1414106923-32313-2-git-send-email-cse.cem@gmail.com>
X-Mailer: git-send-email 1.9.3
In-Reply-To: <1414106923-32313-1-git-send-email-cse.cem@gmail.com>
References: <1414106923-32313-1-git-send-email-cse.cem@gmail.com>
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: Thu, 23 Oct 2014 23:29:06 -0000
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 | 28 ++++++++++--
docs/formatdomain.html.in | 4 +-
po/libvirt.pot | 4 ++
src/bhyve/bhyve_command.c | 107 +++++++++++++++++++++++++++++++++++++++++-----
4 files changed, 128 insertions(+), 15 deletions(-)
diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in
index 39afdf5..6e85800 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,8 +49,8 @@ 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>
@@ -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.
+