Re: [Qemu-devel] [PATCH v6 2/2] qemu-ga: sample fsfreeze hooks

2012-12-05 Thread Tomoki Sekiyama
On 2012/12/05 1:51, Luiz Capitulino wrote: > On Fri, 30 Nov 2012 22:33:57 +0900 > Tomoki Sekiyama wrote: > >> Adds sample hook scripts for --fsfreeze-hook option of qemu-ga. >> - fsfreeze-hook : execute scripts in fsfreeze-hook.d/ >> - fsfreeze-hook.d.sample/mys

Re: [Qemu-devel] [PATCH v6 2/2] qemu-ga: sample fsfreeze hooks

2012-12-05 Thread Tomoki Sekiyama
On 2012/12/05 20:49, Luiz Capitulino wrote: > On Wed, 05 Dec 2012 17:41:08 +0900 > Tomoki Sekiyama wrote: > >> On 2012/12/05 1:51, Luiz Capitulino wrote: >>> On Fri, 30 Nov 2012 22:33:57 +0900 >>> Tomoki Sekiyama wrote: >>> >>>> Adds sam

Re: [Qemu-devel] [PATCH v7 2/2] qemu-ga: sample fsfreeze hooks

2012-12-07 Thread Tomoki Sekiyama
Adds sample hook scripts for --fsfreeze-hook option of qemu-ga. - fsfreeze-hook : execute scripts in fsfreeze-hook.d/ - fsfreeze-hook.d/mysql-flush.sh.sample : quiesce MySQL before snapshot Signed-off-by: Tomoki Sekiyama --- .gitignore |1

Re: [Qemu-devel] [PATCH v7 1/2] qemu-ga: execute hook to quiesce the guest on fsfreeze-freeze/thaw

2012-12-07 Thread Tomoki Sekiyama
; argument after the filesystem is thawed. This patch depends on patchset to improve error reporting by Luiz Capitulino: http://lists.gnu.org/archive/html/qemu-devel/2012-11/msg03016.html Signed-off-by: Tomoki Sekiyama --- qemu-ga.c | 42 + qga/comma

[Qemu-devel] [PATCH v7 0/2] qemu-ga: add hook to quiesce the guest on fsfreeze-freeze/thaw

