[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] rc.local?


  • To: xen-users@xxxxxxxxxxxxx
  • From: Alexandre Kouznetsov <alk@xxxxxxxxxx>
  • Date: Tue, 10 Dec 2013 10:21:55 -0600
  • Delivery-date: Tue, 10 Dec 2013 16:23:06 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hello.

El 09/12/13 19:01, Mark J Bradakis escribió:
xen-create-image --boot  blah blah

would configure and start the VM, then run /etc/rc.local  but that does
not seem to be the case.

How does one get a script to run when the new guest is first started,
before logging in and
doing it by hand?  What am I missing?
If you deploy a Debian or Ubuntu DomU with help of xen-create-image, it will run it's own /etc/rc.local on startup, not because xen-create-image made it to do so, but because the distribution is organized that way. By default, this script does nothing.

There are several ways to make your new DomU to run custom scripts on startup. 1. You may use /etc/xen-tools/skel/etc/rc.local to deploy a custom version of the script. You even may trick it, so it run something at first boot and modify itself in order to do noting on subsequent boots. 2. You may deploy a custom script with everything you need but run it by hand, to have more control (I do that myself). 3. You may use /etc/xen-tools/role.d/something to make xen-create-image to run custom commands while creating the image, even before it boots. 4. You may install some puppet or chief agent by default on each DomU you deploy, and manage them from a central location.

Greetings.

--
Alexandre Kouznetsov


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.