Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabianfreyer/d54d36ce53004af3d7da4c5ecf973421 to your computer and use it in GitHub Desktop.
Save fabianfreyer/d54d36ce53004af3d7da4c5ecf973421 to your computer and use it in GitHub Desktop.
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index ae37a2d..8b1480d 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -1581,6 +1581,20 @@ bhyveConnectGetDomainCapabilities(virConnectPtr conn,
goto cleanup;
}
+ if (!ARCH_IS_X86(arch)) {
+ virReportError(VIR_ERR_UNSUPPORTED,
+ _("unsupported architecture: %s"),
+ virArchToString(arch));
+ goto cleanup;
+ }
+
+ if (emulatorbin && STRNEQ(emulatorbin, "/usr/sbin/bhyve")) {
+ virReportError(VIR_ERR_INVALID_ARG,
+ _("unknown emulator binary: %s"),
+ emulatorbin);
+ goto cleanup;
+ }
+
if (emulatorbin == NULL)
emulatorbin = "/usr/sbin/bhyve";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment