Using Samba 4.1 SMB 3’s Feature for Hyper-V VHD(X) Storage

A while back Samba 4.0 shipped with the Active Directory Domain Controller functionality in the code. The other big thing was basic support for SMB 3.0 which Hyper-V supports hosting VHD’s off from.

The SMB 3.0 support may look exciting at first and I know what most of you are thinking – Use Samba 4’s SMB 3 feature to host Hyper-V VHD’s on a low cost NAS solution or maybe even host it off a Ceph based filesystem so one can massively scale out data storage with only commodity SATA 7.2K RPM drives.

Unfortunately, you may be in for a surprise. Since the Samba 4.x series does not implement resilient file handles (aka the FSCTL_LMR_REQUEST_RESILIENCY function), every time you try to launch a Hyper-V VM hosted off of a Samba 4.x file server, you’ll get this nasty error:


start-vm : 'SMB3Test' failed to start. (Virtual machine ID 95777C9A-3118-40ED-AD5A-FD10DDAF8F8B)
'SMB3Test' Microsoft Emulated IDE Controller (Instance ID 83F8638B-8DCA-4152-9EDA-2CA8B33039B4): Failed to Power on
with Error 'The request is not supported.' (0x80070032). (Virtual machine ID 95777C9A-3118-40ED-AD5A-FD10DDAF8F8B)
'SMB3Test': Failed to open attachment '\\smb3fsrvtest\data\boot.vhdx'. Error: 'The request is not supported.'
(0x80070032). (Virtual machine ID 95777C9A-3118-40ED-AD5A-FD10DDAF8F8B)
Remote SMB share does not support resiliency. (Virtual machine ID 95777C9A-3118-40ED-AD5A-FD10DDAF8F8B)
The operation is not supported.
At line:1 char:1
+ start-vm smb3test
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [Start-VM], VirtualizationOp
erationFailedException
+ FullyQualifiedErrorId : NotSupported,Microsoft.HyperV.PowerShell.Commands.StartVMCommand

According to the Samba team, implementing FSCTL_LMR_REQUEST_RESILIENCY is important for them to enable Hyper-V storage workloads, but doing the actual work isn’t an easy task to do.

tl;dr – Don’t do it. Samba 4’s SMB3 support does not work with Hyper-V workloads – yet.

Leave a Reply

Your email address will not be published. Required fields are marked *