ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    KVM Virtual Machine Boot Order

    Scheduled Pinned Locked Moved IT Discussion
    virtualizationkvmboot order
    45 Posts 9 Posters 9.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      You can also use crontab and virsh and make them not just have an order, but make them wait for each other as well.

      1 Reply Last reply Reply Quote 1
      • DustinB3403D
        DustinB3403 @pmoncho
        last edited by

        @pmoncho said in KVM Virtual Machine Boot Order:

        @dustinb3403 said in KVM Virtual Machine Boot Order:

        On 6.5 I can find the option for boot delay, but I'm not seeing a boot order. I'm probably just looking in the wrong place but I thought I've seen it before as well.

        If you mean VMware 6.5, Select Host -> Configure -> Virtual Machines. Put your selected VM's in Automatic in the order you want them to start up and the delay between each startup.

        I don't see that anywhere in my installation, probably because we're using the free version of ESXi. . . (yes I know)

        pmonchoP 1 Reply Last reply Reply Quote 0
        • ObsolesceO
          Obsolesce
          last edited by

          I've only ever been aware of the autostart option in Virtual Machine Manager:

          0_1533144456858_4b552e40-b8eb-49e7-957a-d54ec5596ee8-image.png

          Or via virsh autostart:

          0_1533144495370_c7baea6a-f3f0-4e0f-bfbb-e3b08cab477b-image.png

          So perhaps the easiest way to do this, since there's no built-in function like Hyper-V's, is to disable autostart of all VMs, and then create a bash startup script that starts the VMs one by one, using virsh start, and then adding a delay in between.

          DustinB3403D 1 Reply Last reply Reply Quote 1
          • DustinB3403D
            DustinB3403 @Obsolesce
            last edited by DustinB3403

            @obsolesce That sounds like the exact thing I want to do all day. . . create a script to start my VM's in sequence. . . oh and update said script every time I add or remove a VM.

            Rather than having a boot sequence/priority function built in. . .

            ObsolesceO 1 Reply Last reply Reply Quote 1
            • ObsolesceO
              Obsolesce @DustinB3403
              last edited by

              @dustinb3403 said in KVM Virtual Machine Boot Order:

              @obsolesce That sounds like the exact thing I want to do all day. . . create a script to start my VM's in sequence. . .

              Rather than having a boot sequence/priority function built in. . .

              I know exactly what you mean... I had the timing set up good in Hyper-V that has about 70 VMs... but the automatic startup was not reliable at all. So I created a PowerShell script to do it on boot, which worked great. But was just one more thing to worry about when a new VM was created. Non-existant VMs didn't matter, it would throw an error in PowerShell, but would continue on which wasn't an issue.

              1 Reply Last reply Reply Quote 0
              • DustinB3403D
                DustinB3403
                last edited by

                Don't get me wrong, I don't mind making a script to do things, but it's just an added pain, and if you set it up and forget it then the code becomes cobwebbed in your brain, you forget, have an issue, have to remember what you did. It's an ordeal that really shouldn't exist.

                Boot priority seems like one of those things that should've been included from the get-go. Like seatbelts in cars are today. . .

                ObsolesceO dafyreD 2 Replies Last reply Reply Quote 2
                • ObsolesceO
                  Obsolesce @DustinB3403
                  last edited by

                  @dustinb3403 said in KVM Virtual Machine Boot Order:

                  Don't get me wrong, I don't mind making a script to do things, but it's just an added pain, and if you set it up and forget it then the code becomes cobwebbed in your brain, you forget, have an issue, have to remember what you did. It's an ordeal that really shouldn't exist.

                  Boot priority seems like one of those things that should've been included from the get-go. Like seatbelts in cars are today. . .

                  Yeah I agree. I don't use the script anymore. I do it all manually now. It's just less to worry about when you can select multiple, right-click, turn on...

                  I have the very few important ones set to automatically turn on first, like DHCP, AD, and some of the databases. Hyper-V can handle doing a few without issue.

                  1 Reply Last reply Reply Quote 0
                  • DustinB3403D
                    DustinB3403
                    last edited by

                    Just as a note, this problem of startup order appeared to have been an issue since the inception of KVM and even before. It's as if the devs simply thing a startup delay or manually starting your VM's is sufficient. . .

                    ObsolesceO 1 Reply Last reply Reply Quote 0
                    • dafyreD
                      dafyre @DustinB3403
                      last edited by

                      @dustinb3403 said in KVM Virtual Machine Boot Order:

                      Don't get me wrong, I don't mind making a script to do things, but it's just an added pain, and if you set it up and forget it then the code becomes cobwebbed in your brain, you forget, have an issue, have to remember what you did. It's an ordeal that really shouldn't exist.

                      Boot priority seems like one of those things that should've been included from the get-go. Like seatbelts in cars are today. . .

                      That's one of the reasons I put a file in /etc/default -- so we don't have to modify the script itself every time a VM is added or removed. Yes, we do have to touch a file, but that shouldn't be too difficult... right?

                      I'm not overly interested in error handling or anything like that with this script -- if the VM boots, then it will work. If it doesn't boot, then you have larger issues to deal with, lol.

                      1 Reply Last reply Reply Quote 1
                      • pmonchoP
                        pmoncho @DustinB3403
                        last edited by

                        @dustinb3403 said in KVM Virtual Machine Boot Order:

                        @pmoncho said in KVM Virtual Machine Boot Order:

                        @dustinb3403 said in KVM Virtual Machine Boot Order:

                        On 6.5 I can find the option for boot delay, but I'm not seeing a boot order. I'm probably just looking in the wrong place but I thought I've seen it before as well.

                        If you mean VMware 6.5, Select Host -> Configure -> Virtual Machines. Put your selected VM's in Automatic in the order you want them to start up and the delay between each startup.

                        I don't see that anywhere in my installation, probably because we're using the free version of ESXi. . . (yes I know)

                        My bad. I assumed you had vCenter. I should have asked. I don't see any way on the free edition.

                        1 Reply Last reply Reply Quote 0
                        • ObsolesceO
                          Obsolesce @DustinB3403
                          last edited by

                          @dustinb3403 said in KVM Virtual Machine Boot Order:

                          Just as a note, this problem of startup order appeared to have been an issue since the inception of KVM and even before. It's as if the devs simply thing a startup delay or manually starting your VM's is sufficient. . .

                          It's really not a big deal though...

                          If you're a smaller shop, it takes no time to manually start your VMs.

                          If you're huge, you just set them all to start at boot because you have entire hosts dedicated to one type of VM and it doesn't matter in what order.

                          If medium sized, it's still not a big deal. I don't mind anyways. If I reboot the main host, I'm there watching it anyways. So it's not an issue to start up the DHCP server first, and a few other initial VMs, then the rest in one shot.

                          DustinB3403D 1 Reply Last reply Reply Quote 0
                          • DustinB3403D
                            DustinB3403 @Obsolesce
                            last edited by

                            @obsolesce but it could be an issue if your DHCP server starts after other VM's. Or a database server that is dependant on other VM's being up and accessible first.

                            There is truly a case for needing a startup priority here.

                            I wonder what Amazon does. . .

                            ObsolesceO 1 Reply Last reply Reply Quote 0
                            • ObsolesceO
                              Obsolesce @DustinB3403
                              last edited by Obsolesce

                              @dustinb3403 said in KVM Virtual Machine Boot Order:

                              @obsolesce but it could be an issue if your DHCP server starts after other VM's. Or a database server that is dependant on other VM's being up and accessible first.

                              There is truly a case for needing a startup priority here.

                              I wonder what Amazon does. . .

                              My point was that, Amazon doesn't have DB, DHCP servers, and other app VMs that depend on them on the same hosts.

                              And those companies who do are small enough to just do it manually with minimal effort.

                              I have a host with 70 VMs on it, it takes seconds to start the AD and DHCP server first, then a few database servers.

                              DustinB3403D 1 Reply Last reply Reply Quote 1
                              • DustinB3403D
                                DustinB3403 @Obsolesce
                                last edited by

                                @obsolesce said in KVM Virtual Machine Boot Order:

                                @dustinb3403 said in KVM Virtual Machine Boot Order:

                                @obsolesce but it could be an issue if your DHCP server starts after other VM's. Or a database server that is dependant on other VM's being up and accessible first.

                                There is truly a case for needing a startup priority here.

                                I wonder what Amazon does. . .

                                My point was that, Amazon doesn't have hosts with DB servers and DHCP servers and other apps that depend on them on the same hosts.

                                And those companies who do are small enough to just do it manually with minimal effort.

                                I have a host with 70 VMs on it, it takes seconds to start the AD and DHCP server first, then a few database servers.

                                How are you starting the remaining 60 VM's?

                                ObsolesceO 1 Reply Last reply Reply Quote 0
                                • ObsolesceO
                                  Obsolesce @DustinB3403
                                  last edited by Obsolesce

                                  @dustinb3403 said in KVM Virtual Machine Boot Order:

                                  @obsolesce said in KVM Virtual Machine Boot Order:

                                  @dustinb3403 said in KVM Virtual Machine Boot Order:

                                  @obsolesce but it could be an issue if your DHCP server starts after other VM's. Or a database server that is dependant on other VM's being up and accessible first.

                                  There is truly a case for needing a startup priority here.

                                  I wonder what Amazon does. . .

                                  My point was that, Amazon doesn't have hosts with DB servers and DHCP servers and other apps that depend on them on the same hosts.

                                  And those companies who do are small enough to just do it manually with minimal effort.

                                  I have a host with 70 VMs on it, it takes seconds to start the AD and DHCP server first, then a few database servers.

                                  How are you starting the remaining 60 VM's?

                                  Select-all or shift+click, right-click on them, click start.

                                  Edit, this is on Hyper-V.

                                  DustinB3403D 1 Reply Last reply Reply Quote 1
                                  • DustinB3403D
                                    DustinB3403 @Obsolesce
                                    last edited by DustinB3403

                                    @obsolesce that's annoying. . .

                                    Edit: still annoying but doesn't Hyper-V have startup priority?

                                    ObsolesceO matteo nunziatiM 2 Replies Last reply Reply Quote 0
                                    • ObsolesceO
                                      Obsolesce @DustinB3403
                                      last edited by

                                      @dustinb3403 said in KVM Virtual Machine Boot Order:

                                      @obsolesce that's annoying. . .

                                      Not really, it's once a month at worst.

                                      1 Reply Last reply Reply Quote 0
                                      • matteo nunziatiM
                                        matteo nunziati @DustinB3403
                                        last edited by

                                        @dustinb3403 said in KVM Virtual Machine Boot Order:

                                        @obsolesce that's annoying. . .

                                        Edit: still annoying but doesn't Hyper-V have startup priority?

                                        No it hasnt until I checked 6 months ago. Only way is build a delay schema by hand and assign delays to VM batch start them in layers

                                        DustinB3403D ObsolesceO 2 Replies Last reply Reply Quote 1
                                        • DustinB3403D
                                          DustinB3403 @matteo nunziati
                                          last edited by

                                          @matteo-nunziati said in KVM Virtual Machine Boot Order:

                                          @dustinb3403 said in KVM Virtual Machine Boot Order:

                                          @obsolesce that's annoying. . .

                                          Edit: still annoying but doesn't Hyper-V have startup priority?

                                          No it hasnt until I checked 6 months ago. Only way is build a delay schema by hand and assign delays to VM batch start them in layers

                                          Well. . . that's just bad. . .

                                          1 Reply Last reply Reply Quote 0
                                          • matteo nunziatiM
                                            matteo nunziati
                                            last edited by

                                            The only actual need I got was a vm expecting a postgres to be up. I delayed such a vm. But yes: complex dependency schemas are a PITA but also out of the smb standard scenario imho.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post