Qubes AppArmor Test - Using the Scientific Method:
TemplateVMs
1) Start with whonix TemplateVMs clones (whonw-ws-clone-1; whonix-gw-clone-1) with default kernelopts settings
2) Check current kernel parameters
dom0:
qvm-prefs -l whonix-gw-clone-1 kernelopts
qvm-prefs -l whonix-ws-clone-1 kernelopts
Output:
nopat
AppVMs
3) Create AppVMs based on default TemplateVMs above
Note: Since this will be the default situation for most users who install Whonix via the Qubes installer i.e. AppVMs with default settings.
That is, now having:
- sys-whonix-clone-1
- anon-whonix-clone-1
4) Start AppVMs above and check AppArmor is not active:
As expected:
sudo aa-status --enabled ; echo $?
Shows:
3
That is, not ‘0’ (as when AppArmor is active).
TemplateVMs again
5) Change kernelopts settings in the TemplateVMs to enable AppArmor
dom0:
qvm-prefs -s whonix-gw-clone-1 kernelopts “nopat apparmor=1 security=apparmor”
qvm-prefs -s whonix-ws-clone-1 kernelopts “nopat apparmor=1 security=apparmor”
6) List the kernel parameters again to check AppArmor is now active for TemplateVMs
dom0:
qvm-prefs -l whonix-gw-clone-1 kernelopts
qvm-prefs -l whonix-ws-clone-1 kernelopts
Output (as expected):
nopat appamor=1 security=apparmor
7) CRITICAL POINT - What do the pre-existing AppVMs say regarding AppArmor status now!?
sudo aa-status --enabled ; echo $?
Output:
0
Conclusions
- Pre-existing AppVMs inherit kernelopts changes from their parent TemplateVM -> only kernelopts changes in the TemplateVMs are needed
- AppVMs do NOT need to be recreated to inherit the AppArmor framework i.e. all references to ‘create new AppVMs’ blah blah can be removed (which I’ve done)
- It doesn’t matter how users came to have their existing Whonix set-up in Qubes (Qubes installer or otherwise), since this wiki entry will give them what they want if they follow the steps
- torjunkie is an idiot and will go insane if I have to edit this Template again
- Sometimes it is better to test something quickly and easily, rather than rely on forums, where things get lost in translation
I’ve fixed this entry and am moving on…
Other
1) Just let me know that the suggested Tox changes (further above) are okay and I’ll insert it, since my entry is wrong currently (no “su”; wrong order in installation steps)
2) I’ll test the Whonix wiki bot over the weekend for you to see it’s all working
Cheers