4.1 Retrieving Virtual Disk File Information
The following diagram demonstrates the steps taken to open a shared virtual disk file, retrieve virtual disk file information, and close it.
Figure 2: Retrieving virtual disk file information
The client sends an SMB2 CREATE Request with the SVHDX_OPEN_DEVICE_CONTEXT create context to open a shared virtual disk file.
Version: 1 (0x00000001) HasInitiatorId: 1 (0x01) Reserved: 0 (0x000000) InitiatorId: (0x07770D201F2740834579D46F5AC43B73) Flags: 0 (0x00000000) OriginatorFlags: SVHDX_ORIGINATOR_PVHDPARSER (0x00000001) OpenRequestId: (0x000000001EC7871E) InitiatorHostNameLength: 16 (0x0010) InitiatorHostName: client01 (0x0063006C00690065006E007400300031)
The server responds with an SMB2 CREATE Response giving the handle to the open identifying the shared virtual disk file and SVHDX_OPEN_DEVICE_CONTEXT_RESPONSE context.
Version: 1 (0x00000001) HasInitiatorId: 1(0x01) Reserved: 0 (0x000000) InitiatorId: (0x07770D201F2740834579D46F5AC43B73) Flags: 0 (0x00000000) OriginatorFlags: SVHDX_ORIGINATOR_PVHDPARSER(0x00000001) OpenRequestId: (0x000000001EC7871E) InitiatorHostNameLength: 16 (0x0010) InitiatorHostName: client01 (0x0063006C00690065006E007400300031)
The client sends an SMB2 IOCTL Request with SVHDX_TUNNEL_INITIAL_INFO_REQUEST to retrieve the virtual disk information.
OperationCode: RSVD_TUNNEL_GET_INITIAL_INFO_OPERATION (0x02001001) Status: 0 (0x00000000) RequestId: (0x000000001Ec7871E)
The server sends an SMB2 IOCTL Response with SVHDX_TUNNEL_INITIAL_INFO_RESPONSE containing the virtual disk information.
OperationCode: RSVD_TUNNEL_GET_INITIAL_INFO_OPERATION (0x02001001) Status: 0 (0x00000000) RequestId: (0x000000001Ec7871E) ServerVersion: 1 (0x00000001) SectorSize: 512 (0x00000200) PhysicalSectorSize: 256 (0x00000100) Reserved: 0 (0x00000000) VirtualSize: (0x4000000000000000)
The client sends an SMB2 CLOSE Request to close the shared virtual disk file.
The server sends an SMB2 CLOSE Response indicating the close was successful.