Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can't run hook scripts.

Featured Replies

Noobie needing help here. I am trying to run a hook script to put gpus to idle after vm shutdown. But with any script I put in /etc/libvert/hooks/qemu.d/, I get this error on vm startup. I chmod everything. Even if the script does nothing, still get this error. My qemu is version 9.2.3.

Script is

#!/bin/bash

if [[ $2 == "release" ]]
then
        bash /mnt/user/isos/scripts/nvidia_idle
fi

Untitled.png

Edited by kakashisensei

Maybe a permission issue?

What does this show:

ls -l /etc/libvirt/hooks/qemu.d

  • Author
14 hours ago, Jorgen said:

ls -l /etc/libvirt/hooks/qemu.d

this is what i get

ls -l /etc/libvirt/hooks/qemu.d
total 4
-rwxr-xr-x 1 root root 98 Aug  2 01:17 gpuidle*
  • Author

i am looking at this and it says i need to have folder of the vm name in qemu.d. once i put the script in vm name folder, i stop getting this error message and the vm starts.

the doc states i can put the script in /etc/libvirt/hooks/qemu.d/$vmname/release/end/ and it should execute after the vm has turned off and released resources. but it still isnt working when i exit the vm. i have chmod the scripts and have tested the scripts run fine when i manually run them in terminal.

I think unraid does it differently compared to the guide you're referring to.

See here for an older example: https://forums.unraid.net/topic/126883-running-a-script-after-shutting-down-a-vm/

Although, it makes sense to separate the scripts for different VMs with the "$vmname" path.

Sorry I'm out of my depth here, I was testing hooks for the same purpose a while back but can't remember if I got them working or not. Hopefully someone more knowledgeable will come along and help.

Edited by Jorgen

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.