Using HyperV with Samba 4.2 (An update)

Richard Sharpe realrichardsharpe at
Mon Oct 20 10:53:32 MDT 2014

On Sun, Oct 19, 2014 at 5:56 PM, Richard Sharpe
<realrichardsharpe at> wrote:
> Hi folks,
> Sending this out in the hope that it will be useful to some people.
> This document describes how to get Samba 4.2 (or the Samba master
> branch at this time) to work with HyperV.
> The work described here was requested by Hedvig Inc and made possible
> with technical help from Ata E Hussain and Abhijit Shennoy, who
> provided packet captures and integrated the changes supplied into
> Samba and tested that things worked.
> We are making this information available so that more people can try
> it out and provide feedback on the problems etc.
> This code is not production ready. Support for reconnection of
> persistent handles is still being developed and there are likely to be
> corner cases that are not handled.
> However, it can be used for testing.
> There are two things that are needed to allow HyperV at least work
> against Samba. You will need to start with the Samba 4.2 sources (the
> latest master branch is probably best.)
> Firstly, you will need a patch that implements
> FSCTL_LMR_REQUEST_RESILIENCY. A patch for this was posted to the
> samba-technical mailing list a short while ago and is attached.
> Secondly, you will need to create a VFS module (or modify your
> existing VFS module if you have one) to assert that your file system
> supports compression and to implement the set_compression and
> get_compression entry points.

When looking more closely at the function the first patch modifies, I
realized that, since that function calls the VFS fsctl function for an
unrecognized FSCTL request, this whole patch set could be simplified
and made into a single VFS Module.

If I don't get around to this soon, surely someone who has been
following along at home could do it.

Richard Sharpe

More information about the samba-technical mailing list