Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Oct 2014 19:07:44 -0700
From:      Craig Rodrigues <rodrigc@freebsd.org>
To:        Roman Bogorodskiy <novel@freebsd.org>
Cc:        "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   libvirt improvements for bhyve
Message-ID:  <CAG=rPVfsx_w60eFX1RnyJOoJMSQUfSv6E8k7dMV2k4weXGKvrg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVfsx_w60eFX1RnyJOoJMSQUfSv6E8k7dMV2k4weXGKvrg>