2012-12-07 Thread Tomoki Sekiyama
fsfreeze.d/flush-mysql.sh.sample. fsfreeze-hook now ignores fsfreeze.d/*.sample. This patchset depends on Luiz Capitulino's patchset to improve error handling, which is available at: https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg03016.html --- Tomoki Sekiyama (2): qe

Re: [Qemu-devel] [PATCH v7 2/2] qemu-ga: sample fsfreeze hooks

2012-12-09 Thread Tomoki Sekiyama
m under some other >> file name and only at 'make install' time insert them into a .d at the >> install destination. It would clean up this confusion about the >> .gitignore as well as the change to the 'find' command during 'make clean'. > > Well, now that I understand it both ways are fine with me (ie. what you > suggest and what's been implemented in this patch). Then I'd like to keep current implementation. Thanks, -- Tomoki Sekiyama Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory

Re: [Qemu-devel] [PATCH v7 2/2] qemu-ga: sample fsfreeze hooks

2012-12-09 Thread Tomoki Sekiyama
Hi Eric, Thanks for your review. On 2012/12/08 3:34, Eric Blake wrote: > On 12/07/2012 01:39 AM, Tomoki Sekiyama wrote: >> Adds sample hook scripts for --fsfreeze-hook option of qemu-ga. >> - fsfreeze-hook : execute scripts in fsfreeze-hook.d/ >> - fsfreeze-hook.d/

[Qemu-devel] [PATCH v8 0/2] qemu-ga: add hook to quiesce the guest on fsfreeze-freeze/thaw

2012-12-11 Thread Tomoki Sekiyama
able at: https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg03016.html --- Tomoki Sekiyama (2): qemu-ga: execute hook to quiesce the guest on fsfreeze-freeze/thaw qemu-ga: sample fsfreeze hooks .gitignore

Re: [Qemu-devel] [PATCH v8 2/2] qemu-ga: sample fsfreeze hooks

2012-12-11 Thread Tomoki Sekiyama
Adds sample hook scripts for --fsfreeze-hook option of qemu-ga. - fsfreeze-hook : execute scripts in fsfreeze-hook.d/ - fsfreeze-hook.d/mysql-flush.sh.sample : quiesce MySQL before snapshot Signed-off-by: Tomoki Sekiyama --- .gitignore |1

Re: [Qemu-devel] [PATCH v8 1/2] qemu-ga: execute hook to quiesce the guest on fsfreeze-freeze/thaw

2012-12-11 Thread Tomoki Sekiyama
; argument after the filesystem is thawed. This patch depends on patchset to improve error reporting by Luiz Capitulino: http://lists.gnu.org/archive/html/qemu-devel/2012-11/msg03016.html Signed-off-by: Tomoki Sekiyama Reviewed-by: Luiz Capitulino --- qemu-ga.c | 42 ++

[Qemu-devel] [RFC PATCH 00/10] qemu-ga: support fsfreeze on Windows using VSS

2013-02-13 Thread Tomoki Sekiyama
xe - Install qemu-ga.exe and qga/vss-win32-provider/qga-provider.{dll,tlb} into the same directory in guests - Run `qemu-ga.exe -s install' and `net start qemu-ga' in the guests --- Tomoki Sekiyama (10): configure: Support configuring c++ compiler Fix errors and wa

[Qemu-devel] [RFC PATCH 05/10] qemu-ga: Add Windows VSS requester to quisce applications and filesystems

2013-02-13 Thread Tomoki Sekiyama
This adds VSS requester functions for to qemu-ga. This provides facility to request VSS service in Windows guest to quisce applications and filesystems. This function is only supported in Windows 2003 or later. In older guests, this function does nothing. Signed-off-by: Tomoki Sekiyama --- qga

[Qemu-devel] [RFC PATCH 06/10] qemu-ga: call Windows VSS requester in fsfreeze command handler

2013-02-13 Thread Tomoki Sekiyama
the VSS requester. Signed-off-by: Tomoki Sekiyama --- qga/commands-win32.c | 74 ++ qga/main.c | 33 ++ 2 files changed, 100 insertions(+), 7 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c

[Qemu-devel] [RFC PATCH 04/10] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze

2013-02-13 Thread Tomoki Sekiyama
functions, such as query for snapshot volumes and recovery. Signed-off-by: Tomoki Sekiyama --- Makefile|1 configure |5 qga/vss-win32-provider.h| 26 ++ qga/vss-win32-provider/Makefile | 30 ++ qga

[Qemu-devel] [RFC PATCH 08/10] qemu-ga: Add VSS provider .tlb file in the repository

2013-02-13 Thread Tomoki Sekiyama
for Windows with VSS support. Signed-off-by: Tomoki Sekiyama --- Makefile|2 +- qga/vss-win32-provider/qga-provider.tlb | Bin 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 qga/vss-win32-provider/qga-provider.tlb diff --git a/Makefile b

[Qemu-devel] [RFC PATCH 07/10] qemu-ga: install Windows VSS provider on `qemu-ga -s install'

2013-02-13 Thread Tomoki Sekiyama
Register QGA VSS provider library into Windows when qemu-ga is installed as Windows service ('-s install' option). It is deregistered when the service is uninstalled ('-s uninstall' option). Signed-off-by: Tomoki Sekiyama --- qga/main.c |8 1 file changed, 8

[Qemu-devel] [RFC PATCH 02/10] Fix errors and warnings while compiling with c++ compilier

2013-02-13 Thread Tomoki Sekiyama
Rename 'class' member in class_info of PciDeviceInfo to 'dev_class', and add some casts to avoid errors from c++ compiler. Signed-off-by: Tomoki Sekiyama --- hmp.c|2 +- hw/pci/pci.c |2 +- qapi-schema.json |4 ++-- 3 files changed, 4 insert

[Qemu-devel] [RFC PATCH 01/10] configure: Support configuring c++ compiler

2013-02-13 Thread Tomoki Sekiyama
Add configuration for c++ compiler (${corss_prefix}g++ as default) in configure and Makefiles. Currently, usage of c++ language is only for access to Windows VSS using COM+ services in qemu-guest-agent for Windows. Signed-off-by: Tomoki Sekiyama --- configure |6 ++ rules.mak |7

[Qemu-devel] [RFC PATCH 03/10] qemu-ga: Add an configure option to specify path to Windows VSS SDK

2013-02-13 Thread Tomoki Sekiyama
To cross-compilie using mingw32 for Linux, you need to setup the SDK on Windows environments to extract headers. You can also use wine to run the setup of SDK on Linux etc. Signed-off-by: Tomoki Sekiyama --- .gitignore |1 + Makefile |1 + configu

[Qemu-devel] [RFC PATCH 10/10] QMP/qmp.py: set locale for exceptions to display non-ascii messages correctly

2013-02-13 Thread Tomoki Sekiyama
qemu-ga in Windows might return error message with multibyte characters when the guest OS language is set to other than English. To display such messages correctly, this decodes the message based on locale settings. Signed-off-by: Tomoki Sekiyama --- QMP/qmp.py |4 +++- 1 file changed, 3

[Qemu-devel] [RFC PATCH 09/10] QMP/qemu-ga-client: make timeout longer for guest-fsfreeze-freeze command

2013-02-13 Thread Tomoki Sekiyama
guest-fsfreeze-freeze command can take longer than 3 seconds when heavy disk I/O is running. To avoid unexpected timeout, this changes the timeout to 30 seconds. Signed-off-by: Tomoki Sekiyama --- QMP/qemu-ga-client |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/QMP

Re: [Qemu-devel] [RFC PATCH 04/10] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze

2013-02-14 Thread Tomoki Sekiyama
Hi Paolo, thanks for your review. On 2013/02/14 22:22, Paolo Bonzini wrote:> Il 14/02/2013 07:10, Tomoki Sekiyama ha scritto: >> diff --git a/qga/vss-win32-provider/Makefile b/qga/vss-win32-provider/Makefile >> new file mode 100644 >> index 000..1f213f2 >> --- /dev/

Re: [Qemu-devel] [RFC PATCH 03/10] qemu-ga: Add an configure option to specify path to Windows VSS SDK

2013-02-14 Thread Tomoki Sekiyama
t anywhere on the Wine filesystem I installed the > VSS SDK to. > Hmm, I haven't seen this yet. I am testing this on Fedora 18 x86_64 host, and it provides package "mingw32-headers.noarch" or "mingw64-headers.noarch" which contains the rpc.h (filepath is /usr/x86_

Re: [Qemu-devel] [RFC PATCH 03/10] qemu-ga: Add an configure option to specify path to Windows VSS SDK

2013-02-14 Thread Tomoki Sekiyama
Hi Paolo, On 2013/02/14 23:36, Paolo Bonzini wrote: > Il 14/02/2013 07:10, Tomoki Sekiyama ha scritto: >> To enable VSS support in qemu-ga for Windows, header files included in >> VSS SDK is required. >> The VSS support is enabled when the option like below: >> ./conf

Re: [Qemu-devel] [RFC PATCH 02/10] Fix errors and warnings while compiling with c++ compilier

2013-02-14 Thread Tomoki Sekiyama
On 2013/02/14 21:27, Luiz Capitulino wrote: > On Thu, 14 Feb 2013 15:10:36 +0900 > Tomoki Sekiyama wrote: > >> Rename 'class' member in class_info of PciDeviceInfo to 'dev_class', and >> add some casts to avoid errors from c++ compiler. > > [..

Re: [Qemu-devel] [RFC PATCH 03/10] qemu-ga: Add an configure option to specify path to Windows VSS SDK

2013-02-20 Thread Tomoki Sekiyama
On 2013/02/19 9:15, mdroth wrote: > On Fri, Feb 15, 2013 at 12:55:49PM +0900, Tomoki Sekiyama wrote: >> On 2013/02/15 9:47, mdroth wrote: >> [...] >>> >>> Hi Tomoki, >> >> Hi, >> >>> Did you happen to run into this issue compiling the tes

[Qemu-devel] [RFC PATCH v2 01/11] configure: Support configuring c++ compiler

2013-04-12 Thread Tomoki Sekiyama
Add configuration for c++ compiler (${corss_prefix}g++ as default) in configure and Makefiles. Currently, usage of c++ language is only for access to Windows VSS using COM+ services in qemu-guest-agent for Windows. Signed-off-by: Tomoki Sekiyama --- configure |6 ++ rules.mak |9

[Qemu-devel] [RFC PATCH v2 02/11] Fix errors and warnings while compiling with c++ compilier

2013-04-12 Thread Tomoki Sekiyama
Add C++ keywords to avoid errors in compiling with c++ compiler. This also renames class member of PciDeviceInfo to q_class. Signed-off-by: Tomoki Sekiyama --- hmp.c |2 +- hw/pci/pci.c|2 +- scripts/qapi.py |9 - 3 files changed, 10 insertions(+), 3 deletions

[Qemu-devel] [RFC PATCH v2 03/11] Add a script to extract VSS SDK headers on POSIX system

2013-04-12 Thread Tomoki Sekiyama
VSS SDK(*) setup.exe is only runnable on Windows. This adds a script to extract VSS SDK headers on POSIX-systems using msitools. * http://www.microsoft.com/en-us/download/details.aspx?id=23490 From: Paolo Bonzini Signed-off-by: Tomoki Sekiyama --- scripts/extract-vsssdk-headers | 25

[Qemu-devel] [RFC PATCH v2 09/11] qemu-ga: Add VSS provider .tlb file in the repository

2013-04-12 Thread Tomoki Sekiyama
To build type library (.tlb) for qga-provider.dll from COM IDL (.idl), MIDL in VisualC++ and stdole2.tlb in Windows SDK are required. This patch adds pre-compiled .tlb file in the repository in order to enable cross-compile qemu-ga.exe for Windows with VSS support. Signed-off-by: Tomoki Sekiyama

[Qemu-devel] [RFC PATCH v2 00/11] qemu-ga: fsfreeze on Windows using VSS

2013-04-12 Thread Tomoki Sekiyama
ests Any feedback are appliciated. --- Tomoki Sekiyama (11): configure: Support configuring c++ compiler Fix errors and warnings while compiling with c++ compilier Add a script to extract VSS SDK headers on POSIX system qemu-ga: Add an configure option to specify path to

[Qemu-devel] [RFC PATCH v2 04/11] qemu-ga: Add an configure option to specify path to Windows VSS SDK

2013-04-12 Thread Tomoki Sekiyama
To cross-compilie using mingw32 for Linux, you need to setup the SDK on Windows environments to extract headers. You can also extract the SDK headers using scripts/extract-vss-headers, written by Paolo Bonzini. Signed-off-by: Tomoki Sekiyama --- .gitignore |1 + Makefile |1 + configu

[Qemu-devel] [RFC PATCH v2 07/11] qemu-ga: call Windows VSS requester in fsfreeze command handler

2013-04-12 Thread Tomoki Sekiyama
the VSS requester. Signed-off-by: Tomoki Sekiyama --- qga/commands-win32.c | 74 ++ qga/main.c | 33 ++ 2 files changed, 100 insertions(+), 7 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c

[Qemu-devel] [RFC PATCH v2 06/11] qemu-ga: Add Windows VSS requester to quisce applications and filesystems

2013-04-12 Thread Tomoki Sekiyama
This adds VSS requester functions for to qemu-ga. This provides facility to request VSS service in Windows guest to quisce applications and filesystems. This function is only supported in Windows 2003 or later. In older guests, this function does nothing. Signed-off-by: Tomoki Sekiyama --- qga

[Qemu-devel] [RFC PATCH v2 08/11] qemu-ga: install Windows VSS provider on `qemu-ga -s install'

2013-04-12 Thread Tomoki Sekiyama
Register QGA VSS provider library into Windows when qemu-ga is installed as Windows service ('-s install' option). It is deregistered when the service is uninstalled ('-s uninstall' option). Signed-off-by: Tomoki Sekiyama --- qga/main.c |8 1 file changed, 8

[Qemu-devel] [RFC PATCH v2 05/11] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze

2013-04-12 Thread Tomoki Sekiyama
functions, such as query for snapshot volumes and recovery. Signed-off-by: Tomoki Sekiyama --- Makefile.objs |2 configure |5 qga/Makefile.objs |6 qga/vss-win32-provider.h| 26 ++ qga/vss

[Qemu-devel] [RFC PATCH v2 10/11] QMP/qemu-ga-client: make timeout longer for guest-fsfreeze-freeze command

2013-04-12 Thread Tomoki Sekiyama
guest-fsfreeze-freeze command can take longer than 3 seconds when heavy disk I/O is running. To avoid unexpected timeout, this changes the timeout to 30 seconds. Signed-off-by: Tomoki Sekiyama --- QMP/qemu-ga-client |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/QMP

[Qemu-devel] [RFC PATCH v2 11/11] QMP/qmp.py: set locale for exceptions to display non-ascii messages correctly

2013-04-12 Thread Tomoki Sekiyama
qemu-ga in Windows might return error message with multibyte characters when the guest OS language is set to other than English. To display such messages correctly, this decodes the message based on locale settings. Signed-off-by: Tomoki Sekiyama --- QMP/qmp.py |4 +++- 1 file changed, 3

Re: [Qemu-devel] [RFC PATCH v2 00/11] qemu-ga: fsfreeze on Windows using VSS

2013-04-23 Thread Tomoki Sekiyama
ror in Event Viewer? And this might be caused by unsupported VSS_VOLSNAP_ATTR_* flags in SetContext() called from qga_vss_fsfreeze_freeze() at qga/vss-win32-requester.cpp, but I couldn't find out flags not supported on Windows 7 from VSS references. Could you try whether removing some of th

Re: [Qemu-devel] [PATCH v4 0/2] qga: Add guest-fsfreeze-freeze-list command

2014-06-16 Thread Tomoki Sekiyama
Any comments for this patch? -- Tomoki Sekiyama On 6/5/14 10:57 , "Tomoki Sekiyama" wrote: >Hi, > >This is v4 patch for qemu-ga to add functions to freeze specific file >systems >mounted in a guest. > >PATCH 1 adds a guest-fsfreeze-freeze-list command, which

Re: [Qemu-devel] [PATCH v4 2/2] qga: Add guest-get-fsinfo command

2014-06-19 Thread Tomoki Sekiyama
Hi Eric, Thank you for the review. On 6/19/14 17:23 , "Eric Blake" wrote: >On 06/05/2014 08:57 AM, Tomoki Sekiyama wrote: >> Add command to get mounted filesystems information in the guest. >> The returned value contains a list of mountpoint paths and >> corres

Re: [Qemu-devel] [PATCH v4 2/2] qga: Add guest-get-fsinfo command

2014-06-20 Thread Tomoki Sekiyama
On 6/20/14 11:21 , "Eric Blake" wrote: >On 06/19/2014 06:34 PM, Tomoki Sekiyama wrote: > >>>> +} >>>> +if (S_ISBLK(st.st_mode)) { >>>> +*devmajor = major(st.st_rdev); >>>> +*devminor = minor(st.st_rdev);

[Qemu-devel] [PATCH v5 0/3] qga: Add guest-fsfreeze-freeze-list command

2014-06-23 Thread Tomoki Sekiyama
improve compatibility with older Linux - PATCH 3 (new in v5): disable unsupported commands by default (v4: http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg01357.html) --- Tomoki Sekiyama (3): qga: Add guest-fsfreeze-freeze-list command qga: Add guest-get-fsinfo command

[Qemu-devel] [PATCH v5 1/3] qga: Add guest-fsfreeze-freeze-list command

2014-06-23 Thread Tomoki Sekiyama
t wants to create partial disk snapshots. Signed-off-by: Tomoki Sekiyama Reviewed-by: Eric Blake --- qga/commands-posix.c | 32 +++- qga/commands-win32.c |9 + qga/qapi-schema.json | 17 + 3 files changed, 57 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH v5 2/3] qga: Add guest-get-fsinfo command

2014-06-23 Thread Tomoki Sekiyama
us-type":"virtio","bus":0,"unit":0,"target":0, "pci-controller":{"bus":0,"slot":6,"domain":0,"function":0}}], "type":"ext4"}]} In Linux guest, the disk information

Re: [Qemu-devel] [PATCH v8 07/10] qemu-ga: Add Windows VSS provider and requester as DLL

2013-07-29 Thread Tomoki Sekiyama
VSS_TIMEOUT_EVENT_MSEC); >> +if (wait_status != WAIT_TIMEOUT) { >> +break; >> + } >> +} >> +if (wait_status != WAIT_OBJECT_0) { >> +err_set(errset, E_FAIL, >> +"Couldn't receive Frozen event from VSS provider"); >> +goto out; >> +} > >One small issue I noticed was that this error will get overwritten >with the VSS writer timeout error if we wait longer than 60s before >calling guest-fsfreeze-thaw. It might give some users false assurances >about what aspects of their snapshot may be volatile so it's >probably worth addressing. This is an error returned against guest-fsfreeze-freeze, when the writers or filesystems take more than 60s to quiesce. (CQGAVssProvider::CommitSnapshots that issues FrozenEvent is called after this quiescing succeeded.) The VSS sequence is aborted at "out:". If this happens, as the system remains thawed state, the following guest-fsfreeze-thaw will just return 0. >> diff --git a/qga/vss-win32/requester.h b/qga/vss-win32/requester.h >> new file mode 100644 >> index 000..ccd197c >> --- /dev/null >> +++ b/qga/vss-win32/requester.h >> +typedef void (*QGAVSSReuqesterFunc)(int *, ErrorSet *); > >Should be QGAVSSRequesterFunc Oops, thank you for catching this. Will fix these typo in the next version. Thanks, -- Tomoki Sekiyama

Re: [Qemu-devel] [PATCH v8 07/10] qemu-ga: Add Windows VSS provider and requester as DLL

2013-07-30 Thread Tomoki Sekiyama
this wouldn't break anything. The waiting code in CQGAVssProvider::CommitSnapshots would be like this: ... /* Wait until the snapshot is taken by the host. */ wait = WaitForSingleObject(hEventThaw, VSS_TIMEOUT_MSEC); switch (wait) { case WAIT_TIMEOUT: /* * We return S_OK, but the qemu-ga will get E_VSS_HOLD_WRITES_TIMEOUT * because 10 seconds fsfreeze timeout is exceeded. (If we return some * error here, it results in VSS_E_UNEXPECTED_PROVIDER_ERROR that can * be caused by the other reasons.) */ case WAIT_OBJECT_0: hr = S_OK; break; default: hr = E_ABORT; } ... Thanks, Tomoki Sekiyama

