Question about "auto power on"
-
Hello. I'm trying to configure VMs in a pool to start automatically in XCP-ng. Is it possible to define a boot order for VMs in XOA?
Link I consulted:
-
@cairoti yes, you can set the boot delay or use the vAPP settings to configure this. (looking for the link)
https://docs.xcp-ng.org/appendix/cli_reference/#appliance-commands
-
By default, no VMs automatically boot, if you enable automatic boot, the default delay is 0 seconds.
So if you have 3 VMs
VM1: XO/XOA/XOCE 0 second delay
VM2: Domain Controller 30 second delay
VM3: File Server 60 second delayEverything else might not automatically boot, but that is the simplest way to do this
-
@DustinB Thanks for your reply. I will try to use the "delay" time.
-
@DustinB I have it set up like this:
VM1: 0 seconds delay
VM2: 90 seconds delay
VM3: 150 seconds delayHowever, in the test, VM1 started and then VM3. VM2 took longer to start.
I would like to set the times large because some VMs communicate with services on other VMs, so the order is important.
See the configuration:
-
@cairoti said in Question about "auto power on":
However, in the test, VM1 started and then VM3. VM2 took longer to start.
This boot order would be if the host lost power and then came up online. You might be better able to use the Jobs function of XO and XAPI to force the start order, but I haven't had a need to do this yet.
You'd be using xapi functions to start VMs or stop other VMs in specific orders.
-
@DustinB I would like the VMs to boot automatically and in order when the servers are powered on.
Do you know if there is any material about Jobs on the XO, for starting VMs?
-
-
@karlisi To test I created 3 schedules to start 3 VMs respectively. My goal was to test the startup order. Afterwards I restarted the XO VM. I noticed that the VMs start earlier than expected. How does the XO time the VMs?
In job I did not define timeout. Below are the schedules for each VM.
-
@cairoti
You might look at "Appliances".
The startup delay on the VM doesn't apply when the host is booting, only when you run "xe vm-start".Look at
https://xcp-ng.org/forum/topic/6464/resolved-vm-s-auto-starting-in-wrong-order
and
https://xcp-ng.org/forum/topic/1312/vm-start-delay-does-it-work-yet/5
-
@Davidj-0 From what I understand, the xcp host must already be turned on. The VM will only start at the defined time, when for some reason, it has been turned off previously.
My plan was to have the servers power up when they received power. Then the "auto power on" XOCE VM would start and, via scheduling, power on other VMs in a predefined order.
Does the "Appliances" feature only exist in the XCP-ng command line or in the XCP-ng Center?
According to this link this feature does not exist on XO: https://xcp-ng.org/forum/topic/6311/managing-vapps-with-xoa