Having trouble configuring VMs with Salt / qubesctl

75 views
Skip to first unread message

Joe Ruether

unread,
Feb 6, 2017, 6:01:18 PM2/6/17
to qubes-users
Hello! I am using Qubes 3.2 and I am attempting to automate the configuration of my VMs using the Salt / qubesctl management stack.

I am very new to salt, but I have been experimenting and I think I understand how it works. I have written some state files to configure dom0 and I haven't had any problems with those.

The problem I am running into is that whenever I try to do anything at all with a VM, it seems that the qubesctl process just hangs. I've let it run overnight just to see, and it definitely isn't doing anything. I also don't know how to make it more verbose so I can debug the issue.

Here are the contents of my top file, /srv/salt/custom/setup.top:

base:
dom0:
- custom.template.fedora-24

fedora-24:
- custom.up-to-date

---

The goal I am trying to accomplish is to install the fedora-24 template, then update the packages on it. Here is my custom.template.fedora-24.sls:

#!pyobjects
Pkg.installed("qubes-template-fedora-24")
Qvm.prefs("fedora-24", label="black", netvm="sys-firewall")

---

And here is my custom.up-to-date.sls:

#!pyobjects

system = grains("id")
#Pkg.uptodate(system, refresh=True)
Test.nop(system)

---

Notice how I commented out the uptodate function and replaced it with a nop, with the intention of just getting it to return true.
When I run the following command, dom0 successfully installs and configures the fedora-24 template, and the fedora-24 template is started, but after that, it freezes:

qubesctl --all state.highstate

CTRL-C doesn't give me back a prompt, instead I get errors regarding pool workers. I end up using CTRL-Z and issuing a "killall -9 qubesctl" to make it stop.

I don't know how to get more information on the VM to discover what is going wrong. I have (manually) fully updated dom0 and restarted the physical computer. Any tips would be much appreciated. Thank you!

john.david.r.smith

unread,
Feb 6, 2017, 6:08:09 PM2/6/17
to Joe Ruether, qubes-users
i never had this kind of problem and can't really help you with your sls-files, since i am only used to the yaml + jinja form.
but you could take a look at the documentation for debugging salt:
https://www.qubes-os.org/doc/salt/#debugging

Joe Ruether

unread,
Feb 6, 2017, 8:01:42 PM2/6/17
to qubes-users, jrru...@gmail.com, john.davi...@openmailbox.org

I figured out my issue, at some point during my experiments I switched the default template to debian-8. It took me a while to find the disp-mgmt-* VMs, they were hidden and it wasn't clear that they were being used. Apparently, I was hitting this bug because I haven't updated my debian-8 template yet (I was going to update it with salt! chicken-and-egg problem...)
https://github.com/QubesOS/qubes-issues/issues/2222

Anyway, it looks like I am good to go for now, thanks!

Reply all
Reply to author
Forward
0 new messages