I did a quick test on my local Samba 4.0 + Hyper-V 2012 setup and see an access denied error, which appears to be due the following ACL issue: - Hyper-V connects using the machine account (machine$) - Hyper-V connects using the login account (admin) - admin creates VM container directory (vmdir) - admin sets security descriptor on vmdir: owner=admin group=domain admins acl[0]: machine$(inherit only)=0x001f01ff acl[1]: machine$=0x0012008f acl[n]... - machine$ attempts to open a non-existing "vmdir\Virtual Machines" path, which fails at realpath() with EPERM. The ACL on the parent does not allow machine$ execute permission, so realpath() is unabled to traverse. This step would succeed on Windows, as the "Bypass traverse checking" user right is granted by default.
I was able to work around the ACL issue by putting the VM metadata on local disk. The VM virtual disk remains on the Samba share. The next road block appears to be support for resilient/persistent file-handles. After creating the .vhdx file, Hyper-V issues a FSCTL_LMR_REQUEST_RESILIENCY request. Hyper-V cleans-up and disconnects after receiving the STATUS_INVALID_DEVICE_REQUEST response from Samba.
See bug #10159 for an explanation of why this fails. HyperV strictly requires FSCTL_LMR_REQUEST_RESILIENCY when used against SMB 2.10 or higher.
I assume this is the same issue that is causing Hyper-V to error: "Remote SMB share does not support resiliency." when moving from local storage to a Samba 3 SMB share? Looking forward to developments on this, according to MS this should be supported by non-Microsoft SMB 3.0 hosts: http://technet.microsoft.com/en-us/library/jj134187.aspx
Bug is still present, checked with W10 10.0.19042 N/A Build 19042 Hyper-V host and Samba Version 4.13.4. There was a discussion in 2014 in Samba lists about patch to include FSCTL_LMR_REQUEST_RESILIENCY feature, but it seems that is's gone to nowhere. https://lists.samba.org/archive/samba-technical/2014-October/102874.html I don't understand why guitman423@gmail.com said about supported status one comment before me - this feature is still NOT supported.