diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index 0bdfc5a8bec6175a70bf7a5429a59bcf418fc71e..25fbdc7e4434c1a218d6edaec3c8763113cd92a7 100644 --- a/src/esx/esx_vi.c +++ b/src/esx/esx_vi.c @@ -3014,8 +3014,11 @@ esxVI_LookupVirtualMachineByName(esxVI_Context *ctx, const char *name, break; } - if (!(*virtualMachine) && occurrence != esxVI_Occurrence_OptionalItem) + if (!(*virtualMachine) && occurrence != esxVI_Occurrence_OptionalItem) { + virReportError(VIR_ERR_NO_DOMAIN, + _("Could not find domain with name '%s'"), name); goto cleanup; + } result = 0;