On Wed, Aug 10, 2016 at 02:32:47PM +0800, Chen Hanxiao wrote:
在 2016-08-09 19:03:32,"Andrea Bolognani"
<abologna(a)redhat.com> 写道:
>On Mon, 2016-08-08 at 16:19 +0100, Daniel P. Berrange wrote:
>> IOW, I don't think we should ever expose the qemu guest agent exec command
>> via libvirt APIs.
>>
>> If people want a general purpose exec facility, they can trivially write
>> a much better exec feature via a separate virtio-serial channel (or via
>> the new virtio-vsock), and stil access that over libvirt by using the
>> virDomainOpenChannel to connect to the host side of the channel if needed
>
>Personally, I feel like most of this is way out of scope for
>libvirt.
>
>If you want to monitor the disk / memory usage of your guest,
>just run the Nagios agent or whatever in it; if you want to
>run random commands, just use ssh.
One of the use cases for guest agent exec is that
when network service is abnormal,
we could restart it in VMs rather than vnc/spice :)
So just make your monitoring app be able to run over virtio-serial or
virtio-vsock, to it can avoid relying on network. These are explicitly
designed to allow multiple services, so we don't need to shove everything
via the QEMU guest agent.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|