From: Marcos Paulo de Souza Date: Tue, 10 Jul 2018 23:31:01 +0000 (-0300) Subject: hyperv_driver: Set remoteOnly member of virConnectDriver X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1c270a84e76702d5500acbfa2b0da8a875498f2b;p=libvirt.git hyperv_driver: Set remoteOnly member of virConnectDriver HyperV driver can't function without a server being informed, so this flag makes libvirt to check for a valid server before calling connectOpen. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Michal Privoznik --- diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 95496bdf73..a85943668c 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -128,13 +128,6 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); - /* Require server part */ - if (conn->uri->server == NULL) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("URI is missing the server part")); - return VIR_DRV_OPEN_ERROR; - } - /* Require auth */ if (auth == NULL || auth->cb == NULL) { virReportError(VIR_ERR_INVALID_ARG, "%s", @@ -1662,6 +1655,7 @@ hypervDebugHandler(const char *message, debug_level_e level, static virConnectDriver hypervConnectDriver = { + .remoteOnly = true, .uriSchemes = (const char *[]){ "hyperv", NULL }, .hypervisorDriver = &hypervHypervisorDriver, };