KVM Boot Delay

Issues related to applications and software problems
Post Reply
simon_lefisch
Posts: 55
Joined: 2017/07/12 21:02:02

KVM Boot Delay

Post by simon_lefisch » 2020/01/02 20:54:52

Hello everyone,

I have a few VMs on my CentOS 7 box but I would to setup a script to delay some of them from starting right away at host boot up (ie; have my file server boot up right away but have my media server and a couple other VMs boot after the file server has completed). I tried this tutorial but when I input 2 or more VMs the first VM is skipped and the rest boot up (after the file server, which is set to start on host boot up). Is there something missing from this or is there a better way to achieve this? I'm a complete noob to scripting/etc and starting to learn, but any info/guidance would be appreciated. Thanks!
Hardware:
Supermicro X10SRi-F mobo
E5-2620v4 CPU
58GB RAM
2x 250GB SSD RAID1 (OS)
2x 4TB HDD RAID 1 (Storage)

pwd
Posts: 61
Joined: 2014/12/23 11:54:42

Re: KVM Boot Delay

Post by pwd » 2020/01/02 21:57:17

maybe it's not the best solution, i would turn off autostart for all virtual machines and write script with virtsh start and sleep ;)
"God, root, what is difference?"

simon_lefisch
Posts: 55
Joined: 2017/07/12 21:02:02

Re: KVM Boot Delay

Post by simon_lefisch » 2020/01/02 23:47:09

pwd wrote:
2020/01/02 21:57:17
maybe it's not the best solution, i would turn off autostart for all virtual machines and write script with virtsh start and sleep ;)
Interesting, didnt think about that. I would need them to boot in a certain order and I'm not good at all in scripting. Is there any way you or someone else could help me out with that? Or point me in the right direction? I'm more than willing to learn.
Hardware:
Supermicro X10SRi-F mobo
E5-2620v4 CPU
58GB RAM
2x 250GB SSD RAID1 (OS)
2x 4TB HDD RAID 1 (Storage)

sywhk
Posts: 10
Joined: 2015/05/01 17:16:40

Re: KVM Boot Delay

Post by sywhk » 2020/01/03 20:56:35

A sample from https://www.cyberciti.biz/faq/linux-exe ... em-reboot/
@reboot sleep 300 && /home/wwwjobs/clean-static-cache.sh

For bash tutorial, please search for this free ebook : Advanced Bash-Scripting Guide

simon_lefisch
Posts: 55
Joined: 2017/07/12 21:02:02

Re: KVM Boot Delay

Post by simon_lefisch » 2020/01/11 15:58:29

sywhk wrote:
2020/01/03 20:56:35
A sample from https://www.cyberciti.biz/faq/linux-exe ... em-reboot/
@reboot sleep 300 && /home/wwwjobs/clean-static-cache.sh

For bash tutorial, please search for this free ebook : Advanced Bash-Scripting Guide
Thanks for the info. I did something similar and got it working with cron and a basic script. Much appreciated for your help :mrgreen:
Hardware:
Supermicro X10SRi-F mobo
E5-2620v4 CPU
58GB RAM
2x 250GB SSD RAID1 (OS)
2x 4TB HDD RAID 1 (Storage)

Post Reply

Return to “CentOS 7 - Software Support”