Re: [Qemu-devel] [PATCH v8 07/10] qemu-ga: Add Windows VSS provider and requester as DLL

2013-07-30 Thread Tomoki Sekiyama
On 7/30/13 18:24 , "Michael Roth" wrote: >Quoting Tomoki Sekiyama (2013-07-30 15:54:05) >>On 7/30/13 15:35 , "Michael Roth" wrote: >>>>>One small issue I noticed was that this error will get overwritten >>>>>with the VSS writer timeout

[Qemu-devel] [PATCH v9 06/10] error: Add error_set_win32 and error_setg_win32

2013-07-31 Thread Tomoki Sekiyama
These functions help maintaining homogeneous formatting of error messages with Windows error code and description (generated by g_win32_error_message()). Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- include/qapi/error.h | 13 + util/error.c | 35

[Qemu-devel] [PATCH v9 01/10] configure: Support configuring C++ compiler

2013-07-31 Thread Tomoki Sekiyama
+ services in qemu-guest-agent for Windows. Signed-off-by: Tomoki Sekiyama Reviewed-by: Laszlo Ersek Reviewed-by: Micael Roth --- configure | 13 + rules.mak |9 - 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/configure b/configure index f0761ea..94cff69

[Qemu-devel] [PATCH v9 10/10] QMP/qemu-ga-client: Make timeout longer for guest-fsfreeze-freeze command

2013-07-31 Thread Tomoki Sekiyama
guest-fsfreeze-freeze command can take longer than 3 seconds when heavy disk I/O is running. To avoid unexpected timeout, this changes the timeout to 60 seconds (timeout of pre-commit phase of VSS). Signed-off-by: Tomoki Sekiyama Reviewed-by: Paolo Bonzini Reviewed-by: Laszlo Ersek Reviewed-by

[Qemu-devel] [PATCH v9 05/10] qemu-ga: Add configure options to specify path to Windows/VSS SDK

2013-07-31 Thread Tomoki Sekiyama
qemu-ga VSS provider. However, this is usually unnecessary because pre-compiled .tlb file is included. Signed-off-by: Tomoki Sekiyama Reviewed-by: Laszlo Ersek Reviewed-by: Michael Roth --- .gitignore |1 + Makefile |1 + configure | 78 +

[Qemu-devel] [PATCH v9 00/10] qemu-ga: fsfreeze on Windows using VSS

2013-07-31 Thread Tomoki Sekiyama
DK directory to configure option as: ./configure -with-vss-sdk="path/to/VSS SDK" --cross-prefix=i686-w64-mingw32- - make qemu-ga.exe qga/vss-win32/qga-vss.{dll,tlb} - Install qemu-ga.exe, qga/vss-win32/qga-vss.{dll,tlb}, and the other required mingw libraries into the same direct

