My specific use case is that I have a NetApp CIFS storage that's in the domain, say, intranet. But I also have one hyper-v host that's not in the domain. I can't allow it into the domain, but I need to create guests whose VHD is on the storage.
How can I achieve this? When I simply connect to a CIFS share and create a VHD there, it works, but when I try to add that VHD to the virtual machine, I get a "Failed to set folder permissions" error - probably due to folder ownership being in the domain admin.
Is there a way around this? So both domain and non-domain users use the same directory?
In order to put VHD files on SMB shares, the SMB server must offer SMB 3.0 (this is the revision of the protocol) and both the Hyper-V host and the SMB server must be part of the same Active Directory, so that the VHD file permissions can be set meaningfully.
I suspect that the first part isn't true in your case. You've stated explicitly that you're not willing to make the second part true. You should probably look for another storage solution.
Are you using Server 2012? Technically Hyper-V in previous versions doesn't support CIFS/SMB because the protocol's sessions aren't really fault-tolerant. iSCSI is probably a better option for your use case and very well supported on NetApp.
If you are interested in using SMB 3.0 with Hyper-V in Server 2012 you can join the NetApp beta program here: https://communities.netapp.com/groups/ontap-82-beta-program
Also to answer the original question, you can add users/passwords directly to Data ONTAP that are not part of a domain. Then you'd need to connect as "MyStorage\SomeUser". I doubt that's possible with Hyper-V and you'd be unsupported by both NetApp & Microsoft even if it worked.