|
Is it possible to use this with libkrun? There are references to krunkit in the README but I'm using the C API directly. Trying to find out if I can switch from gvproxy in order to assign a distinct IP to every VM and have it directly reachable from the host without port forwarding of guest services. |
Replies: 3 comments 5 replies
|
krunkit is just a wrapper over libkrun so you can use vmnet-helper with libkrun - your process need to do this same libkrun calls as krunkit. Check how krunkit creates the virtio-net interface. With krunkit we have: With libkrun we will have: So your program should:
Or as alternative, use file descriptor 4 in your program usn libkrun, and run your program with vmnet-client: The nice thing about vmnet-client is that it is a supervisor string both programs for you, waiting until they terminate, terminating both of them if one fails, and termating both of them when you terminate it. |
|
Feel free to add an issue for adding example libkrun integration. |
|
@nohajc do you want to contribute a libkrun integration example? It can be a minimal C or Rust program that shows the networking details. |
Works as expected. I was able to connect to my host network and the internet from a libkrun VM.