Automated Qubes OS Installation using Kickstart and/or PXE Network Boot

@alzer89

How’s resolving the development issues with sys-pxe coming?

Would you like to point out the specific parts of the code that aren’t working, so that specific coding solutions could potentially be identified by others?

Maybe a quick How To tutorial on running your salt files could encourage more of us to jump in with using, testing, & contributing?

The qvm.clone function to clone the fedora-36-minimal template and rename it is the only part of it not working. All other parts seem to work.

Any help would be massively appreciated.

@alzer89 Ok, so is the following salt code within the sys-pxe-template.sls file what you are specifically using to attempt cloning and renaming the fedora-36-minimal template (but its not working for some unknown reason)?

I noticed that code is commented out…

sys-pxe-template.sls

Yes, because it failed (most likely because it’s not the appropriate way to issue a clone command).

In the testing scripts of Salt installed on every Qubes OS machine, there is a qvm.clone command, and this function would work perfectly…if I could get it to work.

That is the trouble I am having…

@alzer89

How about something like this?

qvm-clone-id:
  qvm.clone:
    - name: sys-pxe-template
    - source: fedora-36-minimal

Reference:

1 Like

I tried that, but it threw an error. My guess is that I hadn’t configured something properly.

I can see references to those functions in /srv/formulas/test, but not in base.

But yes, that should work…

Where are the salt files to be found?
How are you calling salt?

I’m still learning Salt, but I’d try this

include:
- sys-pxe-template
qvm-clone-id:
qvm.clone:
- require:
- sls: sys-pxe-template
- name: sys-pxe
- source: fedora-36-minal

sys-pxe-template.sls should be in a parent directory to this as how I understand, meaning in the /srv/salt

1 Like

They’re all in /srv/salt. Should they be somewhere else?

qubesctl top.enable sys-pxe
qubesctl —all state.highstate

Thank you @unman!

I mend, where is the source?
Are they on GitHub?

@unman: to answer your question, @alzer89’s source salt files for sys-pxe are not on GitHub, but actually inside of this web forum thread at post #8.

There are 4 source salt files, which are apparently placed in dom0’s /srv/salt

  • sys-pxe.top
  • sys-pxe-template.sls
  • sys-pxe-vm.sls
  • sys-pxe.sls

Executed with:

qubesctl top.enable sys-pxe
qubesctl —all state.highstate

I believe the not working qvm.clone command is supposed to be in the sys-pxe-template.sls file, with an alternative tested version of the command presently commented out in that provided salt file.

Thank you @unman for your assistance in solving this salt puzzle for this very interesting sys-pxe community project.

Here is a link to and quote of @alzer89’s post with the 4 original sys-pxe salt files:

https://forum.qubes-os.org/t/automated-qubes-os-installation-using-kickstart-and-or-pxe-network-boot/12963/8

Full quote of source post:

Thank you for this.
I’ll try to take a look this evening.

My bad. Been a busy time for me.

I can create a git repo if you like, but you’ll likely need to fork it and make a branch with the files in the right places, haha.

Yes, thank you @qstateless!

Thank you, too, @unman!