Hyper-V and using SMB3 shares to store data

hyper-vserver-message-blockstoragewindows-server-2012

I'm using Hyper-V remote management from a management/file server to control 3 Hyper-V core servers. Now I want to store all the virtual disks and virtual machines on a SMB share on the management server. Currently all the servers are in a workgroup, my question is, is the correct way of doing this to create an AD on the management server, join it with the core servers and then create the SMB shares?

EDIT: Now I've created an AD and joined with one of the core servers. I've then added the core server computer to the permissions of the share but I get a General access denied error when trying to create a virtual disk using the share in Hyper-V management?

Thanks in advance!

Best Answer

While you could potentially make hyper-v use a domain account for its service account and do this, it's highly inadvisable to use an SMB (or CIFS) share as a backing store for your virtual disks. You will experience horrible performance and reliability (how many times have you seen a long file transfer fail over SMB?). Usually if there is any significant disk load on the VMs people will set up a fibre channel SAN for this, connected to a controller right on the hypervisor.

To change the service account for hyper-v, you will need to add the account to the host's distributed COM users group, and use azman.msc (the authorization manager MMC snapin) to add the user account to the authorization store which is usually at C:\ProgramData\Microsoft\Windows\Hyper-V\initialstore.xml. Ensure it has filesystem rights to all the files related to your VMs. Then, you can change the service account for the hyper-v virtual machine management service to the domain account you created.

Microsoft has a guide which includes the steps for this in detail (along with some other steps for setting up hyper-v over a network).