From owner-freebsd-virtualization@FreeBSD.ORG Wed Oct 8 02:07:47 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FCA2D65; Wed, 8 Oct 2014 02:07:47 +0000 (UTC) Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) (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 752BB1AA; Wed, 8 Oct 2014 02:07:46 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id mk6so7574282lab.15 for ; Tue, 07 Oct 2014 19:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:cc:content-type; bh=Lko5rSmSYDez2RMGr7sNSWRyhbV6ddsS+EgzI9vmJiQ=; b=N2VDQznvFnT6tKJPKnVTe7U10wsb4ddqhUYAZGlf8woUfyYeJjTSjpwB93t/IpSrxI j1DfMm1YtkomerU1lMH7QaGRAQE/9qHu5YB6hdXUaWZar0yYtPoVncLq9lYcAAMbSSTW M+5gTYl6nGvgTXPcolyoGa2YUi758o46Mm9BLpnBICIjGdG+4qasgHOhyYwrdG9qV8Gg vwwqXKKjnFXyywfTS7Rp2ZNsq6/biUzM36VidvUOYBDWD7noIJlSgLmxJnLsOHOPiyu4 ATrruT+wM2yv9ANyVncLb9jNa5bZCBpfLCxv9ov7XCOCIc/evU/SkB9Qt1BpKVUIZfVK uxzA== MIME-Version: 1.0 X-Received: by 10.112.54.130 with SMTP id j2mr7444142lbp.41.1412734064395; Tue, 07 Oct 2014 19:07:44 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.131.66 with HTTP; Tue, 7 Oct 2014 19:07:44 -0700 (PDT) Date: Tue, 7 Oct 2014 19:07:44 -0700 X-Google-Sender-Auth: yftMPJfJBvlUgm1XeSuxBz0ROSc Message-ID: Subject: libvirt improvements for bhyve From: Craig Rodrigues To: Roman Bogorodskiy Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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: Wed, 08 Oct 2014 02:07:47 -0000 Roman, I am using bhyve a lot these days, but I find that I need to write scripts on top of bhyveload / bhyve in order to work with VM's. I would rather use libvirt, because there are many 3rd party programs to work with VM's that are written for libvirt (especially for KVM). How hard would it be to implement the following: (1) The last time I tried libvirt 1.2.7, it did not seem to properly keep track if a VM was powered on or shutdown. If I started a VM with libvirt, then did "shutdown -r now", I couldn't seem to restart the VM, unless I destroyed the VM in libvirt, and restarted. This is very inconvenient. If you see the latest version of vmrun.sh ( https://svnweb.freebsd.org/base/head/share/examples/bhyve/vmrun.sh?view=markup ) you will see that I added some comments to tell when the VM has been reset, powered off, etc. by looking at the exit status of bhyve. Can we add this logic to libvirt, so that it can properly tell if a VM is up or not? (2) "bhyveload -e" allows specifying environment variables to loader. Can we have a way to specify loader environment variables, in the libvirt XML config? (3) "grub-bhyve" is needed to boot VM's for Linux. Can we specify an option to choose between "bhyveload" and "grub-bhyve"? (4) bhyve has many options for specifying which PCI slots to use, and also PCI passthru ( https://wiki.freebsd.org/bhyve/pci_passthru ) Can this be specified in libvirt? For me, without (1), libvirt is mostly unusable for bhyve. (2) - (4) would be nice to have. However, if we could fix libvirt with these things, then a lot of things I do now in scripts, I could do in libvirt. I would much rather use libvirt, because then I could take advantage of a lot of libvirt software targeted towards KVM. Thanks. -- Craig