Bug 9938 - Create VM fails on Hyper-V 2012
Summary: Create VM fails on Hyper-V 2012
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2013-06-07 12:28 UTC by David Disseldorp
Modified: 2021-02-14 12:18 UTC (History)
10 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description David Disseldorp 2013-06-07 12:28:32 UTC
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:
	group=domain admins
	acl[0]: machine$(inherit only)=0x001f01ff
	acl[1]: machine$=0x0012008f
- 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.
Comment 1 David Disseldorp 2013-06-07 12:34:57 UTC
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.
Comment 2 Andrew Bartlett 2013-11-15 19:30:34 UTC
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.
Comment 3 guitman423 2014-09-26 15:08:46 UTC
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
Comment 4 Uldis Kalniņš 2021-02-14 12:18:02 UTC
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.

I don't understand why guitman423@gmail.com said about supported status one comment before me - this feature is still NOT supported.