Hi everybody,
I would need some advice from someone with more experience in this.
I wanted to set up multiple hosts that would run VMs from a common storage, and if possible use SMB based storage for the VMs.
I tried to create a VM on one of our Windows HYPER-V Server 2008 R2, and tried to point the location of the virtual hard drive to a shared folder in the storage.
I received an error:
Failed to create external configuration store at '\\STORAGE1\VMs\TestVM': General access denied error (Virtual machine ID 0x80070005)
The operation failed.
User 'LOCALDOMAIN\snagy' failed to create external configuration store at '\\STORAGE1\VMs\TestVM': General access denied error (Virtual machine ID 0x80070005)
I already gave full access for the user 'LOCALDOMAIN\snagy' to the folder \\STORAGE1\VMs\.
I had some similar general access denied error once, when I tried to restore a VM (I created a new VM and tried to overwrite the VHD file with another one backed up before), and I found an article that fixed it, based on these instructions:
To give the Virtual Machine ID (SID) access to the .vhd or .avhd file, type the following command, and then press ENTER:
icacls <Path of .vhd or .avhd file> /grant "NT VIRTUAL MACHINE\<Virtual Machine ID from step 1>":F
(sorry I couldn't post the link to the article, until my account is verified)
I realized that each VHD file has a special username given access in the NTFS security, for example one is called "NT VIRTUAL MACHINE\7D230D2D-B5AF-48FB-B8B3-1FA350626E47"
I guess when the VM starts, the system is accessing the VHD file through that username.
Probably the user "NT VIRTUAL MACHINE\7D230D2D-B5AF-48FB-B8B3-1FA350626E47" should have access to the location '\\STORAGE1\VMs\' on the storage? But I think that user is a local user on the host and not sure how to assign rights on a folder
that is on another computer (in this case STORAGE1). Are there any trust relationships that need to be done between the 2 servers? If yes, how to do that?
I have a couple questions:
- Do I need to configure a cluster of at least 2 hosts for using a shared storage for Hyper-V? Or can I just use independent Hyper-V servers?
- If I need the cluster, would those 2 hosts run the same VMs, or they can each have different VMs running? (If you need to set up VMs per cluster, not per individual hosts, I guess you waste a physical box for the high availability)
- Do I need to purchase additional software, like System Center Virtual Machine Manager (2012)? Or can I do it just by using Hyper-V Manager? (I am wondering if the SCVMM would help to set those security settings automatically, and it could be done
manually too using Hyper-V Manager)
- Do the hosts need to be all version 2012 of Hyper-V Server, or can I use a Windows 2008 R2 host too? I heard that Windows 2012 introduced SMB 3.0 but can that be used from aHyper-V 2008 R2 host, or the host also needs to be 2012?
Thanks very much,
Steven