Autostart behaviour after upgrade 8.2 -> 8.3
-
Hi everyone!
I've upgraded standalone host from 8.2 to 8.3 yesterday. On 8.2 I was using /etc/rc.local and vApps to autostart VM-s, it was working like a charm, especially since you can delay startup time which is quite handy if you have block based storage that needs long time to boot so you can delay boot of file server VM before the storage boots online for example.
After upgrading to 8.3 I've realized that rc.local + vApps method does not work any more, can someone confirm that?
I've found solution here: https://docs.xcp-ng.org/guides/autostart-vm/#with-the-cli , however since i was typing and not copy-pasting, instead of "xe pool-param-set uuid=<VM_UUID> other-config:auto_poweron=true" on the last part I typed in autopoweron:true, restarted and it does not work.
I typed it with colon (:) again and listed pool param list, then i saw two "autopoweron:true" flags with same value, i decided to type autopoweron:false, then i had 3 flags, two true and 1 false... Later on I realised that i had to use equals (=), so now autostart works.
Is this normal behaviour when using colon instead of equals sign? Please see picture attached:

Also, is there a way to add autostart delay to VMs?
Thanks!
-
Hey, thanks for writing this up with the actual commands and the screenshot, that really helps.

Not sure why rc.local + vApps stopped working after your 8.2 to 8.3 jump. rc.local is more your own dom0-level script than something XCP-ng promises to keep stable across releases, so something underneath may well have shifted, but I can't point to what.
On the delay question, there does seem to be a per-VM "start-delay" parameter. I ran into it replying to a pretty similar issue a couple days ago, if you want to compare notes: https://xcp-ng.org/forum/topic/12388. There are also the "appliance" CLI commands, the vApp equivalent, though from another recent thread it looked like nobody's fully sure how start order and delay actually interact there: https://xcp-ng.org/forum/topic/12149. So I think the capability is there, just not pulled together in one place.
The colon-vs-equals thing is interesting. I honestly don't know xe's map-param parsing well enough to say if that's expected or a rough edge. Maybe someone closer to the CLI internals can say whether it should just reject that instead of creating duplicate entries. Given how scattered this all is, might be worth flagging to @Team-Documentation-Knowledge-Management.
Hope some of that's useful, others probably know xe's internals better than me though.
-
@poddingue Thank you for the feedback!
As I am typing this, I believe I've found the issue for autostart issues.
My rc.local:
[09:15 REDACTED]# cat etc/rc.local #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. # # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot. touch /var/lock/subsys/local sleep 300 /usr/bin/xe appliance-start uuid=00edfd41-1b01-f401-43cb-68201c6415c6From the commented out section above we can clearly see that correct permissions need to be set on /etc/rc.d/rc.local, while my permissions got back to default values after upgrade, see below:
[09:16 REDACTED rc.d]# ls -al /etc/rc.d/rc.local -rw-r--r-- 1 root root 556 Jul 29 16:17 /etc/rc.d/rc.localI've mounted backup partition and they were properly set on 8.2.
I will make required changes and re-test in the upcoming days, not today.
In regards to "other-config:" CLI commands - colon-vs-equals, I will try do dive into this a little deeper and come back with more info.
-
P poddingue marked this topic as a question
-
Thanks for coming back with the actual cause instead of leaving it hanging.

To me, a permissions reset on/etc/rc.d/rc.localwould explain it completely, and it fails in the worst way, since nothing complains at boot and the VMs just never start.
It also looks worth documenting, because our own troubleshooting page tells people to append a clocksource workaround to/etc/rc.localwithout mentioning the executable bit either, so anyone following that could end up with a workaround that quietly does nothing.
I haven't tested whether the 8.2 to 8.3 upgrade resets that bit every time or just happened to in your case, so that half stays your finding, not mine.I'm curious what you turn up on the colon versus equals behaviour.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login