Windows Server 2012 New Feature: Store Hyper-V VHDs in a SMB 3.0 Share
When building high-performance Hyper-V host servers for a production environment, we often buy high-end servers with lots or memory and fast SAS (Serial Attached SCSI) or SSD (Solid State) drives. These drives are fast but usually expensive, especially after adding in
RAID redundancies.
What if your VMs (virtual machines, or guests running on your Hyper-V host) do not need these fast expensive drives? This is often the case with file servers or servers storing archive data. In the past you could build a SAN with inexpensive SATA or Nearline SAS (simply SATA drives that speak the SCSI language) drives. The problem is that SANs are inherently expensive and require a lot of expertise and planning to deploy and manage.
With Windows Server 2012 we have a new type of SMB sharing technology called SMB 3.0. SMB 3.0 gives us several features such as data deduplication, data transfer performance increases, and most importantly the ability to store virtual hard disks (VHD or VHDX files) for a Hyper-V host on the same network.
Before SMB 3.0, an expensive SAN (storage area network) solution was needed to accomplish this. This can mean savings to your datacenter in a big way.
Here is what is needed:
- Hyper-V Host: Windows Server 2012 with the File Services role installed
- SMB 3.0 File Server: Windows Server 2012 with the Hyper-V role installed
Steps in this lab:
- Enable delegation on the computer account of the Hyper-V server.
- Grant permissions to the SMB Share.
- Create a new virtual machine from a VHD running on an SMB file share (the share happens to be clustered).
Step 1: Enable delegation on the computer account of the Hyper-V server.
- Log on to the file server as a domain administrator. This is the server where the VHD files will be stored for the front-end Hyper-V host.
- From the Taskbar open Server Manager, click Tools, and then click Active Directory Users and Computers.
- Create a new security group named “Hyper-V Servers”. Add your Hyper-V computer accounts to this new group.
- Navigate to Contoso.com\Computers (replacing Contoso.com with your own Active Directory domain name), and then select your Hyper-V host server.
- On the Action menu, click Properties.
- Click the Delegation tab.
- Click Trust this computer for delegation to any service (Kerberos only).
- Click the Member of tab, and then click Add.
- Type Hyper-V-Servers, and then click OK.
Step 2: Grant permissions to the SMB Share.
- On the file server, open Server Manager, then select File and Storage Services.
- Select Shares then create a new file share using the wizard.
- For Hyper-V VHD storage, select SMB Share-Applications, then click on the Next button.
- Select the path which to create the share in the Type a custom path field, then click on the Create button.
- Type a name for the new SMB 3.0 share (and a brief description if desired).
- On the Permission screen make sure the Contoso\Hyper-V-Servers group has full control, which is a requirement for Hyper-V over SMB. When done click the Next button.
- On the confirmation screen click Create if everything looks correct.
Step 3: Create a new virtual machine from a VHD running on an SMB file share
(the share happens to be clustered).
- On the Hyper-V host server launch the Hyper-V Manager.
- In the Hyper-V console, click New, and then click Virtual Machine.
- Complete the New Virtual Machine Wizard like you normally would selecting a virtual machine name, network, and memory.
- When creating a virtual hard drive (VHD), use the UNC path to the new SMB 3.0 share.
Example: \\FileServerName\SMBShareName\c-drive.vhdx
For more information on creating a SMB 3.0 share and using it with a Hyper-V VM see this
Technet Article from Microsoft.
Related
Robert Borges
About Robert...
I have been in the IT industry since 1993 focusing mainly on networking. Though I got an early start as an amateur computer enthusiast and wrote my first database app at age 12, I started my professional career working in the MIS department of one of the largest liquor distributors in the northeast. I started out there as a systems operator on the company’s two mainframe systems. From there I moved into PC support, and help design and implement the company’s first client-server network… This was back in the days of Win NT 3.51 when I worked on my first migration to Windows NT 4.0 server.
From there I went on to work with Novell 3.x and 4.x along with Windows domains and Microsft's brand new Active Directory. Working my way up from technician to specialist, to an administrator, and eventually all the way up to Sr. Engineer. I spent many years working for MSPs/consulting firms, 9 of which I owned and operated my own firm.
Over the years, I have worked with (at an expert level) various versions of Windows client and server operating systems (including Windows 11 and Windows Server 2019); various virtualization technologies (Hyper-V, VMware, etc.); MS-SQL server 6.5- 2014 R2; Exchange 4-2019, and much more. Over the years I have built a lot of experience around the Microsoft Azure and Microsoft 365 cloud environments.
I am now CTO at Infused Innovations where our team is focusing on helping clients build a Secure Intelligent Workplace through InfoSec (Zero Trusts Framework), Modern Workplace, and Business Intelligence.
I have been heavily involved in the IT user group community, including serving as president of the board of Boston User Groups, Inc., and president of IT-Pro User Group. In 2017/2018 Microsoft awarded me the Microsoft MVP (Most Valuable Professional) Award, with a focus of Microsoft Azure cloud, for my efforts in the IT community.
I am in a constant state of learning about new products, and new versions of products. Many of which we end up implementing in lab environments and sometimes for our clients. I have a very broad range of expertise and experience. It is my goal to share some of this experience on this blog to help enrich the IT community.
Permanent link to this article: https://www.robertborges.us/2013/03/windows/windows-server-2012/windows-server-2012-new-feature-store-hyper-v-vhds-in-a-smb-3-0-share/
2 comments
1 pings
Just curious
If your DC’s are hosted on the SMB 3 store, how do you handle a shutdown and startup of your environment? Hyper-V can’t talk to SMB3 share as Fileserver can’t validate HV server’s account as there is no domain. DC’s can’t startup because Hyper-V can’t talk to their storage?
Is it possible to perform this same type of scenario; just without the Domain? I have a test setup where I’m trying to user a Server 2012 system to store the VHD files for another system that will be running the Hyper-V host. Neither system is joined to a domain, but are running stand-alone (in WORKGROUP).
How can I configure the SMB share to allow access since they do not have shared credentials?
[…] about hosting Hyper-V VMs on an SMB 3.0 share? Here’s a cool walkthrough on setting up a lab to test this. My personal test cluster is running this […]