On Mon, Jul 22, 2019 at 07:38:27PM -0500, Andrew David Wong wrote:
>
> Sorry, I'm not following your example. What does it mean to "do the
> equivalent of qvm-create and qvm-prefs"? I had no idea you could create
> the effects of those commands without those commands. This sounds like a
> rather arcane area of Qubes wizardry into which I have not ventured.
>
Actually you probably have ventured, but not realised it.
When you run the installer and configure the system, the various qubes
are created with salt.
The state files are in /srv/formulas/base/virtual-machines-formula/qvm
and you can inspect them there.
These files use templating.
For example the sys-net.sls file uses:
name: sys-net
present:
- label: red
prefs:
- netvm: ''
- virt_mode: hvm
etc etc
You could get the same effect by calling the qvm functions directly:
-----------------------
sys-net:
qvm.present:
-name: sys-net
-template: debian-10
-label: red
sys-net-prefs:
qvm.prefs:
-netvm: ''
-virt_mode: hvm
-----------------------
If you look at the example I linked to you can see a breakdown of how to
create a Qubes builder qube.
The steps are: clone template and create qube, install necessary software in
template,configure qube. I've left that as simple as I can.
By keeping these formulae, you can (re)create any aspects of your Qubes
system in a few commands.
Of course, you can do this using batch files calling qvm-create,
qvm-prefs, qvm-copy-to-vm, and assorted calls to qvm-run. imo the salt
formulae are clearer and easier to maintain.
Also salt handles very well cases where (e.g) package names differ
between distributions, or you want the configuration to change between
debian-9 and debian-10, or between individual qubes,
I'm happy to post simple examples if anyone wants to give a specification.
unman
--
You received this message because you are subscribed to the Google Groups
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/qubes-users/20190724142208.wa3gonlngf55bymx%40thirdeyesecurity.org.