On Tue, Jun 7, 2011 at 11:06 AM, Richard W.M. Jones
On Mon, Jun 06, 2011 at 06:13:59PM -0400, al pat wrote:It's best (and most secure) to send logs to a remote server in real
> 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
> 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?
time. Standard syslog can do this.
Just treat your virtual machines like networked real machines, and you
won't go far wrong.
You can set up an ordinary TCP/IP network connection or a
> 2. guest to host communication - logging messages (probably to appear in a
> host log file), providing guest information like guest name, IP address etc
virtio-serial connection. There are about a dozen different options
for guest to host communications:
Again, thinking of this from a network point of view, just use 'ssh'.
> 3. Is there a way for the host to execute programs/scripts in guest?
It's widely available and secure.
You can send an ACPI signal to the guest which (if the guest is
> Looking for things like power down of guest
listening) will power it off:
Depends what you want the heartbeat to do. A watchdog maybe? We
> 4. Is there a way to have heartbeat message between host and guest?
support them in qemu and KVM:
> 5. Way for host to find the process and network information about the guest
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.
Not sure what you mean by "hostid". The UUID and MAC address is
> 6. how to find "hostid" of the guest in host?
available through libvirt, eg:
virsh dumpxml Guest | grep '<uuid>'
The hostname is accessible from virt-inspector.
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.