3.2.5.5.7.3 Receiving an ExtractVHD Request
When the server receives a request in which the OperationType is SvhdxMetaOperationTypeExtractSnapshots, the request processing proceeds as follows:
If the input buffer is less than 88 (size of SVHDX_TUNNEL_OPERATION_HEADER + size of the fixed part of SVHDX_META_OPERATION_START_REQUEST + size of the fixed part of SVHDX_META_OPERATION_EXTRACT) + DestinationFileNameLength bytes, the server MUST fail the request with STATUS_BUFFER_TOO_SMALL.
If any of the following conditions is TRUE, the server MUST fail the request with STATUS_INVALID_PARAMETER:
DestinationFileNameLength is 0.
The UNICODE string in the DestinationFileName contains any character that is not allowed for a file name, as specified in [MS-FSCC] section 2.1.5.
DestinationFileNameLength is not the BYTE-size of the Unicode UTF-16 string or the DestinationFileName does not contain the NULL terminating char.<22>
The SourceSnapshotId is not a valid snapshot ID.
The SourceLimitSnapshotId is nonzero and is not a valid snapshot ID.
If any of the following conditions is TRUE, the server MUST fail the operation with STATUS_INVALID_PARAMETER_2:
If the Flags field is nonzero and SnapshotType is not SvhdxSnapshotTypeVM.
If SnapshotType is SvhdxSnapshotTypeVM and the Flags field is a value other than 0 or SVHDX_EXTRACT_SNAPSHOTS_FLAG_DELETE_ON_CLOSE.
The server MUST issue an extract VHD request to the virtual SCSI disk in an implementation-specific manner.
If SVHDX_EXTRACT_SNAPSHOTS_FLAG_DELETE_ON_CLOSE is set in the Flags field, the server MUST set Open.PendingDelete to TRUE.
The server MUST set the Status field of the SVHDX_TUNNEL_OPERATION_HEADER as the error returned by the virtual SCSI disk, and return the header to the client.