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

libvirt: support proper networking in user session #53204

Merged
merged 2 commits into from Jun 27, 2019

Conversation

peterhoeg
Copy link
Member

@peterhoeg peterhoeg commented Jan 2, 2019

Motivation for this change

With the help of qemu-bridge-helper it's possible for VMs run under qemu:///session to have proper network access and not resort to user mode networking.

In my case that means I can dump VirtualBox!

I am not sure if "QEMU_PR_HELPER=/run/current-system/sw/bin/qemu-pr-helper" is really the best way to pass in the path to the PR helper but since the qemu package to use is configurable, we need a global path. We are using QEMU_PR_HELPER=/run/libvirt/nix-helpers/qemu-pr-helper based on @volth's feedback.

Cc: @fpletz

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@peterhoeg peterhoeg force-pushed the m/libvirt branch 2 times, most recently from 5582c46 to 05df6a7 Compare January 7, 2019 05:02
@peterhoeg
Copy link
Member Author

Thanks @volth - how about this version?

@peterhoeg peterhoeg changed the title libvirt: support proper networking in user session [WIP] libvirt: support proper networking in user session Jan 8, 2019
@peterhoeg peterhoeg changed the title [WIP] libvirt: support proper networking in user session libvirt: support proper networking in user session Jan 18, 2019
@peterhoeg
Copy link
Member Author

Any reservations @infinisil ?

environment = {
# this file is expected in /etc/qemu and not sysconfdir (/var/lib)
etc."qemu/bridge.conf".text = (lib.concatStringsSep "\n" (map (e:
"allow ${e}") cfg.allowedBridges));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
  etc."qemu/bridge.conf".text = lib.concatMapStringsSep "\n" (e: "allow ${e}") cfg.allowedBridges;
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, fixed.

@peterhoeg
Copy link
Member Author

ah, it is already done in the code, I just answered to the obsolete description if the first post

Description updated. Any other concerns or are we good to go?

If you want the module fine-tuned, can we at least merge the change to derivation? I've been carrying this change on my side for a while and it causes a bunch of stuff to be rebuilt instead of just fetching from the cache.

@peterhoeg
Copy link
Member Author

As I haven't heard any strong reservations, I'm taking the liberty of merging this.

@peterhoeg peterhoeg merged commit 67cca52 into NixOS:master Jun 27, 2019
@peterhoeg peterhoeg deleted the m/libvirt branch June 27, 2019 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants