Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Michal Privoznik
On 11.02.2014 22:45, Eric Blake wrote: On 02/11/2014 02:37 PM, Marcelo Tosatti wrote: I think we may need both approaches. I too think that resume with syncing guest time is so common use case that is deserves to be exposed as a single operation outside the libvirt. On the other hand, we

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 02:05:11PM -0700, Eric Blake wrote: On 02/12/2014 01:45 PM, Marcelo Tosatti wrote: On Wed, Feb 12, 2014 at 10:22:11AM +, Daniel P. Berrange wrote: I agree that this should be a completely separate command, not merely a flag to the Resume API. The reason is that

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Eric Blake
On 02/13/2014 02:09 AM, Michal Privoznik wrote: Maybe even both additions would be appropriate (a knob for automatic libvirt syncing as well as a new API for explicit syncing outside the events where libvirt would normally do it automatically). I don't think we should add the on_resume/

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Michal Privoznik
On 13.02.2014 14:32, Eric Blake wrote: On 02/13/2014 02:09 AM, Michal Privoznik wrote: Maybe even both additions would be appropriate (a knob for automatic libvirt syncing as well as a new API for explicit syncing outside the events where libvirt would normally do it automatically). I don't

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 03:02:38PM +0100, Michal Privoznik wrote: On 13.02.2014 14:32, Eric Blake wrote: On 02/13/2014 02:09 AM, Michal Privoznik wrote: Maybe even both additions would be appropriate (a knob for automatic libvirt syncing as well as a new API for explicit syncing outside the

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-12 Thread Daniel P. Berrange
On Tue, Feb 11, 2014 at 11:48:58AM +0100, Michal Privoznik wrote: On 11.02.2014 01:04, Marcelo Tosatti wrote: On Mon, Feb 10, 2014 at 03:42:45PM -0700, Eric Blake wrote: On 02/10/2014 03:10 PM, Marcelo Tosatti wrote: Since QEMU commit kvmclock: clock should count only if vm is running

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-12 Thread Marcelo Tosatti
On Wed, Feb 12, 2014 at 10:22:11AM +, Daniel P. Berrange wrote: I agree that this should be a completely separate command, not merely a flag to the Resume API. The reason is that you cannot do sensible error reporting if you overload this in one API call. ie consider that resuming the

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-12 Thread Marcelo Tosatti
On Wed, Feb 12, 2014 at 06:45:28PM -0200, Marcelo Tosatti wrote: On Wed, Feb 12, 2014 at 10:22:11AM +, Daniel P. Berrange wrote: I agree that this should be a completely separate command, not merely a flag to the Resume API. The reason is that you cannot do sensible error reporting if

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-12 Thread Eric Blake
On 02/12/2014 01:45 PM, Marcelo Tosatti wrote: On Wed, Feb 12, 2014 at 10:22:11AM +, Daniel P. Berrange wrote: I agree that this should be a completely separate command, not merely a flag to the Resume API. The reason is that you cannot do sensible error reporting if you overload this in

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-12 Thread Eric Blake
On 02/12/2014 02:05 PM, Eric Blake wrote: I'll go write a virsh alias and virt-manager patch. A single virsh command that makes multiple API calls under the hood is just fine - on partial failure, it can make it quite clear which of the steps failed. I have no problem with creating a 'virsh

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-11 Thread Michal Privoznik
On 11.02.2014 01:04, Marcelo Tosatti wrote: On Mon, Feb 10, 2014 at 03:42:45PM -0700, Eric Blake wrote: On 02/10/2014 03:10 PM, Marcelo Tosatti wrote: Since QEMU commit kvmclock: clock should count only if vm is running (http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg01225.html),

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-11 Thread Marcelo Tosatti
On Tue, Feb 11, 2014 at 11:48:58AM +0100, Michal Privoznik wrote: On 11.02.2014 01:04, Marcelo Tosatti wrote: On Mon, Feb 10, 2014 at 03:42:45PM -0700, Eric Blake wrote: On 02/10/2014 03:10 PM, Marcelo Tosatti wrote: Since QEMU commit kvmclock: clock should count only if vm is running

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-11 Thread Eric Blake
On 02/11/2014 02:37 PM, Marcelo Tosatti wrote: I think we may need both approaches. I too think that resume with syncing guest time is so common use case that is deserves to be exposed as a single operation outside the libvirt. On the other hand, we certainly want to expose this as a new

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-11 Thread Marcelo Tosatti
On Tue, Feb 11, 2014 at 02:45:28PM -0700, Eric Blake wrote: On 02/11/2014 02:37 PM, Marcelo Tosatti wrote: I think we may need both approaches. I too think that resume with syncing guest time is so common use case that is deserves to be exposed as a single operation outside the libvirt.

[libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-10 Thread Marcelo Tosatti
Since QEMU commit kvmclock: clock should count only if vm is running (http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg01225.html), guests have their realtime clock stopped during pause. To correct the situation, invoke guest agent to sync time from host time. Signed-off-by: Marcelo

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-10 Thread Eric Blake
On 02/10/2014 03:10 PM, Marcelo Tosatti wrote: Since QEMU commit kvmclock: clock should count only if vm is running (http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg01225.html), guests have their realtime clock stopped during pause. To correct the situation, invoke guest agent to

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-10 Thread Marcelo Tosatti
On Mon, Feb 10, 2014 at 03:42:45PM -0700, Eric Blake wrote: On 02/10/2014 03:10 PM, Marcelo Tosatti wrote: Since QEMU commit kvmclock: clock should count only if vm is running (http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg01225.html), guests have their realtime clock stopped