From owner-freebsd-virtualization@FreeBSD.ORG Sun Sep 21 16:26:40 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9083E633 for ; Sun, 21 Sep 2014 16:26:40 +0000 (UTC) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) (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 15C1EBFC for ; Sun, 21 Sep 2014 16:26:39 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id gi9so5486479lab.10 for ; Sun, 21 Sep 2014 09:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=zshpjBa9mIFN57Ggxa0gw5QfOu9LIeE00GBnfd9nJpI=; b=tC/y4Uy2H1CKht1xW4eYP8aiw9pWwvtGo3IQ40pRh5bNprQ5wbdh+IwDTm2+Nseh4V AQX62ZSt3xyHEjiDX/1xgCvrYSWOgy4I4eIxHKMSE/fcrs5tH9QRHEVr2cwZtJjuf3t8 SKfXEQpAs/ul38mEdGLWtUx4YbR3TzjQMdE6w10OqI4wrqYrBIRuU5917k1JODSWySwO Sn7DVDq408l/JAo9xQH9Bn45r4D/MCjqwMwLFhPhLlVOTSh67RQWpBDfGlTWEMd5brtB R4UQ+UhtwJ7UDv07LPq+g0cagQFPFxz8f6j0IzEBxW5xsPK7iPJlRREcA3b6yxbBHpBP gGZg== X-Received: by 10.112.163.170 with SMTP id yj10mr18257853lbb.88.1411316797892; Sun, 21 Sep 2014 09:26:37 -0700 (PDT) Received: from kloomba ([95.104.130.33]) by mx.google.com with ESMTPSA id nb7sm2823221lbb.43.2014.09.21.09.26.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Sep 2014 09:26:37 -0700 (PDT) Sender: Roman Bogorodskiy Date: Sun, 21 Sep 2014 20:24:17 +0400 From: Roman Bogorodskiy To: Assaf Gordon Subject: Re: FreeBSD with qemu/kvm "-kernel" option Message-ID: <20140921162415.GA47464@kloomba> References: <541CC2CA.2050009@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: <541CC2CA.2050009@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: 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: Sun, 21 Sep 2014 16:26:40 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Assaf Gordon wrote: > Hello, >=20 > I have FreeBSD 8.4, 9.3 and 10 guests VM running under KVM (on amd64 host= ). > They work great with virtio disk and network. >=20 > Now I'm trying to take it to the next level: > Instead of using the bootloader inside the VM, I want to specify the kern= el directly using qemu's "-kernel" option. >=20 > Generally, the usage is supposed to be this: > kvm -drive file=3Dfreebsd.qcow2,media=3Ddisk,if=3Dvirtio,index=3D0 \ > -kernel ./kernel >=20 > Where "./kernel is the FreeBSD kernel ELF file (stored as a file on the h= ost machine). > Using the generic "/boot/kernel/kernel" kernel does not work (VM doesn't = boot at all). >=20 > I assume that more options are needed (e.g. "-initrd" and "-append"), and= perhaps also a kernel with different options. >=20 > Does anyone have an idea of how to achieve this ? > Is rebuilding a kernel image from source with special options needed ? I guess, qemu's -kernel requires kernel to be multiboot compatible and FreeBSD kernel is not. Roman Bogorodskiy --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJUHvuvAAoJEMltX/4IwiJqZHEH/0pZqMMNoPcO25QB6psPXh+U w2Erkk0XTk4OQ+9nGe2LU70p3y2xpA31bxZ3zmA/dr1xxVpZGxJxgjdtt2Bbkih8 GhdPfMGIHHzEAOkTQayWRdPqMIqMiZ3M4yhhIh7QwnPHTzGAbdTHTcd9ee7b4IcO 2zTy3/ArJhG0SJQj+IKBgQ0ENeBVDnpWPRUESqLasPswY4h0bZxfnHjoZvb8paw3 02a/hIbpDFUKI2rS+SDfp5paLHWv5qwsNXN7iREjDq65lR8Oarc9U9SgbNSbMkSy ++VxN9oxkq1AwIUfTG+ZixVr+DG6p1yvzvzb82b+o7TN+vTYw2bPT5kA85Mcn9k= =a9b1 -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb--