Progress.
Untested! But looks promising.
Major changes:
- rootless
- using unix domain socket files
- Images must now be placed in folder
/home/user/.local/share/libvirt/imagesto avoid rootless usage. Whonix-External.xmlandWhonix-Internal.xmldeleted because no longer required.- New host dependency:
sudo apt install passt
Advantages:
- Rootless and therefore compatible with Kicksecure default installation (that comes with user-sysmaint-split).
- Should fix any VPN and corridor leak testing proxy issues since host should no longer be able to see guest TCP/UDP thanks to unix domain socket files. This is such as major advantage that this will override any disadvantages.
- dnsmasq-base probably no longer required?
- related: Whonix KVM dnsmasq - listen port on host operating system - attack surface reduction
- TODO: Please confirm or deny.
Disadvantages:
- Hardcoded paths:
- Path to
/home/useris literal and hardcoded. Users using a different Linux account name than “user” will need to adjust their XML file. As far as I know, libvirt does not support~, "$HOME` or similar.- TODO: Please post and upstream feature request.
- Path to unix doman socket files are stored in folder
/run/user/1000is similarly hardcoded./run/userdoes not refer to account “user”. That’s just a constant independent of Linux user account names. And1000is aid --user, which will be different on user systems unfortunately.- TODO: See if there is a better path for the unix domain socket files.
- Path to
- XML files using
<qemu:commandline>.- (Feature requests exist. Linked above.)
Branch:
GitHub - Kicksecure/libvirt-dist at rootless-kvm-session · GitHub
XML files in branch rootless-kvm-session:
libvirt-dist/usr/share/libvirt-dist/xml at rootless-kvm-session · Kicksecure/libvirt-dist · GitHub
Pull request:
port to rootless and unix domain sockets by adrelanos · Pull Request #119 · Kicksecure/libvirt-dist · GitHub
Diff (file changes):
port to rootless and unix domain sockets by adrelanos · Pull Request #119 · Kicksecure/libvirt-dist · GitHub
Observations:
- In Port to QEMU Session (unprivileged mode), @HulaHoop used
<interface type='vhostuser'>- Claude Code suggested
<interface type='user'>. - TODO: Please investigate and decide.
- Claude Code suggested
Notes:
- The source code changes have been assisted by Claude Code.
- This forum post has been fully hand-written by myself.
TODO: @HulaHoop:
- Please test, extend, fix, commit on top of my branch, edit wiki, etc.