Bug 9938 - Create VM fails on Hyper-V 2012
Create VM fails on Hyper-V 2012
Status: NEW
Product: Samba 4.0
Classification: Unclassified
Component: File services
unspecified
All All
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-07 12:28 UTC by David Disseldorp
Modified: 2016-11-22 08:47 UTC (History)
9 users (show)

See Also:


Attachments

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:
	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.
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