From owner-freebsd-virtualization@FreeBSD.ORG Fri Sep 19 23:56:58 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73F8DA for ; Fri, 19 Sep 2014 23:56:58 +0000 (UTC) Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com [IPv6:2607:f8b0:400d:c04::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 3436CCB0 for ; Fri, 19 Sep 2014 23:56:58 +0000 (UTC) Received: by mail-qg0-f46.google.com with SMTP id q108so658666qgd.5 for ; Fri, 19 Sep 2014 16:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=uLI7fD1E9ky/AVvCDyUVpFD2sibPiIJRpGIBWArXvcI=; b=EoGdWTtPdTzFQL2kTJ3EH3g8RwAMWlo4hDTm+wQh4V0nVSQ13h1rF7EXFVLQQDyIte AywWTTA68ujwq0EBj6SaSUN4gG8L0q8PZjhoyEJ12iJ+UwZ9qmKhEm9yGlGg9QPqmyxh l2/maZzb+X0vpiYrpNYwSTRG6ellLRlGPoGPl1IwWKovHsSVO/0ZGS14V7xboxn+146P HkrTDJVQIFwS6/LN778K5dINbmYKo+foi4LABoJK0F8NXlfRXGt/w+Rts2C1QoW4EPfp pGl12vnPquML81BIER4cH7HpHpnhzofgkNxdlMIShBU1Nhnj9fMMG7CPIr0qzLOI2LBG uZTw== X-Received: by 10.229.121.7 with SMTP id f7mr13369946qcr.28.1411171017343; Fri, 19 Sep 2014 16:56:57 -0700 (PDT) Received: from disco.wi.mit.edu ([18.4.1.144]) by mx.google.com with ESMTPSA id l10sm2557685qac.43.2014.09.19.16.56.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Sep 2014 16:56:56 -0700 (PDT) Message-ID: <541CC2CA.2050009@gmail.com> Date: Fri, 19 Sep 2014 19:56:58 -0400 From: Assaf Gordon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: FreeBSD with qemu/kvm "-kernel" option Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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, 19 Sep 2014 23:56:58 -0000 Hello, 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. Now I'm trying to take it to the next level: Instead of using the bootloader inside the VM, I want to specify the kernel directly using qemu's "-kernel" option. Generally, the usage is supposed to be this: kvm -drive file=freebsd.qcow2,media=disk,if=virtio,index=0 \ -kernel ./kernel Where "./kernel is the FreeBSD kernel ELF file (stored as a file on the host machine). Using the generic "/boot/kernel/kernel" kernel does not work (VM doesn't boot at all). I assume that more options are needed (e.g. "-initrd" and "-append"), and perhaps also a kernel with different options. Does anyone have an idea of how to achieve this ? Is rebuilding a kernel image from source with special options needed ? Any help will be appreciated, Thanks, - Assaf