Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to listen for all domain events from hypervisor #94

Open
veber-alex opened this issue Jun 26, 2018 · 0 comments
Open

How to listen for all domain events from hypervisor #94

veber-alex opened this issue Jun 26, 2018 · 0 comments

Comments

@veber-alex
Copy link

veber-alex commented Jun 26, 2018

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant