Thanks Richard! Very comprehensive answers. I will investigate in depth.<br><br>Appreciate your response!<br><br>-a<br><br><div class="gmail_quote">On Tue, Jun 7, 2011 at 11:06 AM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Mon, Jun 06, 2011 at 06:13:59PM -0400, al pat wrote:<br>
> I was looking at replacing vmware in our appliance with kvm and wanted to<br>
> get a feel for some<br>
> of the utilities vmware provides that I will need to have equivalent<br>
> function in kvm/qemu environment.<br>
><br>
> I had a few question, and was looking at some help/pointers to investigate<br>
> further:<br>
><br>
> 1. How to send log files to host log? I can use syslog for event reporting,<br>
> but is there a way, I can move  a file from guest to host?<br>
<br>
</div>It's best (and most secure) to send logs to a remote server in real<br>
time.  Standard syslog can do this.<br>
<br>
Just treat your virtual machines like networked real machines, and you<br>
won't go far wrong.<br>
<div class="im"><br>
> 2. guest to host communication - logging messages (probably to appear in a<br>
> host log file), providing guest information like guest name, IP address etc<br>
<br>
</div>You can set up an ordinary TCP/IP network connection or a<br>
virtio-serial connection.  There are about a dozen different options<br>
for guest to host communications:<br>
<br>
<a href="http://libvirt.org/formatdomain.html#elementsConsole" target="_blank">http://libvirt.org/formatdomain.html#elementsConsole</a><br>
<div class="im"><br>
> 3. Is there a way for the host to execute programs/scripts in guest?<br>
<br>
</div>Again, thinking of this from a network point of view, just use 'ssh'.<br>
It's widely available and secure.<br>
<div class="im"><br>
> Looking for things like power down of guest<br>
<br>
</div>You can send an ACPI signal to the guest which (if the guest is<br>
listening) will power it off:<br>
<br>
<a href="http://virt-tools.org/learning/start-vm-with-virt-manager/" target="_blank">http://virt-tools.org/learning/start-vm-with-virt-manager/</a><br>
<div class="im"><br>
> 4. Is there a way to have heartbeat message between host and guest?<br>
<br>
</div>Depends what you want the heartbeat to do.  A watchdog maybe?  We<br>
support them in qemu and KVM:<br>
<br>
<a href="https://secure.wikimedia.org/wikipedia/en/wiki/Watchdog_timer" target="_blank">https://secure.wikimedia.org/wikipedia/en/wiki/Watchdog_timer</a><br>
<a href="https://rwmj.wordpress.com/2010/03/03/what-is-a-watchdog/" target="_blank">https://rwmj.wordpress.com/2010/03/03/what-is-a-watchdog/</a><br>
<div class="im"><br>
> 5. Way for host to find the process and network information about the guest<br>
<br>
</div>virt-top<br>
<br>
It depends on exactly what information you want to find out.  Using<br>
ordinary network methods is best if you have a lot of detailed<br>
information to collect from the guest, eg. using collectd.<br>
<br>
<a href="http://collectd.org/" target="_blank">http://collectd.org/</a><br>
<div class="im"><br>
> 6. how to find "hostid" of the guest in host?<br>
<br>
</div>Not sure what you mean by "hostid".  The UUID and MAC address is<br>
available through libvirt, eg:<br>
<br>
virsh dumpxml Guest | grep '<uuid>'<br>
<br>
The hostname is accessible from virt-inspector.<br>
<br>
Rich.<br>
<font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/%7Erjones%0Avirt-top" target="_blank">http://people.redhat.com/~rjones<br>
virt-top</a> is 'top' for virtual machines.  Tiny program with many<br>
powerful monitoring features, net stats, disk stats, logging, etc.<br>
<a href="http://et.redhat.com/%7Erjones/virt-top" target="_blank">http://et.redhat.com/~rjones/virt-top</a><br>
</font></blockquote></div><br>