Qvm.run in sls file throwing error

Hi,

I have a debian-12-custom.top file with the following content:

base:
  dom0:
    - debian-12-tmpl

  debian-12-tmpl:
    - debian-12-install

Inside the debian-12-install.sls file I have the following:

qvm-run-job:
  qvm.run:
    - cmd: w
    - user: user

However, when I run qubesctl high.state, I get the following:
id: qvm-run-job
function: qvm.run
name: debian-12-tmpl
result: false
comment: state “qvm.run” was not found in SLS ‘debian-12-install’
reason: ‘qvm.run’ is not available

I am looking at other examples (notes/salt/5 at master · unman/notes · GitHub), but I can’t figure out what I am doing wrong. Maybe qvm.run can’t be used in such manner?

Regards

Isn’t qvm-run supposed to be run in dom0? cmd.run maybe a solution to run something inside a qube.

That depends on the target of the sls file (which isn’t clear here)

But yes, attempting to run qvm-run (not qvm.run) anywhere but dom0 won’t work.

Also, doing so is pointless anyway since, if you’re trying to run qvm-run on a domU, you’re already running a salt state on the qube. Just put the command you want to run as a cmd.run in that salt file, rather than trying to run it from dom0 with qvm-run.

Hello,

sorry for the late response. I want to run the command in the newly created qube.

Regards