Automatically copy files to VMs

The goal of this guide is to create a folder that automatically copies files from dom0 to VMs. Why? So when you install a new template VM, you don’t have to copy your Bash aliases, etc, across to it. That will all be handled automatically.

I just finished creating this, so there may be bugs. This guide is abbreviated and intended for tech-savvy users for now, but I will be available to answer any questions and will expand on it based on people’s feedback.

  1. set up user salt
    a. I recommend simply:
    mkdir -p ~/.config/srv/salt
    sudo ln -s /home/user/.config/srv/salt /srv/user_salt
    
  2. Download copy-to-pcre.sls and copy-to-pcre.top
  3. sudo qubesctl top.enable copy-to-pcre
  4. In your user_salt directory, make a directory copy-to/pcre/^fedora-41-xfce$ (or whatever VM you want to copy files to)
  5. Move the files you want to copy there
    e.g. if you want myscript.sh in /usr/local/bin/ on the VM, put it in copy-to/pcre/^fedora-41-xfce$/usr/local/bin/

For more documentation, see here:

Please let me know if you run into any issues!

1 Like