[virt-tools-list] Question on host/guest management ...

Richard W.M. Jones rjones at redhat.com
Tue Jun 7 15:06:43 UTC 2011


On Mon, Jun 06, 2011 at 06:13:59PM -0400, al pat wrote:
> I was looking at replacing vmware in our appliance with kvm and wanted to
> get a feel for some
> of the utilities vmware provides that I will need to have equivalent
> function in kvm/qemu environment.
> 
> I had a few question, and was looking at some help/pointers to investigate
> further:
> 
> 1. How to send log files to host log? I can use syslog for event reporting,
> but is there a way, I can move  a file from guest to host?

It's best (and most secure) to send logs to a remote server in real
time.  Standard syslog can do this.

Just treat your virtual machines like networked real machines, and you
won't go far wrong.

> 2. guest to host communication - logging messages (probably to appear in a
> host log file), providing guest information like guest name, IP address etc

You can set up an ordinary TCP/IP network connection or a
virtio-serial connection.  There are about a dozen different options
for guest to host communications:

http://libvirt.org/formatdomain.html#elementsConsole

> 3. Is there a way for the host to execute programs/scripts in guest?

Again, thinking of this from a network point of view, just use 'ssh'.
It's widely available and secure.

> Looking for things like power down of guest

You can send an ACPI signal to the guest which (if the guest is
listening) will power it off:

http://virt-tools.org/learning/start-vm-with-virt-manager/

> 4. Is there a way to have heartbeat message between host and guest?

Depends what you want the heartbeat to do.  A watchdog maybe?  We
support them in qemu and KVM:

https://secure.wikimedia.org/wikipedia/en/wiki/Watchdog_timer
https://rwmj.wordpress.com/2010/03/03/what-is-a-watchdog/

> 5. Way for host to find the process and network information about the guest

virt-top

It depends on exactly what information you want to find out.  Using
ordinary network methods is best if you have a lot of detailed
information to collect from the guest, eg. using collectd.

http://collectd.org/

> 6. how to find "hostid" of the guest in host?

Not sure what you mean by "hostid".  The UUID and MAC address is
available through libvirt, eg:

virsh dumpxml Guest | grep '<uuid>'

The hostname is accessible from virt-inspector.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top




More information about the virt-tools-list mailing list