Bug 1074613

Summary: [guest-agent] [vss] creating a shadow copy using qemu-guest-agent (with vss support) is failing on a windows server
Product: Red Hat Enterprise Linux 6 Reporter: Chris Pelland <cpelland>
Component: virtio-winAssignee: Yvugenfi <yvugenfi>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.5CC: aberezin, acathrow, bcao, bsarathy, chayang, chetan, cpelland, ebenahar, eedri, ghammer, iheim, juzhang, lindsay.mathieson, lveyde, lyarwood, michen, mkenneth, mnavrati, pm-eus, qzhang, rhod, scohen, sherold, sluo, tsekiyam, yeylon, yvugenfi
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Volume Shadow Copy Service (VSS) for QEMU Guest Agent should not respond to requests coming from any other component than QEMU Guest Agent. When no other hardware snapshot provider was installed, VSS could choose the QEMU Guest Agent VSS provider to create shadow copies. Consequently, creating shadow copies could fail with the following error: VSS_E_UNEXPECTED_PROVIDER_ERROR With this update, VSS is notified that the volume is not supported by the QEMU Guest Agent VSS provider when it is queried by other requesters. As a result, no side effects are introduced to the system when the Guest Agent VSS provider is present.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-02 07:22:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1036341    
Bug Blocks: 871829    

Description Chris Pelland 2014-03-10 16:15:10 UTC
This bug has been copied from bug #1036341 and has been proposed
to be backported to 6.5 z-stream (EUS).

Comment 4 Sibiao Luo 2014-03-25 07:56:49 UTC
Verify this issue on virtio-win-1.6.8-4.el6_5 with the same steps as bug 1036341#c6.

host info:
2.6.32-425.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.415.el6.x86_64
guest info:
win2008-64bit
virtio-win-1.6.8-4.el6_5 (virtio-serial & qemu-ga)
Volume Shadow Copy Service SDK 7.2 (download from Microsoft http://www.microsoft.com/en-us/download/confirmation.aspx?id=23490)

My qemu-kvm command line:
# /usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/win2008-64.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -vnc :1 -spice disable-ticketing,port=5931 -monitor stdio -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -drive file=/home/my-data-disk1.qcow2,if=none,id=drive-disk1,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x7,drive=drive-disk1,id=virtio-disk1 -drive file=/home/my-data-disk2.qcow2,if=none,id=drive-disk2,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x8,drive=drive-disk2,id=virtio-disk2 -drive file=/home/my-data-disk3.qcow2,if=none,id=drive-disk3,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x9,drive=drive-disk3,id=virtio-disk3

Steps:
1.install a win2008 64bit windows VM with 3 disks and rhevm-guest-tools with the mentioned qemu-guest-agent version which support vss for windows.
2.install Volume Shadow Copy Service SDK 7.2 on the guest.
Check the providers list:
C:\Program Files (x86)\Microsoft\VSSSDK72\TestApps\vshadow\bin\obj-fre\amd64>vss
admin list providers
3.create a shadow copy using vshadow command on the guest.

Result:
install Volume Shadow Copy Service SDK 7.2 in the guest.
Check the providers list:
C:\Program Files (x86)\Microsoft\VSSSDK72\TestApps\vshadow\bin\obj-fre\amd64>vss
admin list providers
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2005 Microsoft Corp.

Provider name: 'QEMU Guest Agent VSS Provider'
   Provider type: Software
   Provider Id: {3629d4ed-ee09-4e0e-9a5c-6d8ba2872aef}
   Version: 0.12.1

Provider name: 'Microsoft Software Shadow Copy provider 1.0'
   Provider type: System
   Provider Id: {b5946137-7b9f-4925-af80-51abd60b20d5}
   Version: 1.0.0.7

aftet step 3, create a shadow copy using vshadow command on the guest successfully.
C:\Program Files (x86)\Microsoft\VSSSDK72\TestApps\vshadow\bin\obj-fre\amd64>vsh
adow.exe E:

VSHADOW.EXE 2.2 - Volume Shadow Copy sample client
Copyright (C) 2005 Microsoft Corporation. All rights reserved.


(Option: Create shadow copy set)
(Gathering writer metadata...)
(Waiting for the asynchronous operation to finish...)
Initialize writer metadata ...
Discover directly excluded components ...
- Excluding writer 'Shadow Copy Optimization Writer' since it has no selected co
mponents for restore.
- Excluding writer 'BITS Writer' since it has no selected components for restore
.
Discover components that reside outside the shadow set ...
- Component '\System Files' from writer 'System Writer' is excluded from backup
(it requires C:\ in the shadow set)
- Component '\BCD\BCD' from writer 'ASR Writer' is excluded from backup (it requ
ires C:\ in the shadow set)
- Component '\Registry' from writer 'Registry Writer' is excluded from backup (i
t requires C:\ in the shadow set)
- Component '\COM+ REGDB' from writer 'COM+ REGDB Writer' is excluded from backu
p (it requires C:\ in the shadow set)
- Component '\WMI' from writer 'WMI Writer' is excluded from backup (it requires
 C:\ in the shadow set)
Discover all excluded components ...
Discover excluded writers ...
- The writer 'System Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the ba
ckup)
- The writer 'ASR Writer' is now entirely excluded from the backup:
  (the top-level non-selectable component '\BCD\BCD' is an excluded component)
- The writer 'Registry Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the ba
ckup)
- The writer 'COM+ REGDB Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the ba
ckup)
- The writer 'WMI Writer' is now entirely excluded from the backup:
  (it does not contain any components that can be potentially included in the ba
ckup)
Discover explicitly included components ...
Verifying explicitly specified writers/components ...
Select explicitly included components ...
Creating shadow set {ba25c01e-cec6-4800-ae43-4fa96ab0e1bd} ...
- Adding volume \\?\Volume{3967dd77-b473-11e3-9677-525400123456}\ [E:\] to the s
hadow set...
Preparing for backup ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)
Creating the shadow (DoSnapshotSet) ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)
Shadow copy set succesfully created.

List of created shadow copies:


Querying all shadow copies with the SnapshotSetID {ba25c01e-cec6-4800-ae43-4fa96
ab0e1bd} ...

* SNAPSHOT ID = {6a1ebb53-b264-4667-9232-527d115ab311} ...
   - Shadow copy Set: {ba25c01e-cec6-4800-ae43-4fa96ab0e1bd}
   - Original count of shadow copies = 1
   - Original Volume name: \\?\Volume{3967dd77-b473-11e3-9677-525400123456}\ [E:
\]
   - Creation Time: 3/25/2014 4:50:41 PM
   - Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2
   - Originating machine: AUTOTES-CS2ESZE
   - Service machine: AUTOTES-CS2ESZE
   - Not Exposed
   - Provider id: {b5946137-7b9f-4925-af80-51abd60b20d5}
   - Attributes:  Auto_Release Differential

- Mark all writers as succesfully backed up...
Completing the backup (BackupComplete) ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)

Snapshot creation done.

C:\Program Files (x86)\Microsoft\VSSSDK72\TestApps\vshadow\bin\obj-fre\amd64>

Base on above, this issue has been fixed correctly, move to VERIFIED status, please correct me if any mistake, thanks.

Best Regards,
sluo

Comment 7 errata-xmlrpc 2014-04-02 07:22:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0351.html