From: Chris Bainbridge <chris.bainbridge@gmail.com>
To: Xen development list <xen-devel@lists.xensource.com>
Subject: simple check for domU?
Date: Fri, 11 Nov 2005 00:23:18 +0000 [thread overview]
Message-ID: <623652d50511101623q533a8e04r@mail.gmail.com> (raw)
Hi, is there a simple way to check that we're running under a domU? So
far I came up with:
[[ -d /proc/xen && ! -z `ls /sys/bus/xen/devices/` ]]
or
-e /sys/bus/xen/drivers/vbd || -e /sys/bus/xen/drivers/vif
Neither of which is pretty, and I'm not convinced they work under all
circumstances. This is useful for system setup scripts to do different
things depending if they are run under dom0/U.
Thanks,
Chris
next reply other threads:[~2005-11-11 0:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-11 0:23 Chris Bainbridge [this message]
2005-11-11 1:52 ` simple check for domU? Karsten M. Self
2005-11-11 16:21 ` Chris Bainbridge
2005-11-11 18:14 ` NAHieu
2005-11-11 20:33 ` Chris Bainbridge
-- strict thread matches above, loose matches on Subject: below --
2005-11-12 1:33 James Harper
2005-11-12 2:26 ` Chris Bainbridge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=623652d50511101623q533a8e04r@mail.gmail.com \
--to=chris.bainbridge@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.