Skip to content

How to listen for all domain events from hypervisor #94

@veber-alex

Description

@veber-alex

Hi,
I am trying to write an app that will notify when a new VM is added to a HV.
How can I listen to all events from the hypervisor?
I know the Domain object has RegisterEventAsync but I don't want to register events from a specific domain.

This is what I am trying to do:

libvirt = require("libvirt")

libvirt.startEventLoop()

async function foo () {
  hv = new libvirt.Hypervisor("qemu:///system")
  await hv.connectAsync()
  hv.registerDomainEvent(...)
}

foo()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions