[fedora-virt] handling guest-service dependencies at boot time elegantly?
Chris Lalancette
clalance at redhat.com
Fri Jun 12 06:41:33 UTC 2009
Bill McGonigle wrote:
> Hi, all,
>
> Before I start hacking up my own poor solution, I'd like to run this by
> the list and see if there's a good way to handle this.
>
> I have a host (5.3 Xen Dom0) that has three guests:
>
> Fedora 10
> Fedora 11
> Nexenta 2
>
> The Nexenta (opensolaris) guest's job is to provide storage services to
> the Fedora DomU's, via iSCSI and NFS (ZFS storage).
>
> My goal is to automate system startup.
>
> My dependency tree looks like:
>
> Dom0 -> nexenta-DomU -> 'service iscsi'@Dom0 -> fedora-DomU's
>
> Currently I have xendomains and iscsi set to 'chkconfig off' and the
> fedora DomU's set for 'auto', and do:
>
> xm create nexenta
> [watch xentop to see when it's running]
> service iscsi start
> service xendomains start
If I were going to do this, I'd write a very small daemon to run in the dom0
that just listens to a couple of ports. On dom0 boot, I would start this
daemon, which would first exec "xm create nexenta", then wait around for a
little while listening from a connection on port, say, 4567. Inside the nexenta
guest, you just have a simple "nc" command that connects to the dom0 once it is
booted, and acts like a "I'm ready" command. Once your dom0 daemon receives
this, it can go onto the next step (service iscsi start), and then finally onto
your last step.
It's a bit hacky, but it centralizes control all in one place, and it is pretty
easy to write.
--
Chris Lalancette
More information about the Fedora-virt
mailing list