-
Notifications
You must be signed in to change notification settings - Fork 133
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
Support for modular libvirt daemons #171
Comments
Are you able to connect to the modular sockets with the dialers package? Something like this: dialer := dialers.NewLocal(dialers.WithSocket("/var/run/libvirt/virtqemud"))
lv := libvirt.NewWithDialer(dialer)
err := lv.Connect()
defer lv.Disconnect() |
Sorry that I'm not familiar with Go. I modified the snippet above a little: package main
import (
"github.com/digitalocean/go-libvirt"
"github.com/digitalocean/go-libvirt/socket/dialers"
"github.com/sirupsen/logrus"
)
func main() {
dialer := dialers.NewLocal(dialers.WithSocket("/var/run/libvirt/virtqemud-sock"))
lv := libvirt.NewWithDialer(dialer)
if err := lv.Connect(); err != nil {
logrus.Fatal(err)
}
defer lv.Disconnect()
} Running it with |
What I want to ask here is to support dynamic socket. So instead of relying on 1 defined socket, we can detect which modular socket we need to connect to based on the API call. On a normal system, 1 modular daemon alone is kind of useless, but also people might not want to enable |
Ah, I see. That makes sense. I can't promise this will get done in the near future, but if someone else beats one of us and submits patches, I'm happy to review them. Thanks for filing this feature request 🙂 |
Currently the socket is defined as a variable here
go-libvirt/socket/dialers/local.go
Line 10 in 15feff0
so it only works with Monolithic daemon mode (libvirtd) and not the Modular daemons mode (virtqemud, virtstoraged,...).
Ref: https://libvirt.org/daemons.html
The text was updated successfully, but these errors were encountered: