Salt can't find qvm modules

I’m new to saltstack so this might be an obvious error but,

I have the following file

# /srv/user_salt/templates/base_template.sls
  - name: fedora-39-minimal


And when I run highstate (qubesctl state.highstate saltenv=user) it fails saying that qvm.template_installed is not available.

I’ve tried a few things and noticed that:

  • It starts most outputs with
[CRITICAL] Specified ext_pillar interface qvm_prefs is unavailable
  • qubesctl sys.list_functions | grep qvm shows nothing besides the [CRITICAL] thing above

Any clues on how to fix this?

An almost identical question came up a week ago.
I said there:
“These problems arise because most users dont understand that this is
set-up as a different environment in salt terms.
That is why many of the states and pillars are not available out of the
box in that environment.”

"What most people seem to want is just a directory where they
can put their own states which will be part of the base environment. The
salt way to do this is to add an entry under the base environment in
/etc/salt/minion.d/f_defaults.conf "

It’s easier for a beginner to put their states under /srv/salt -
perhaps in a directory /srv/salt/user

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

Is there a reason why an user env is used then?
I read somewhere that it was because if I put it in the /srv/salt/user it could be deleted by an update. And since there was a SLS file that generated the /srv/user_* directories I though it was the intended way.
If it is the correct way though, what is the way to allow those state and pillars to work? or where can I find documentation to figure it out myself?

I also recently realized I was using R4.1 when R4.2 is the latest and so I tried to update but the same [CRITICAL] error message appeared so I might have a broken install.

I’ll do a clean updated install of R4.2 and if the errors persist I’ll ask for help here again.