Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you start Guests automatically?
#1
How do you start Guests automatically?  I tried this on the target, but it did not work. 
 
    cd /etc/xen/auto
    ln -s /root/Dom1_Linux.cfg .
 
I tried adding these to the .cfg file as well:
 
    on_xend_stop = ‘shutdown’
    on_xend_start = ‘start’

Braeton
Reply
#2
I am not sure this this is the right way, but adding the following to the end of "/xenboot.sh" seems to work (where the config files are in "/root"):

cd /root
xl create abc1.cfg
sleep 2

xl create abc2.cfg

Note: I also changed XENDOMAINS_RESTORE to 'false' in "/etc/default/xendomains". I am not sure if this change was actually needed.
Reply
#3
There are several issues with the XZD root filesystem which prevent autostarting of domains using the Xen init scripts.  Among other things this means that placing domain configurations in '/etc/xen/auto' or changing '/etc/default/xendomains' will have no effect.

All these issues are expected to be resolved when XZD moves to using a Yocto FS.

There are ways to work around these issues, but the easiest solution is to use a custom init script or piggyback on an existing init script.

Attached is a boot script which will autostart domains in '/etc/xen/auto'.  To use it remove the '.txt' extension and put the script in '/etc/init.d/' .

     Nate


Attached Files
.txt   S53bootdoms.txt (Size: 264 bytes / Downloads: 4)
Reply
#4
Thanks, I will give that a try. A couple of questions:
Is there any need to sleep between the starting of guests in the script?
In what order do scripts in /etc/init.d/ get executed, is this a concern?
Reply
#5
(11-30-2016, 08:06 PM)BraetonTaylor Wrote:  Is there any need to sleep between the starting of guests in the script?

There shouldn't be.  Another guest can be created as soon as the create command returns.  If this is not the case please let us know.

Quote:BraetonTaylor
 In what order do scripts in /etc/init.d/ get executed, is this a concern?

In lexicographical order, but since each script should be named using a unique S[0-9]{2} prefix, the scripts should run in increasing numerical order.

A domain creation script should be one of the last things to run.  If PV networking is not being used it can be run shortly after the S45xilboot script, but if PV networking is being used it should be run after the networking init script.  If a domain is created before these points it would fail to be created in the first case and likely have a networking timeout on boot in the second.

     Nate
Reply
#6
Hi! Danke für Tipps!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)