network_interface type=direct, ssh agent added to libvirt_uri #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello. I was trying to use this in my environment, but found a few things that weren't implemented yet that I needed for my use case.
I don't know Go, but based on your code and documentation, I got this working in my environment.
In ssh_dialer, I added code that pulls auth info from the ssh agent by default. The keyfile parameter code is adjusted so that it only runs if the user passes a value. This section could be better - not sure the default behavior of libvirt, but I am usually able to rely on ssh agent to pass the keys without specification.
Next was adding a network_interface type of direct. This is macvtap in virt-manager config. It requires the host's dev to connect to and the mode (bridge).
I think it would be good to add knownhosts from ssh agent, too.
It would be cool to add these changes, but it may need more work. Wanted to commit and post before I forget, might be a while before I can delve into this more.