mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-29 20:11:16 +00:00
qemu-conf: add configurable slirp-helper location
A slirp helper is a process that provides user-mode networking through a unix domain socket. It is expected to follow the following specification: https://gitlab.freedesktop.org/slirp/libslirp-rs/blob/master/src/bin/README.rst Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5d732dbb35
commit
b0baafe92c
@ -105,6 +105,11 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [
|
|||||||
[/usr/bin:/usr/libexec])
|
[/usr/bin:/usr/libexec])
|
||||||
AC_DEFINE_UNQUOTED([QEMU_PR_HELPER], ["$QEMU_PR_HELPER"],
|
AC_DEFINE_UNQUOTED([QEMU_PR_HELPER], ["$QEMU_PR_HELPER"],
|
||||||
[QEMU PR helper])
|
[QEMU PR helper])
|
||||||
|
AC_PATH_PROG([QEMU_SLIRP_HELPER], [slirp-helper],
|
||||||
|
[/usr/bin/slirp-helper],
|
||||||
|
[/usr/bin:/usr/libexec])
|
||||||
|
AC_DEFINE_UNQUOTED([QEMU_SLIRP_HELPER], ["$QEMU_SLIRP_HELPER"],
|
||||||
|
[QEMU slirp helper])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([LIBVIRT_DRIVER_RESULT_QEMU], [
|
AC_DEFUN([LIBVIRT_DRIVER_RESULT_QEMU], [
|
||||||
|
@ -89,6 +89,7 @@ module Libvirtd_qemu =
|
|||||||
| bool_entry "clear_emulator_capabilities"
|
| bool_entry "clear_emulator_capabilities"
|
||||||
| str_entry "bridge_helper"
|
| str_entry "bridge_helper"
|
||||||
| str_entry "pr_helper"
|
| str_entry "pr_helper"
|
||||||
|
| str_entry "slirp_helper"
|
||||||
| bool_entry "set_process_name"
|
| bool_entry "set_process_name"
|
||||||
| int_entry "max_processes"
|
| int_entry "max_processes"
|
||||||
| int_entry "max_files"
|
| int_entry "max_files"
|
||||||
|
@ -833,6 +833,9 @@
|
|||||||
# used whenever <reservations/> are enabled for SCSI LUN devices.
|
# used whenever <reservations/> are enabled for SCSI LUN devices.
|
||||||
#pr_helper = "/usr/bin/qemu-pr-helper"
|
#pr_helper = "/usr/bin/qemu-pr-helper"
|
||||||
|
|
||||||
|
# Path to the SLIRP networking helper.
|
||||||
|
#slirp_helper = "/usr/bin/slirp-helper"
|
||||||
|
|
||||||
# User for the swtpm TPM Emulator
|
# User for the swtpm TPM Emulator
|
||||||
#
|
#
|
||||||
# Default is 'tss'; this is the same user that tcsd (TrouSerS) installs
|
# Default is 'tss'; this is the same user that tcsd (TrouSerS) installs
|
||||||
|
@ -282,7 +282,8 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_STRDUP(cfg->bridgeHelperName, QEMU_BRIDGE_HELPER) < 0 ||
|
if (VIR_STRDUP(cfg->bridgeHelperName, QEMU_BRIDGE_HELPER) < 0 ||
|
||||||
VIR_STRDUP(cfg->prHelperName, QEMU_PR_HELPER) < 0)
|
VIR_STRDUP(cfg->prHelperName, QEMU_PR_HELPER) < 0 ||
|
||||||
|
VIR_STRDUP(cfg->slirpHelperName, QEMU_SLIRP_HELPER) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
cfg->clearEmulatorCapabilities = true;
|
cfg->clearEmulatorCapabilities = true;
|
||||||
@ -373,6 +374,7 @@ static void virQEMUDriverConfigDispose(void *obj)
|
|||||||
VIR_FREE(cfg->hugetlbfs);
|
VIR_FREE(cfg->hugetlbfs);
|
||||||
VIR_FREE(cfg->bridgeHelperName);
|
VIR_FREE(cfg->bridgeHelperName);
|
||||||
VIR_FREE(cfg->prHelperName);
|
VIR_FREE(cfg->prHelperName);
|
||||||
|
VIR_FREE(cfg->slirpHelperName);
|
||||||
|
|
||||||
VIR_FREE(cfg->saveImageFormat);
|
VIR_FREE(cfg->saveImageFormat);
|
||||||
VIR_FREE(cfg->dumpImageFormat);
|
VIR_FREE(cfg->dumpImageFormat);
|
||||||
@ -669,6 +671,9 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfigPtr cfg,
|
|||||||
if (virConfGetValueString(conf, "pr_helper", &cfg->prHelperName) < 0)
|
if (virConfGetValueString(conf, "pr_helper", &cfg->prHelperName) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (virConfGetValueString(conf, "slirp_helper", &cfg->slirpHelperName) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (virConfGetValueBool(conf, "set_process_name", &cfg->setProcessName) < 0)
|
if (virConfGetValueBool(conf, "set_process_name", &cfg->setProcessName) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (virConfGetValueUInt(conf, "max_processes", &cfg->maxProcesses) < 0)
|
if (virConfGetValueUInt(conf, "max_processes", &cfg->maxProcesses) < 0)
|
||||||
|
@ -153,6 +153,7 @@ struct _virQEMUDriverConfig {
|
|||||||
|
|
||||||
char *bridgeHelperName;
|
char *bridgeHelperName;
|
||||||
char *prHelperName;
|
char *prHelperName;
|
||||||
|
char *slirpHelperName;
|
||||||
|
|
||||||
bool macFilter;
|
bool macFilter;
|
||||||
|
|
||||||
|
@ -104,6 +104,7 @@ module Test_libvirtd_qemu =
|
|||||||
}
|
}
|
||||||
{ "memory_backing_dir" = "/var/lib/libvirt/qemu/ram" }
|
{ "memory_backing_dir" = "/var/lib/libvirt/qemu/ram" }
|
||||||
{ "pr_helper" = "/usr/bin/qemu-pr-helper" }
|
{ "pr_helper" = "/usr/bin/qemu-pr-helper" }
|
||||||
|
{ "slirp_helper" = "/usr/bin/slirp-helper" }
|
||||||
{ "swtpm_user" = "tss" }
|
{ "swtpm_user" = "tss" }
|
||||||
{ "swtpm_group" = "tss" }
|
{ "swtpm_group" = "tss" }
|
||||||
{ "capability_filters"
|
{ "capability_filters"
|
||||||
|
Loading…
Reference in New Issue
Block a user