Unable to create VM on second drive
You could try and give the virtual machine manager group access to the folder with the chown command. It looks like the userID for virt-man is 107 and so is the groupid looking at your stack trace.
Not sure if this will work but this might work.
You also want to keep
Not sure if this will work but this might work.
sudo chown $USER:107 /run/media/ivan/1TB-HDD/VMs/You also want to keep
$USER in the script as the owner else your user won't have direct access anymore