[libvirt] [PATCH v3 31/48] bhyve: introduce virtbhyved daemon

Daniel P. Berrangé berrange at redhat.com
Mon Jul 29 17:11:13 UTC 2019


The virtbhyved daemon will be responsible for providing the bhyve API
driver functionality. The bhyve driver is still loaded by the main
libvirtd daemon at this stage, so virtbhyved must not be running at
the same time.

Reviewed-by: Andrea Bolognani <abologna at redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 .gitignore                |  4 ++++
 src/bhyve/Makefile.inc.am | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/.gitignore b/.gitignore
index a23828cce6..4e46adaa55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -118,6 +118,9 @@
 /src/admin/admin_client.h
 /src/admin/admin_protocol.[ch]
 /src/admin/admin_server_dispatch_stubs.h
+/src/bhyve/test_virtbhyved.aug
+/src/bhyve/virtbhyved.aug
+/src/bhyve/virtbhyved.conf
 /src/esx/*.generated.*
 /src/hyperv/*.generated.*
 /src/interface/test_virtinterfaced.aug
@@ -199,6 +202,7 @@
 /src/vbox/virtvboxd.aug
 /src/vbox/virtvboxd.conf
 /src/virt-aa-helper
+/src/virtbhyved
 /src/virtinterfaced
 /src/virtxend
 /src/virtlockd
diff --git a/src/bhyve/Makefile.inc.am b/src/bhyve/Makefile.inc.am
index 8b662e9775..210f04f240 100644
--- a/src/bhyve/Makefile.inc.am
+++ b/src/bhyve/Makefile.inc.am
@@ -47,6 +47,44 @@ libvirt_driver_bhyve_impl_la_CFLAGS = \
 libvirt_driver_bhyve_impl_la_LDFLAGS = $(AM_LDFLAGS)
 libvirt_driver_bhyve_impl_la_SOURCES = $(BHYVE_DRIVER_SOURCES)
 
+sbin_PROGRAMS += virtbhyved
+
+nodist_conf_DATA += bhyve/virtbhyved.conf
+augeas_DATA += bhyve/virtbhyved.aug
+augeastest_DATA += bhyve/test_virtbhyved.aug
+CLEANFILES += bhyve/virtbhyved.aug
+
+virtbhyved_SOURCES = $(REMOTE_DAEMON_SOURCES)
+virtbhyved_CFLAGS = \
+       $(REMOTE_DAEMON_CFLAGS) \
+       -DDAEMON_NAME="\"virtbhyved\"" \
+       -DMODULE_NAME="\"bhyve\"" \
+       $(NULL)
+virtbhyved_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS)
+virtbhyved_LDADD = $(REMOTE_DAEMON_LD_ADD)
+
+bhyve/virtbhyved.conf: remote/libvirtd.conf.in
+	$(AM_V_GEN)sed \
+		-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
+		-e 's/[@]DAEMON_NAME[@]/virtbhyved/' \
+		< $^ > $@
+
+bhyve/virtbhyved.aug: remote/libvirtd.aug.in
+	$(AM_V_GEN)$(SED) \
+		-e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
+		-e 's/[@]DAEMON_NAME[@]/virtbhyved/' \
+		-e 's/[@]DAEMON_NAME_UC[@]/Virtbhyved/' \
+		$< > $@
+
+bhyve/test_virtbhyved.aug: remote/test_libvirtd.aug.in \
+		bhyve/virtbhyved.conf $(AUG_GENTEST)
+	$(AM_V_GEN)$(AUG_GENTEST) bhyve/virtbhyved.conf \
+		$(srcdir)/remote/test_libvirtd.aug.in | \
+		$(SED) -e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \
+		-e 's/[@]DAEMON_NAME[@]/virtbhyved/' \
+		-e 's/[@]DAEMON_NAME_UC[@]/Virtbhyved/' \
+		> $@ || rm -f $@
+
 conf_DATA += bhyve/bhyve.conf
 augeas_DATA += bhyve/libvirtd_bhyve.aug
 augeastest_DATA += bhyve/test_libvirtd_bhyve.aug
-- 
2.21.0




More information about the libvir-list mailing list