December 27, 20232 yr Hi, I have enabled "auto start" for a VM so it turn on when Unraid starts. But I would also like to monitor it and turn it on automatically if it gets shoutdown when unraid is running. Anyboby know how to do that? Thanks /Claus
December 27, 20232 yr Community Expert 10 minutes ago, cbh said: Hi, I have enabled "auto start" for a VM so it turn on when Unraid starts. But I would also like to monitor it and turn it on automatically if it gets shoutdown when unraid is running. Anyboby know how to do that? Thanks /Claus You will need to have a script to run with something like user scripts to start a VM that is shut down. There is no function to check for the VM status and start it. virsh list --all will show VM state. and virsh start VMName
December 27, 20232 yr Author 24 minutes ago, SimonF said: You will need to have a script to run with something like user scripts to start a VM that is shut down. There is no function to check for the VM status and start it. virsh list --all will show VM state. and virsh start VMName Thanks. I can script in powershell but not in "unraid" (Dont know what that script language is called 🙂 ) Do you have an example how that script could look like? And I guess that the script should run maybe every ½ hour or so. Our are there any other way to have a monitor script running all the time? Thanks
December 27, 20232 yr Community Expert 36 minutes ago, cbh said: Thanks. I can script in powershell but not in "unraid" (Dont know what that script language is called 🙂 ) Do you have an example how that script could look like? And I guess that the script should run maybe every ½ hour or so. Our are there any other way to have a monitor script running all the time? Thanks Would be Bash in unraid. Here is a link to a script. But you could just add into user scripts plugin(Install from CA) to run the command virsh start VMNAME every hour, you you can create a custom schedule using cron format. Note you will get an error in the log if running with the simple solution. Then set the schedule:
December 27, 20232 yr Author 2 hours ago, SimonF said: Would be Bash in unraid. Here is a link to a script. But you could just add into user scripts plugin(Install from CA) to run the command virsh start VMNAME every hour, you you can create a custom schedule using cron format. Note you will get an error in the log if running with the simple solution. Then set the schedule: It is working 🙂 Thank you very much and a happy new year. /Claus
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.