-
Notifications
You must be signed in to change notification settings - Fork 355
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
Using xhyve, as a library, from Go. PCI devices do not show up. #61
Comments
@c4milo i looked before at tiborvass/xhyve-bindings and didn't hit that kind of trouble . (my isues were elsewhere - exit endpoints not go friendly - see tiborvass/xhyve-bindings#1). Will look at your code (presume it is https://github.com/hooklift/nnn) and report back :-) |
I have a simplified version in my local environment. I will push it up for you. |
@AntonioMeireles done. I wasn't aware of those bindings. I'm going to try them out. Thanks! |
@AntonioMeireles, tiborvass bindings worked for me just fine. I wonder if by making the static library as opposed to embedded the C files is screwing something up. |
humm... @c4milo probably. OTOH (and modulo bugs) your approach is way saner than tiborvass one. the main issue with the "atomic" way of tiborvass si that if an error happens in xhyve's side the exit/atexit there will be too strong for us and will stop anything working past it on our side (defers, go routines, whatever). you got around that issue by essentially doing all error handling in a granular way from our (golangs's) side, which at this stage imho is the right/sane thing to do. |
also ... @c4milo if using an hardlinked xhyve isn't a req for you take a look at https://github.com/AntonioMeireles/coreos-xhyve (work in progress). lots of handy primitives there that may be handy for your use case... |
@AntonioMeireles xhyve has exit calls everywhere, my approach has the same problem. I need to figure out a way of breaking the
Unfortunately it is a requirement :/ |
@AntonioMeireles I ended up doing something similar to tiborvass, emulated PCI devices show up correctly and in addition I'm also cleaning Go allocations and having Go calling os.Exit instead of xhyve. https://github.com/hooklift/xhyve |
I've been using xhyve as a library from Go. I was able to statically compile my Go program against xhyve using CGO. But, whenever I boot a VM, for some reason none of the PCI devices are being recognized by the kernel. Any idea of why this would happen?
The text was updated successfully, but these errors were encountered: