Received: from eggs.gnu.org ([208.118.235.92]:35162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUgMG-0006pv-3S for qemu-devel@nongnu.org; Tue, 23 Apr 2013 12:46:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUgM9-0008UV-8M for qemu-devel@nongnu.org; Tue, 23 Apr 2013 12:46:20 -0400 Received: from usindpps04.hds.com ([207.126.252.17]:56816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUgM8-0008HG-SX for qemu-devel@nongnu.org; Tue, 23 Apr 2013 12:46:13 -0400 From: Tomoki Sekiyama Date: Tue, 23 Apr 2013 16:44:07 +0000 Message-ID: In-Reply-To: <5D9ACBBCF6B270468D615C4719A59BE33A46A3D0@szxeml548-mbx.china.huawei.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <6434B71080B1AD4DBA812D6A1A294394@hds.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH v2 00/11] qemu-ga: fsfreeze on Windows using VSS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Libaiqing , "qemu-devel@nongnu.org" Cc: "mdroth@linux.vnet.ibm.com" , "pbonzini@redhat.com" , "vrozenfe@redhat.com" , Haofeng , "lcapitulino@redhat.com" Hi Baiqing, Thank you for your testing. > 1 Extcuting the command "net start qemu-ga" failed,but the command >"qemu-qa.exe -m virtio-serial -p \\.\Global\org.qemu.guest_agent.1" is ok. `qemu-ga.exe -s install -p \\.\Global\org.qemu.guest_agent.1' may help to use virtio-serial ".1" in qemu-ga service. Otherwise ".0" is used by default. > 2 executing the command "{"execute":"guest-fsfreeze-freeze"}" >failed,the output is: > {"execute":"guest-fsfreeze-freeze"} > {"error": {"class": "GenericError", "desc": "Failed to >pVssbc->SetContext. (Error: 8004231b) "}} >=20 > Could you give me some advise to debug this problem ? I can provide more >information if need. Is there any logs corresponding to the error 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 these flags is effective to avoid the error in your environment? Thanks, Tomoki Sekiyama On 4/23/13 7:08 , "Libaiqing" wrote: >Hi, > I tried the patch v2,with the following config. > =20 > Guest os : win7 32bit professional > Host os : fedora 17 > Command:=20 > qemu-kvm -enable-kvm -name win7 -M pc-0.15 -m 1024 -smp 2 -boot c >-device virtio-serial -drive >file=3D/home/libaiqing/vss/win7.img,if=3Dvirtio,index=3D0,format=3Dqcow2 - >-monitor stdio -vga qxl -vnc :1 -chardev > =20 >socket,id=3Dcharchannel0,path=3D/var/lib/libvirt/qemu/wahaha1_requester,se= rver >,nowait -device=20 >virtserialport,chardev=3Dcharchannel0,id=3Dchannel0,name=3Dorg.qemu.guest_= agent. >1 =20 > > > Issue: > 1 Extcuting the command "net start qemu-ga" failed,but the command >"qemu-qa.exe -m virtio-serial -p \\.\Global\org.qemu.guest_agent.1" is ok. > 2 executing the command "{"execute":"guest-fsfreeze-freeze"}" >failed,the output is: > > [root@fedora121 ~]# socat stdio,ignoreeof >unix-connect:/var/lib/libvirt/qemu/wahaha1_requester >{'execute':'guest-info'} >{"return": {"version": "1.4.50", "supported_commands": [{"enabled": true, >"name": "guest-set-vcpus"}, {"enabled": true, "name": "guest-get-vcpus"}, >{"enabled": true, "name": "guest-network-get-interfaces"}, {"enabled": >true, "name": "guest-suspend-hybrid"}, {"enabled": true, "name": >"guest-suspend-ram"}, {"enabled": true, "name": "guest-suspend-disk"}, >{"enabled": true, "name": "guest-fstrim"}, {"enabled": true, "name": >"guest-fsfreeze-thaw"}, {"enabled": true, "name": >"guest-fsfreeze-freeze"}, {"enabled": true, "name": >"guest-fsfreeze-status"}, {"enabled": true, "name": "guest-file-flush"}, >{"enabled": true, "name": "guest-file-seek"}, {"enabled": true, "name": >"guest-file-write"}, {"enabled": true, "name": "guest-file-read"}, >{"enabled": true, "name": "guest-file-close"}, {"enabled": true, "name": >"guest-file-open"}, {"enabled": true, "name": "guest-shutdown"}, >{"enabled": true, "name": "guest-info"}, {"enabled": true, "name": >"guest-set-time"}, {"enabled": true, "name": "guest-get-time"}, >{"enabled": true, "name": "guest-ping"}, {"enabled": true, "name": >"guest-sync"}, {"enabled": true, "name": "guest-sync-delimited"}]}} >{"execute":"guest-fsfreeze-status"} >{"return": "thawed"} >{"execute":"guest-fsfreeze-freeze"} >{"error": {"class": "GenericError", "desc": "Failed to >pVssbc->SetContext. (Error: 8004231b) "}} > >Could you give me some advise to debug this problem ? I can provide more >information if need. > >Regards, >baiqing >-----Original Message----- >From: qemu-devel-bounces+libaiqing=3Dhuawei.com@nongnu.org >[mailto:qemu-devel-bounces+libaiqing=3Dhuawei.com@nongnu.org] On Behalf Of >Tomoki Sekiyama >Sent: Saturday, April 13, 2013 4:02 AM >To: qemu-devel@nongnu.org >Cc: pbonzini@redhat.com; lcapitulino@redhat.com; vrozenfe@redhat.com; >mdroth@linux.vnet.ibm.com >Subject: [Qemu-devel] [RFC PATCH v2 00/11] qemu-ga: fsfreeze on Windows >using VSS > >Hi, > >This patch series is attempts to add fsfreeze support for Windows >qemu-guest-agent. > >changes from v1:=20 > - Fix out-tree build by stop using recursive Makefile > - Added script to extract VSS SDK headers on POSIX systems using msitools > (thanks Paolo) > - Remove some unnecessary header files > >v1: http://lists.gnu.org/archive/html/qemu-devel/2013-02/msg01963.html > >* Description >In Windows, VSS (Volume Shadow Copy Service) provides a facility to >quiesce filesystems and applications before disk snapshots are taken. >This patch series implements "fsfreeze" command of qemu-ga using VSS. > >* How to build & run qemu-ga with VSS support > > - Download Microsoft VSS SDK from: > http://www.microsoft.com/en-us/download/details.aspx?id=3D23490 > > - Setup the SDK > scripts/extract-vsssdk-headers setup.exe (on POSIX-systems) > > - Specify installed SDK directory to configure option as: > ./configure -with-vss-sdk=3D"path/to/VSS SDK" >--cross-prefix=3Di686-w64-mingw32- > > - Make qemu-ga.exe > > - 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 > >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 Windows VSS SDK > qemu-ga: Add Windows VSS provider to quiesce applications on >fsfreeze > qemu-ga: Add Windows VSS requester to quisce applications and >filesystems > qemu-ga: call Windows VSS requester in fsfreeze command handler > qemu-ga: install Windows VSS provider on `qemu-ga -s install' > qemu-ga: Add VSS provider .tlb file in the repository > QMP/qemu-ga-client: make timeout longer for guest-fsfreeze-freeze >command > QMP/qmp.py: set locale for exceptions to display non-ascii messages >correctly > > > .gitignore | 1 > Makefile | 3 > Makefile.objs | 2 > QMP/qemu-ga-client | 4 > QMP/qmp.py | 4 > configure | 59 ++++ > hmp.c | 2 > hw/pci/pci.c | 2 > qga/Makefile.objs | 7 > qga/commands-win32.c | 74 ++++- > qga/main.c | 41 +++ > qga/vss-win32-provider.h | 26 ++ > qga/vss-win32-provider/Makefile.objs | 25 ++ > qga/vss-win32-provider/install.cpp | 494 >+++++++++++++++++++++++++++++++ > qga/vss-win32-provider/provider.cpp | 474 >++++++++++++++++++++++++++++++ > qga/vss-win32-provider/qga-provider.def | 10 + > qga/vss-win32-provider/qga-provider.idl | 20 + > qga/vss-win32-provider/qga-provider.tlb | Bin > qga/vss-win32-requester.cpp | 393 +++++++++++++++++++++++++ > qga/vss-win32-requester.h | 31 ++ > qga/vss-win32.h | 85 +++++ > rules.mak | 9 + > scripts/extract-vsssdk-headers | 25 ++ > scripts/qapi.py | 9 + > 24 files changed, 1785 insertions(+), 15 deletions(-) > create mode 100644 qga/vss-win32-provider.h > create mode 100644 qga/vss-win32-provider/Makefile.objs > create mode 100644 qga/vss-win32-provider/install.cpp > create mode 100644 qga/vss-win32-provider/provider.cpp > create mode 100644 qga/vss-win32-provider/qga-provider.def > create mode 100644 qga/vss-win32-provider/qga-provider.idl > create mode 100644 qga/vss-win32-provider/qga-provider.tlb > create mode 100644 qga/vss-win32-requester.cpp > create mode 100644 qga/vss-win32-requester.h > create mode 100644 qga/vss-win32.h > create mode 100755 scripts/extract-vsssdk-headers > >