If the configuration of the instance has been modified, for example added disk or network
device, then hypervisor
sends event with prlIssuerType = PIE_DISPATCHER and EventType =
PET_DSP_EVT_VM_CONFIG_CHANGED
We should handle this event in prlsdkHandleVmEvent function to update instance's XML
config.
prlsdkHandleVmEvent is a common handler and it recieves many events.
We don't need to handle all of them. Remove error message in case of unhandled
events.
---
src/vz/vz_sdk.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 98f7a57..d4d48e8 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -1736,8 +1736,7 @@ prlsdkHandleVmEvent(vzConnPtr privconn, PRL_HANDLE prlEvent)
prlEvent = PRL_INVALID_HANDLE;
break;
default:
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Can't handle event of type %d"), prlEventType);
+ VIR_DEBUG("Skipping event type %d", prlEventType);
}
cleanup:
@@ -1768,6 +1767,7 @@ prlsdkEventsHandler(PRL_HANDLE prlEvent, PRL_VOID_PTR opaque)
switch (prlIssuerType) {
case PIE_VIRTUAL_MACHINE:
+ case PIE_DISPATCHER:
prlsdkHandleVmEvent(privconn, prlEvent);
// above function takes own of event
prlEvent = PRL_INVALID_HANDLE;
--
1.7.1