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

Re: [libvirt-users] Can a VM tell what host it's on?

On 02/02/2012 11:33 AM, Whit Blauvelt wrote:
> Is there a way internal to a KVM VM to know which host it's running on? 

No.  The ideal hypervisor is one where the guest doesn't even know it is
running as a virtual machine.  And consider live migration - a guest
might not be running on the same host over its lifetime.  Therefore,
there should be nothing that requires a guest to know which host it is
running on.

> It could send a command via ssh to virsh on a host, and learn from that
> whether the host currently has it running. But is there something within the
> VM itself which will reveal this? 

Why do you think you need it?  Perhaps if you ask a better question
about what you are really trying to solve, we can give a better answer.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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