[Qemu-devel] [PATCH v9 02/10] Add c++ keywords to QAPI helper script

2013-07-31 Thread Tomoki Sekiyama
Add c++ keywords to avoid errors in compiling with c++ compiler. This also renames class member of PciDeviceInfo to q_class. Signed-off-by: Tomoki Sekiyama Reviewed-by: Laszlo Ersek Reviewed-by: Michael Roth --- hmp.c |2 +- hw/pci/pci.c|2 +- scripts/qapi.py | 12

[Qemu-devel] [PATCH v9 04/10] Add a script to extract VSS SDK headers on POSIX system

2013-07-31 Thread Tomoki Sekiyama
VSS SDK(*) setup.exe is only runnable on Windows. This adds a script to extract VSS SDK headers on POSIX-systems using msitools. * http://www.microsoft.com/en-us/download/details.aspx?id=23490 From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Tomoki Sekiyama Reviewed-by

[Qemu-devel] [PATCH v9 08/10] qemu-ga: Call Windows VSS requester in fsfreeze command handler

2013-07-31 Thread Tomoki Sekiyama
the VSS requester. Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- qga/Makefile.objs|1 qga/commands-win32.c | 82 ++--- qga/vss-win32.c | 141 ++ qga/vss-win32.h | 24 + 4 files

[Qemu-devel] [PATCH v9 03/10] checkpatch.pl: Check .cpp files

2013-07-31 Thread Tomoki Sekiyama
method()) - : used in class declaration (e.g. class T : public Super) - ~ used in destructor method name (e.g. T::~T()) - spacing around 'catch'(e.g. catch (...)) Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- scripts/checkpatch.pl | 34 +

[Qemu-devel] [PATCH v9 09/10] qemu-ga: Install Windows VSS provider on `qemu-ga -s install'

2013-07-31 Thread Tomoki Sekiyama
Register QGA VSS provider library into Windows when qemu-ga is installed as Windows service ('-s install' option). It is deregistered when the service is uninstalled ('-s uninstall' option). Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- qga/main.c | 10

[Qemu-devel] [PATCH v10 01/10] configure: Support configuring C++ compiler

2013-08-07 Thread Tomoki Sekiyama
+ services in qemu-guest-agent for Windows. Signed-off-by: Tomoki Sekiyama Reviewed-by: Laszlo Ersek Reviewed-by: Micael Roth --- configure | 13 + rules.mak |9 - 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 18fa608..eabd8e5

[Qemu-devel] [PATCH v10 03/10] checkpatch.pl: Check .cpp files

2013-08-07 Thread Tomoki Sekiyama
method()) - : used in class declaration (e.g. class T : public Super) - ~ used in destructor method name (e.g. T::~T()) - spacing around 'catch'(e.g. catch (...)) Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- scripts/checkpatch.pl | 34 +

[Qemu-devel] [PATCH v10 08/10] qemu-ga: Call Windows VSS requester in fsfreeze command handler

2013-08-07 Thread Tomoki Sekiyama
the VSS requester. Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- qga/Makefile.objs|1 qga/commands-win32.c | 82 ++--- qga/vss-win32.c | 141 ++ qga/vss-win32.h | 24 + 4 files

[Qemu-devel] [PATCH v10 05/10] qemu-ga: Add configure options to specify path to Windows/VSS SDK

2013-08-07 Thread Tomoki Sekiyama
qemu-ga VSS provider. However, this is usually unnecessary because pre-compiled .tlb file is included. Signed-off-by: Tomoki Sekiyama Reviewed-by: Laszlo Ersek Reviewed-by: Michael Roth --- .gitignore |1 + Makefile |1 + configure | 78 +

[Qemu-devel] [PATCH v10 02/10] Add c++ keywords to QAPI helper script

2013-08-07 Thread Tomoki Sekiyama
Add c++ keywords to avoid errors in compiling with c++ compiler. This also renames class member of PciDeviceInfo to q_class. Signed-off-by: Tomoki Sekiyama Reviewed-by: Laszlo Ersek Reviewed-by: Michael Roth --- hmp.c |2 +- hw/pci/pci.c|2 +- scripts/qapi.py | 12

[Qemu-devel] [PATCH v10 00/10] qemu-ga: fsfreeze on Windows using VSS

2013-08-07 Thread Tomoki Sekiyama
--without-systems --without-tools - make qemu-ga.exe qga/vss-win32/qga-vss.{dll,tlb} - Install qemu-ga.exe, qga/vss-win32/qga-vss.{dll,tlb}, and the other required mingw libraries into the same directory in guests - Run `qemu-ga.exe -s install' and `net start qemu-ga

