I am looking for a way to run a custom shell command as root automatically sometime after a VM is started.
I need the command to be run at least after the main KVM process and all it's threads have been created.
The command I want to run is this:
Anyone have any suggestions for how I can trigger this command to run after a VM has been started?
It doesn't even have to be only after a specific VM is started since the command will only affect a specific VM's PIDs. However that would be a bonus if the way can be set to only run for a specific VM as that might come in handy in the future.
Thanks
I need the command to be run at least after the main KVM process and all it's threads have been created.
The command I want to run is this:
Code:
ls /proc/$(pgrep -f nick-htpc)/task | xargs -n 1 chrt -f -p 1
Anyone have any suggestions for how I can trigger this command to run after a VM has been started?
It doesn't even have to be only after a specific VM is started since the command will only affect a specific VM's PIDs. However that would be a bonus if the way can be set to only run for a specific VM as that might come in handy in the future.
Thanks