<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://sufan.maytide.net/index.php</link> 
<description><![CDATA[gOxiA,苏繁,sufan,Microsoft MVP]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[gOxiA=苏繁=SuFan Blog]]></copyright>
<item>
<link>https://sufan.maytide.net/read.php/1635.htm</link>
<title><![CDATA[[WS2012]Windows Server 2012 Hyper-V over SMB]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[Virtualization]]></category>
<pubDate>Mon, 12 Nov 2012 04:08:18 +0000</pubDate> 
<guid>https://sufan.maytide.net/read.php/1635.htm</guid> 
<description>
<![CDATA[ 
	<p><a href="http://goxia.maytide.net/ftpupfiles/-Windows-Server-2012_A734/logo_winserver2012.png"><img title="logo_winserver2012" border="0" alt="logo_winserver2012" src="http://goxia.maytide.net/ftpupfiles/-Windows-Server-2012_A734/logo_winserver2012_thumb.png" width="220" height="44"></a></p> <p><a href="http://www.microsoft.com/zh-cn/server-cloud/ws2012/default.aspx" target="_blank"><strong><font color="#fd3f0d" size="4">Windows Server 2012</font></strong></a><strong><font color="#fd3f0d" size="4"> Hyper-V over SMB</font></strong></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Windows Server 2012 Hyper-V over SMB，即：基于 SMB 的 Hyper-V，简单理解就是将 Hyper-V 的配置文件、虚拟磁盘（VHD）、快照等文件以共享文件存储的方式来进行存储和使用。要实现这一特性，需要使用 Windows Server 2012 的 SMB 3.0 文件共享作为 Hyper-V 的共享存储器。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hyper-V over SMB 的主要优势：</p> <ul> <li>易于设置和管理，基于文件共享方式相比较专用的存储结构和LUN，更加容易设置和管理。&nbsp;&nbsp;<li>较高的灵活性，Hyper-V over SMB 同样支持 Windows Server 2012 Hyper 的实时迁移技术。&nbsp;&nbsp;<li>减少成本投资，因为无需专用存储，所以我们可以依靠 SMB 在现有的网络上为 Hyper-V 部署存储，不仅减少了在设备上投资，而且无需专门的存储知识。</li></ul> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;要部署 Hyper-V over SMB，我们必须了解其必备的条件！AD（Active Directory 活动目录）作为基础架构是必须的，但是 DC 不需要运行 Windows Server 2012 系统；Hyper-V 主机必须是 Windows Server 2012 系统；对于文件服务器，除了 Windows Server 2012 以外，还可以选择支持 SMB 3.0 协议的非 Microsoft 文件服务器。常见的部署方式有三种：</p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/hyper-v_over_smb.jpg"><img title="hyper-v_over_smb" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="hyper-v_over_smb" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/hyper-v_over_smb_thumb.jpg" width="624" height="233"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;主要区别就是 SMB 服务器的节点数量，对于测试和实验这类的非生产环境，我们可以使用单节点文件服务器的部署结构，对于要求高的则可以使用多节点或带有群集功能的文件服务器结构。在微软官方的手册中明确说明 Hyper-V over SMB 不支持回环配置，就是说不支持将 Hyper-V 主机节点用于存储服务器，但是在 <a href="http://goxia.maytide.net/" target="_blank">gOxiA</a> 测试“使用 SMB 共享存储的实时迁移”时还是仅使用了两台 Hyper-V 主机实现了 Hyper-V over SMB，不过也仅局限于测试，因为我们需要将共享存储的安全性降到最低，这样一来此种方式的部署则会显得没有任何意义，如果你当前的测试环境设备比较紧张，也可以尝试！只需要将共享目录的共享权限设置为：everyone 有完全控制的权限；同时目录安全性配置也配置为：everyone 有完全控制的权限。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在开始 Hyper-V oever SMB 实践之前请再确认一下测试环境的准备情况，以 gOxiA 为例：一台 DC；两台 Hyper-V 主机，都加到 AD 并安装了文件共享服务。</p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/image.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/image_thumb.png" width="634" height="451"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;首先，使用 ADUC 创建两个组“HyperVHosts”和“HyperVAdmins”，将两台 Hyper-V 主机添加到“HyperVHosts”组，将用于管理 Hyper-V 的账号添加到“HyperVAdmins”，这样做是出于安全管理规范考虑，当然如果是测试环境，可以暂不考虑安全配置。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 然后，通过服务器管理器打开共享管理，并添加“SMB 共享 - 应用程序”类型的共享。</p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/1.png"><img title="1" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="1" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/1_thumb.png" width="634" height="358"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在“共享位置”配置中，选择我们要存储虚拟机文件的卷，如：“E:”；“共享名称”设置中，在“共享名称”框中输入共享名，如：“SMB”，默认向导会在 E盘下自动创建一个 Share 目录，同时在其下创建 SMB 子目录，并将其设为共享，如：“hyper-vsmb”；“其他设置”选项中保持默认即可。</p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/2.png"><img title="2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="2" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/2_thumb.png" width="634" height="466"></a></p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/3.png"><img title="3" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="3" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/3_thumb.png" width="634" height="466"></a></p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/4.png"><img title="4" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="4" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/4_thumb.png" width="634" height="466"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;之后进入权限设置，根据实际的情况，我们需要重新自定义权限，以确保 Hyper-V主机以及相关用户有适当的访问权限。</p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/5.png"><img title="5" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="5" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/5_thumb.png" width="634" height="466"></a></p> <p>在“权限”选项中，首先禁用继承，并添加 Hyper-V 主机对该目录有完全控制权限，如下图所示：</p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/6.png"><img title="6" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="6" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/6_thumb.png" width="634" height="422"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;再切换到“共享”选项，添加 Hyper-V 主机和 Hyper-V 管理用户有完全控制的共享访问权限！注意：在两 Hyper-V 主机节点测试环境下，请将目录权限和共享权限都改为 everypne 有完全控制权限，否则在以后的 SMB 共享存储的实时迁移过程中会出现错误。</p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/7.png"><img title="7" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="7" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/7_thumb.png" width="634" height="422"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;完成 SMB 的设置后，我们便可以为 Hyper-V 主机上的虚机添加基于共享文件存储的虚拟磁盘（VHD），如下图所示：</p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/8.png"><img title="8" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="8" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/8_thumb.png" width="628" height="474"></a></p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/9.png"><img title="9" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="9" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/9_thumb.png" width="628" height="474"></a></p> <p><a href="http://goxia.maytide.net/ftpupfiles/WS2012_9342/10.png"><img title="10" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="10" src="http://goxia.maytide.net/ftpupfiles/WS2012_9342/10_thumb.png" width="628" height="474"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总结， Hyper-V over SMB 的配置操作其实非常简单，并没有特别需要设置的地方！只需牢记，文件服务器必须是支持 SMB 3.0 的文件服务器，如：Windows Server 2012；Hyper-V 主机必须是 Windows Server 2012 并加入到活动目录（AD），出于安全考虑可以单独创建安全组用于之后的权限分配。之所以要单独拿出来讲一讲，是便于学习下一篇“使用 SMB 共享存储的实时迁移”时，可以给 SMB 共享存储部分有一个参考！</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hyper-V over SMB 部署的详细文档，可以参考：<a title="http://technet.microsoft.com/zh-cn/library/jj134187" href="http://technet.microsoft.com/zh-cn/library/jj134187">http://technet.microsoft.com/zh-cn/library/jj134187</a></p><br/>Tags - <a href="https://sufan.maytide.net/go.php/tags/microsoft/" rel="tag">microsoft</a> , <a href="https://sufan.maytide.net/go.php/tags/windows/" rel="tag">windows</a> , <a href="https://sufan.maytide.net/go.php/tags/server/" rel="tag">server</a> , <a href="https://sufan.maytide.net/go.php/tags/2012/" rel="tag">2012</a> , <a href="https://sufan.maytide.net/go.php/tags/hyper-v/" rel="tag">hyper-v</a> , <a href="https://sufan.maytide.net/go.php/tags/3.0/" rel="tag">3.0</a> , <a href="https://sufan.maytide.net/go.php/tags/smb/" rel="tag">smb</a> , <a href="https://sufan.maytide.net/go.php/tags/vhd/" rel="tag">vhd</a>
]]>
</description>
</item>
</channel>
</rss>