[Qemu-devel] [PATCH v10 06/10] error: Add error_set_win32 and error_setg_win32

2013-08-07 Thread Tomoki Sekiyama
These functions help maintaining homogeneous formatting of error messages with Windows error code and description (generated by g_win32_error_message()). Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- include/qapi/error.h | 13 + util/error.c | 35

[Qemu-devel] [PATCH v10 04/10] Add a script to extract VSS SDK headers on POSIX system

2013-08-07 Thread Tomoki Sekiyama
VSS SDK(*) setup.exe is only runnable on Windows. This adds a script to extract VSS SDK headers on POSIX-systems using msitools. * http://www.microsoft.com/en-us/download/details.aspx?id=23490 From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Tomoki Sekiyama Reviewed-by

[Qemu-devel] [PATCH v10 10/10] QMP/qemu-ga-client: Make timeout longer for guest-fsfreeze-freeze command

2013-08-07 Thread Tomoki Sekiyama
guest-fsfreeze-freeze command can take longer than 3 seconds when heavy disk I/O is running. To avoid unexpected timeout, this changes the timeout to 60 seconds (timeout of pre-commit phase of VSS). Signed-off-by: Tomoki Sekiyama Reviewed-by: Paolo Bonzini Reviewed-by: Laszlo Ersek Reviewed-by

[Qemu-devel] [PATCH v10 09/10] qemu-ga: Install Windows VSS provider on `qemu-ga -s install'

2013-08-07 Thread Tomoki Sekiyama
Register QGA VSS provider library into Windows when qemu-ga is installed as Windows service ('-s install' option). It is deregistered when the service is uninstalled ('-s uninstall' option). Signed-off-by: Tomoki Sekiyama Reviewed-by: Michael Roth --- qga/main.c | 10

Re: [Qemu-devel] [PATCH v2] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-05-20 Thread Tomoki Sekiyama
Any comments for this patch? Thanks, Tomoki Sekiyama On 4/28/14 11:25 , "Tomoki Sekiyama" wrote: >Hi, > >This is v2 patch for qemu-ga to add argument to specify which filesystems >to be frozen by guest-fsfreeze-freeze command. > >Changes to v1: > added docum

Re: [Qemu-devel] [PATCH v2] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-05-20 Thread Tomoki Sekiyama
> On 04/28/2014 09:25 AM, Tomoki Sekiyama wrote: >> When an array of mount point paths is specified as 'mountpoints' argument >> of guest-fsfreeze-freeze, qemu-ga with this patch will only freeze the file >> systems mounted on specified paths in Linux. > > How

Re: [Qemu-devel] [PATCH v2] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-05-20 Thread Tomoki Sekiyama
> On 04/28/2014 09:25 AM, Tomoki Sekiyama wrote: >> When an array of mount point paths is specified as 'mountpoints' argument >> of guest-fsfreeze-freeze, qemu-ga with this patch will only freeze the file >> systems mounted on specified paths in Linux. > > How

Re: [Qemu-devel] [PATCH v2] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-05-21 Thread Tomoki Sekiyama
Hi Eric, thank you for the comments. On 5/20/14 18:46 , "Eric Blake" wrote: >On 05/20/2014 04:01 PM, Tomoki Sekiyama wrote: >> The patch below is for the command to get filesystems list. >> >> === >> From: Tomoki Sekiyama > >You'll want to

[Qemu-devel] [PATCH v3 2/2] qga: Add guest-get-fs-info command

2014-05-22 Thread Tomoki Sekiyama
us-type":"virtio","bus":0,"unit":0,"target":0, "pci-controller":{"bus":0,"slot":6,"domain":0,"function":0}}], "type":"ext4"}]} In Linux guest, the disk information

[Qemu-devel] [PATCH v3 1/2] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-05-22 Thread Tomoki Sekiyama
When an array of mount point paths is specified as 'mountpoints' argument of guest-fsfreeze-freeze, qemu-ga with this patch will only freeze the file systems mounted on specified paths in Linux. This would be useful when the host wants to create partial disk snapshots. Signed-off-

[Qemu-devel] [PATCH v3 0/2] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-05-22 Thread Tomoki Sekiyama
ts.gnu.org/archive/html/qemu-devel/2014-04/msg04433.html) --- Tomoki Sekiyama (2): qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command qga: Add guest-get-fs-info command qga/commands-posix.c | 437 ++ qga/commands-

[Qemu-devel] [PATCH 0/2] qga: vss-win32: Fix build failure

2014-03-26 Thread Tomoki Sekiyama
Hello, These patches are to fix recent build failures of qemu-guest-agent for Windows when fsfreeze using VSS is enabled by: ./configure --cross-prefix=i686-w64-mingw32- --with-vss-sdk=yes --- Tomoki Sekiyama (2): Makefile: add qga-vss-dll-obj-y to nested variables vss-win32: Fix

[Qemu-devel] [PATCH 1/2] Makefile: add qga-vss-dll-obj-y to nested variables

2014-03-26 Thread Tomoki Sekiyama
The build rule for qga/vss-win32/qga-vss.dll is broken by commit ba1183da9a10b94611cad88c44a5c6df005f9b55, because it misses qga-vss-dll-obj-y in the list of nested variables. This fixes build of qga-vss.dll by adding qga-vss-dll-obj-y to the list. Signed-off-by: Tomoki Sekiyama --- Makefile

[Qemu-devel] [PATCH 2/2] vss-win32: Fix build with mingw64-headers-3.1.0

2014-03-26 Thread Tomoki Sekiyama
In mingw64-headers-3.1.0, definition of _com_issue_error() is added, which conflicts with definition in install.cpp. This adds version checking for mingw headers to disable the definition when the headers>=3.1 is used. Signed-off-by: Tomoki Sekiyama --- qga/vss-win32/install.cpp |3 +++

[Qemu-devel] [PATCH 0/3] qga: vss-win32: Fix interference with other VSS requesters

2014-01-13 Thread Tomoki Sekiyama
Event WinAPI, which returns NULL instead of INVALID_HANDLE_VALUE on errors. https://bugzilla.redhat.com/show_bug.cgi?id=1036341 --- Tomoki Sekiyama (3): qga: vss-win32: Use NULL as an invalid pointer for OpenEvent and CreateEvent qga: vss-win32: Fix interference with snapshot creati

[Qemu-devel] [PATCH 2/3] qga: vss-win32: Fix interference with snapshot creation by other VSS requesters

2014-01-13 Thread Tomoki Sekiyama
when CQGAVssProvider::IsVolumeSupported() is called, it moves the initialization earlier. Signed-off-by: Tomoki Sekiyama --- qga/vss-win32/provider.cpp | 11 - qga/vss-win32/requester.cpp | 52 ++- 2 files changed, 36 insertions(+), 27 dele

[Qemu-devel] [PATCH 1/3] qga: vss-win32: Use NULL as an invalid pointer for OpenEvent and CreateEvent

2014-01-13 Thread Tomoki Sekiyama
OpenEvent and CreateEvent WinAPI return NULL when failed to open/create events handles, instead of INVALID_HANDLE_VALUE (although their return types are HANDLE). This replaces INVALID_HANDLE_VALUE related to event handles with NULL. Signed-off-by: Tomoki Sekiyama --- qga/vss-win32/provider.cpp

[Qemu-devel] [PATCH 3/3] qga: vss-win32: Fix interference with snapshot deletion by other VSS request

2014-01-13 Thread Tomoki Sekiyama
mu-ga VSS provider. Signed-off-by: Tomoki Sekiyama --- qga/vss-win32/provider.cpp |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qga/vss-win32/provider.cpp b/qga/vss-win32/provider.cpp index b233646..d5129f8 100644 --- a/qga/vss-win32/provider.cpp +++ b/qga/vss-

Re: [Qemu-devel] [RFC PATCH v2 00/11] qemu-ga: fsfreeze on Windows using VSS

2013-04-29 Thread Tomoki Sekiyama
Hi, On 4/23/13 12:44 , "Tomoki Sekiyama" wrote: >>2 executing the command "{"execute":"guest-fsfreeze-freeze"}" >>failed,the output is: > >> {"execute":"guest-fsfreeze-freeze"} >> {"error": {&qu

[Qemu-devel] [RFC PATCH v3 02/11] Fix errors and warnings while compiling with c++ compilier

2013-05-21 Thread Tomoki Sekiyama
Add C++ keywords to avoid errors in compiling with c++ compiler. This also renames class member of PciDeviceInfo to q_class. Signed-off-by: Tomoki Sekiyama --- hmp.c |2 +- hw/pci/pci.c|2 +- scripts/qapi.py |9 - 3 files changed, 10 insertions(+), 3 deletions

[Qemu-devel] [RFC PATCH v3 01/11] configure: Support configuring c++ compiler

2013-05-21 Thread Tomoki Sekiyama
Add configuration for c++ compiler (${corss_prefix}g++ as default) in configure and Makefiles. Currently, usage of c++ language is only for access to Windows VSS using COM+ services in qemu-guest-agent for Windows. Signed-off-by: Tomoki Sekiyama --- configure |6 ++ rules.mak |9

[Qemu-devel] [RFC PATCH v3 08/11] qemu-ga: install Windows VSS provider on `qemu-ga -s install'

2013-05-21 Thread Tomoki Sekiyama
Register QGA VSS provider library into Windows when qemu-ga is installed as Windows service ('-s install' option). It is deregistered when the service is uninstalled ('-s uninstall' option). Signed-off-by: Tomoki Sekiyama --- qga/main.c |8 1 file changed, 8

[Qemu-devel] [RFC PATCH v3 10/11] QMP/qemu-ga-client: make timeout longer for guest-fsfreeze-freeze command

2013-05-21 Thread Tomoki Sekiyama
guest-fsfreeze-freeze command can take longer than 3 seconds when heavy disk I/O is running. To avoid unexpected timeout, this changes the timeout to 30 seconds. Signed-off-by: Tomoki Sekiyama --- QMP/qemu-ga-client |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/QMP

[Qemu-devel] [RFC PATCH v3 03/11] Add a script to extract VSS SDK headers on POSIX system

2013-05-21 Thread Tomoki Sekiyama
VSS SDK(*) setup.exe is only runnable on Windows. This adds a script to extract VSS SDK headers on POSIX-systems using msitools. * http://www.microsoft.com/en-us/download/details.aspx?id=23490 From: Paolo Bonzini Signed-off-by: Tomoki Sekiyama --- scripts/extract-vsssdk-headers | 25

[Qemu-devel] [RFC PATCH v3 07/11] qemu-ga: call Windows VSS requester in fsfreeze command handler

2013-05-21 Thread Tomoki Sekiyama
the VSS requester. Signed-off-by: Tomoki Sekiyama --- qga/commands-win32.c | 74 ++ qga/main.c | 33 ++ 2 files changed, 100 insertions(+), 7 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c

[Qemu-devel] [RFC PATCH v3 06/11] qemu-ga: Add Windows VSS requester to quisce applications and filesystems

2013-05-21 Thread Tomoki Sekiyama
eanup phase after snapshot is taken). Signed-off-by: Tomoki Sekiyama --- qga/Makefile.objs |3 qga/vss-win32-requester.cpp | 404 +++ qga/vss-win32-requester.h | 31 +++ 3 files changed, 437 insertions(+), 1 deletion(-) create mode 10064

[Qemu-devel] [RFC PATCH v3 04/11] qemu-ga: Add an configure option to specify path to Windows VSS SDK

2013-05-21 Thread Tomoki Sekiyama
To cross-compilie using mingw32 for Linux, you need to setup the SDK on Windows environments to extract headers. You can also extract the SDK headers using scripts/extract-vss-headers, written by Paolo Bonzini. Signed-off-by: Tomoki Sekiyama --- .gitignore |1 + Makefile |1 + configu

[Qemu-devel] [RFC PATCH v3 11/11] QMP/qmp.py: set locale for exceptions to display non-ascii messages correctly

2013-05-21 Thread Tomoki Sekiyama
qemu-ga in Windows may return error message with multibyte characters when the guest OS language is set to other than English. To display such messages correctly, this encodes the message based on the locale settings. Signed-off-by: Tomoki Sekiyama --- QMP/qmp.py |4 +++- 1 file changed, 3

[Qemu-devel] [RFC PATCH v3 05/11] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze

2013-05-21 Thread Tomoki Sekiyama
functions, such as query for snapshot volumes and recovery. Signed-off-by: Tomoki Sekiyama --- Makefile.objs |2 configure |5 qga/Makefile.objs |6 qga/vss-win32-provider.h| 26 ++ qga/vss

[Qemu-devel] [RFC PATCH v3 09/11] qemu-ga: Add VSS provider .tlb file in the repository

2013-05-21 Thread Tomoki Sekiyama
To build type library (.tlb) for qga-provider.dll from COM IDL (.idl), MIDL in VisualC++ and stdole2.tlb in Windows SDK are required. This patch adds pre-compiled .tlb file in the repository in order to enable cross-compile qemu-ga.exe for Windows with VSS support. Signed-off-by: Tomoki Sekiyama

[Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS

2013-05-21 Thread Tomoki Sekiyama
ry snapshots and to mount them as writable snapshots, but we just ignore the error in this patchset. Any feedback are appliciated. --- Tomoki Sekiyama (11): configure: Support configuring c++ compiler Fix errors and warnings while compiling with c++ compilier Add a scrip

Re: [Qemu-devel] [RFC PATCH v3 01/11] configure: Support configuring c++ compiler

2013-05-21 Thread Tomoki Sekiyama
Hi Peter, On 5/21/13 12:56 , "Peter Maydell" wrote: >On 21 May 2013 16:33, Tomoki Sekiyama wrote: >> Add configuration for c++ compiler (${corss_prefix}g++ as default) in >> configure and Makefiles. > >I think you should follow the same logic we use for picking

Re: [Qemu-devel] [RFC PATCH v3 03/11] Add a script to extract VSS SDK headers on POSIX system

2013-05-21 Thread Tomoki Sekiyama
On 5/21/13 12:48 , "Eric Blake" wrote: >On 05/21/2013 09:33 AM, Tomoki Sekiyama wrote: >> VSS SDK(*) setup.exe is only runnable on Windows. This adds a script >> to extract VSS SDK headers on POSIX-systems using msitools. >> >> * http://www.microsoft.com

Re: [Qemu-devel] [RFC PATCH v3 01/11] configure: Support configuring c++ compiler

2013-05-21 Thread Tomoki Sekiyama
Hi Eric, Thank you for the review. On 5/21/13 12:42 , "Eric Blake" wrote: >On 05/21/2013 09:33 AM, Tomoki Sekiyama wrote: >> Add configuration for c++ compiler (${corss_prefix}g++ as default) in > >s/corss/cross/ Oops, I'll fix this in next version... (with

Re: [Qemu-devel] [RFC PATCH v3 04/11] qemu-ga: Add an configure option to specify path to Windows VSS SDK

2013-05-21 Thread Tomoki Sekiyama
On 5/21/13 12:53 , "Eric Blake" wrote: >On 05/21/2013 09:33 AM, Tomoki Sekiyama wrote: >> To enable VSS support in qemu-ga for Windows, header files included in >> VSS SDK is required. >> The VSS support is enabled when the option like below: >> ./confi

Re: [Qemu-devel] [RFC PATCH v3 06/11] qemu-ga: Add Windows VSS requester to quisce applications and filesystems

2013-05-21 Thread Tomoki Sekiyama
On 5/21/13 12:56 , "Eric Blake" wrote: >On 05/21/2013 09:33 AM, Tomoki Sekiyama wrote: >> Add VSS requester functions for to qemu-ga. >> This provides facility to request VSS service in Windows guest to quisce > >s/quisce/quiesce/ Oops, thanks again. >&g

  1   2   3   >