Unload drivers in a VM before sleep?


Recommended Posts

To avoid using Media Build Kernels in unRaid, so i can easily upgrade it etc. i want to use an Ubuntu VM for my TVHeadend server.

The VM is running, this was no issue with the help of the Forum.

 

But my server should go to sleep when it is not needed. Because the S3 crashes my TV Tuner when the driver etc. is not unloaded before sleep i am searching for method to stop TVheadend and unload the drivers when my unRaid goes to sleep.

 

I was thinking of using ssh for this, so my unRaid logs into the VM and starts a script before going to sleep. But this is more a shoot and forget method, because the unRaid does not see when the script is finished.

 

Is there any correct way i could do this? Is the VM notified in anyway when unRaid goes to sleep so i could use this as a trigger?

 

I really have no idea how to do this.

Link to comment

Just thought I should chime in here and note that what you're trying to do isn't actually supported right now.  If you have success in testing/config, please let us know, but we do not actually support the S3 sleep function at this time (with VMs or otherwise). Lots of tricky things can happen when sleep is engaged in systems that use PCI device assignment to a VM.  Eventually we'd like to find ways to accommodate this, but to be honest, this is relatively low on the priority list compared to other features.

Link to comment

Yep i know.

For most unRaid Users S3 is no topic afaik. They must have very big wallets or live in countries where energy costs are relatively low.

For me here in Germany it is quite expensive having a server ideling around with approx. 40W, when it is not use half of the day.

 

I think i will try the ssh way. From what i have found out it behaves just like local commands when the commands are directly appended to the ssh call.

 

If it works i let you know.

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.