May 1, 20179 yr How can I set up my VMS so that I can have them all go to sleep at say 10pm at night and wake up at 8am? My disks could spin down then. I don't really want to shut down/start up again, a sleep would be fine. I am guessing some sort of libvirt command line on a schedule? Actually I wonder if the hard part is the scheduling not familiar with all the flavours of unix to know how to schedule scripts at specific times in unRAID...
May 2, 20179 yr 3 hours ago, planetwilson said: Actually I wonder if the hard part is the scheduling not familiar with all the flavours of unix to know how to schedule scripts at specific times in unRAID... Can't help you with the actual script though...
December 9, 20187 yr On 5/1/2017 at 4:46 PM, planetwilson said: How can I set up my VMS so that I can have them all go to sleep at say 10pm at night and wake up at 8am? My disks could spin down then. I don't really want to shut down/start up again, a sleep would be fine. I am guessing some sort of libvirt command line on a schedule? Actually I wonder if the hard part is the scheduling not familiar with all the flavours of unix to know how to schedule scripts at specific times in unRAID... did you ever come up with a solution? or did you just use a CRON job?
December 9, 20187 yr Author No I didn't but might have another go now you've reminded me. Ideally there would be something I could do for OSX but I think that would need to be a sleep from inside the VM with restore from outside
December 10, 20187 yr 15 hours ago, planetwilson said: No I didn't but might have another go now you've reminded me. Ideally there would be something I could do for OSX but I think that would need to be a sleep from inside the VM with restore from outside Yeah, you can't sleep a Mac VM from the unraid side. In fact, I don't think you can use the Mac OS sleep function from within the VM either, from memory I was never able to wake it up again when I played around with that. For my Mac VM I set a scheduled shutdown from the Mac System Preferences/Energy Saver/Schedule. Then I start it on-demand with the WOL plugin and a WOL app on my phone. But I'm sure you could also schedule a start via User Scripts. The built-in Mac scheduler has an option for scheduling starts as well, but I doubt it would work in a VM.
December 10, 20187 yr Just realised I have a need to start the VM on a schedule too. This super simple script will do the trick, scheduled from the Users Scripts plugin with a custom cron. #!/bin/bash virsh start "<name-of-VM>" Replace <name-of-VM> with the VM name as shown in the unraid UI
December 10, 20187 yr Author Yes I'll be doing similar but I think I'll do virsh stop and virsh resume to just have them sleep/wake up rather than go through a reboot cycle as I can't guarrantee clean shutdown depending on what is running
Archived
This topic is now archived and is closed to further replies.