The surprise blocker turned out to be in a direction I did not expect (obviously); "virsh"
is aliased in .bashrc
to alias virsh='virsh -c qemu:///system'
from a really long time ago when I set up the VM in the first place, which is, of course, not available to my script. Since typing out alias virsh='virsh -c qemu:///system'
every time would suck, you can either alias the command, or set an enviorment variable via export LIBVIRT_DEFAULT_URI="qemu:///system"
in one's .bashrc
. I have no idea why I went with the alias, it was kind of a coin toss, and I had forgotten about it long ago. Unbelievable, that my problem wasn't actually the problem :)
THANK YOU folks esp. @markp-fuso & @ruakh for helping me figure this out. Hopefully someone comes across this in a search and learns from my hubris.