![]() |
XEN VM Can you tell which is your host machine
Hi.
We're using the VMs of XEN (SuSE Linux) to run system critical processes, and further redundancy by having XEN on another machine. We boot the VMs over NFS so they are identical. We run one or the other. Is there anyway, within a VM, to find out your host machine ? As our VMs have their names in our DNS, with identical IPs, one connects via IP or NAME; it'd be interesting to be able to tell which of the parent hosts you are situated. Thanks. -doug |
If I'm logged onto a machine,
Question #1 How can I tell if it's a Xen/VM ? Question #2 If so, how do I determine the host on which it is running ? Thanks. -doug (I'm fully prepared to receive some basic information, as I have as yet never traipsed down this primrose path. <.grin>) |
You can easily do this if you use libvirt to manage xen, by either querying each host with virsh or using the php API and build a status page you can access.
The virsh approach is the most useful for script automation, of course. |
Quote:
|
Hi Thanks.
$ virsh looks interesting, its help says it's similar to $ xm as a tool to manage the VM running beneath. I've been using xm as I tend to avoid GUI -- just a personal preference. My question, however, is from the bottom looking up. Not too long ago, one of my VMs wouldn't boot, got caught in an FSCK repair loop. Since the disks are virtual, the answer was to reboot the mother machine, do the FSCK-repair on the real disk, then all the VMs were restarted and were fine. That got me thinking, say I have a VM, let's call it vm-foobar which can be running under XEN on some number of machines: Moe, Larry, Curly. (As we have many architectures {some more decrepit than others} in our heterogeneous shop, we're thinking of using VMs to better enable moving important functions from one machine to another for any disaster or maintenance.) So when I get onto my VM, say $ ssh fubar@foobar.test.lab is there a way I can determine which host: (Moe, Larry, or Curly) I'm running on? virsh doesn't run in the VM, it's only available on the mother ship. /proc/cpuinfo gives me good information, just not what I'm looking for. Thanks to all for all help received thus far. -Doug. |
Quote:
|
| All times are GMT -5. The time now is 05:55 PM. |