Port-xen archive

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

Re: few questions



On Tue, 30 Aug 2005 02:26:45 +0200
Piotr Stolc <socrtp%soclab.eu.org@localhost> wrote:

> hi,
> I'm experimenting with Xen with NetBSD 3.0 BETA as dom0 and Linux 2.6
> domU (and in near future another NetBSD as domU).
> And my problem/questions are:
> 
> Do we have any rc script for starting/stopping domains and any
> queueing mechanism for it? I start Linux from rc.local with 'xm
> create', but I don't even want to imagine what will happen if I start
> several domains at once (especially after crash when fsck will scan
> the disk). I want to start first system and after it fscks partitions
> and starts some important daemons (like DNS) I want to start another
> system. The second problem is with shutting down the system. when I
> use 'xm shutdown'
> command the Linux shutdowns cleanly. but when I shutdown/halt the
> dom0 it just kills xend, and the domU system doesn't shutdown cleanly.

For the first problem, I wanted to implement this in the xend rc.d
script, but I haven't made it yet... (maybe this week).

I use the following in /etc/rc.local:

# NetBSD/Xen
echo
echo -n "Starting Xen VM1:"
/usr/pkg/sbin/xm create /usr/pkg/etc/xen/nbsd1 > /dev/null 2>&1 &
if [ $? -eq 0 ]; then
        echo " done."
else
        echo " failed."
fi

echo "Xem VM1: Waiting 5 seconds to finish the boot process..."
sleep 5

echo -n "Starting Xen VM2:"
/usr/pkg/sbin/xm create /usr/pkg/etc/xen/nbsd2 > /dev/null 2>&1 &
if [ $? -eq 0 ]; then
        echo " done."
else
        echo " failed."
fi

You can call "xm shutdown -a" in /etc/rc.shutdown and "sleep" for
the second problem.

I don't know if there are better ways... anyway hope that
helps you.



Home | Main Index | Thread Index | Old Index