Re: [PATCH] virt-host-validate: add bhyve support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Michal Privoznik wrote:

> On 02/25/2017 02:30 PM, Roman Bogorodskiy wrote:
> > Add bhyve support to virt-host-validate(1). It checks for the
> > essential kernel modules to be available so that user can actually
> > start VMs, have networking and console access.
> > 
> > It uses the kldnext(2)/kldstat(2) routines to retrieve modules list.
> > As bhyve is only available on FreeBSD and these routines were available
> > long before bhyve appeared, not adding any specific configure checks
> > for that.
> > ---
> >  po/POTFILES.in                   |  1 +
> >  tools/Makefile.am                |  1 +
> >  tools/virt-host-validate-bhyve.c | 78 ++++++++++++++++++++++++++++++++++++++++
> >  tools/virt-host-validate-bhyve.h | 27 ++++++++++++++
> >  tools/virt-host-validate.c       | 12 +++++++
> >  tools/virt-host-validate.pod     |  4 +--
> >  6 files changed, 121 insertions(+), 2 deletions(-)
> >  create mode 100644 tools/virt-host-validate-bhyve.c
> >  create mode 100644 tools/virt-host-validate-bhyve.h
> 
> This will need a condition. virt-host-validate-bhyve.c is not really able to compile on Linux. Other sources should be conditionally included too. Something among these lines:
> 
> diff --git i/tools/Makefile.am w/tools/Makefile.am
> index a8bd3d1c2..64d3af4f0 100644
> --- i/tools/Makefile.am
> +++ w/tools/Makefile.am
> @@ -139,11 +139,28 @@ libvirt_shell_la_SOURCES = vsh.c vsh.h
>  
>  virt_host_validate_SOURCES = \
>                 virt-host-validate.c \
> -               virt-host-validate-common.c virt-host-validate-common.h \
> -               virt-host-validate-qemu.c virt-host-validate-qemu.h \
> -               virt-host-validate-lxc.c virt-host-validate-lxc.h \
> -               virt-host-validate-bhyve.c virt-host-validate-bhyve.h \
> -               $(NULL)
> +               virt-host-validate-common.c virt-host-validate-common.h
> +
> +VIRT_HOST_VALIDATE_QEMU = virt-host-validate-qemu.c virt-host-validate-qemu.h
> +VIRT_HOST_VALIDATE_LXC = virt-host-validate-lxc.c virt-host-validate-lxc.h
> +VIRT_HOST_VALIDATE_BHYVE = virt-host-validate-bhyve.c virt-host-validate-bhyve.h
> +if WITH_QEMU
> +virt_host_validate_SOURCES += $(VIRT_HOST_VALIDATE_QEMU)
> +else ! WITH_QEMU
> +EXTRA_DIST += $(VIRT_HOST_VALIDATE_QEMU)
> +endif ! WITH_QEMU
> +
> +if WITH_LXC
> +virt_host_validate_SOURCES += $(VIRT_HOST_VALIDATE_LXC)
> +else ! WITH_LXC
> +EXTRA_DIST += $(VIRT_HOST_VALIDATE_LXC)
> +endif ! WITH_LXC
> +
> +if WITH_BHYVE
> +virt_host_validate_SOURCES += $(VIRT_HOST_VALIDATE_BHYVE)
> +else ! WITH_BHYVE
> +EXTRA_DIST += $(VIRT_HOST_VALIDATE_BHYVE)
> +endif ! WITH_BHYVE
>  
>  virt_host_validate_LDFLAGS = \
>                 $(AM_LDFLAGS) \
> 
> 
> ACK with this squashed in.
> 
> Michal

Thanks, pushed with this fix included. I had to wrap
the VIRT_HOST_VALIDATE_* lines though to make synax-check happy. Not
sure if it's needed to add $(NULL) in this case.

Roman Bogorodskiy

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux