1、为虚拟机分配使用的内存在Hyper-V Manager中,选中一个VM,点击Settings,配置VM使用的内存资源。使用动态内存时,为虚拟机分配内存,Startup内存是10GB,最小内存10GB,最大内存20GB,如下图所示:
2、为VM加域选中"This PC",查看计算机的属性“Properties”,在“System Properties”窗体中,点击“Change settings”,如下图所示:
3、在Computer Name Tab中,点击“Change”按钮,如下图所示:
4、输入新的Computer name,在“Member of” 选项中,选择Domain,输入域名,如下图所示:
5、授予用户管理员权限,新建本机用户(Local Users)本机用户的创建和组成员的管理都是在Computer Management中进行的,从“Local Users and Groups”中创建新的本地用户,并将用户增加到相应的组中。在“Users”中,系统自动创建用户:Administrator;在“Groups”中,系统预定义了组,Administrators 组是系统的管理员组,系统用户Administrator自动加入到组:Administrators中。在Server Manager 中,从Tools下拉菜单中选择“Computer Management”,打开本地计算机管理窗口,如下图所示:
6、依次点击:“System Tools"->“Local Users and Groups”->"Groups",选择管理员组(Administrators),为该VM添加管理员,如下图所示:
7、点击“Users”,为VM新建本地用户,用户名为:admin,并输入密码,如下图所示:
8、将本地用户admin添加到管理员组(Administrators)中,如下图所示:
9、设置远程桌面连接选中"This PC",查看计算机的属性“Properties”,在“System Properties”窗体中,点击“Remote settings”,如下图所示:
10、在"Remote" Tab中,选择“Allow remote connections to this computer”,并勾选“Allow connections only from computers...”,如下图所示:
11、配置VM中的SQL Server实例配置SQL Server实例使用的内存打开SQL Server实例的属性,选择Memory Tab,配置SQL Server使用的最小内存4GB,最大内存10GB,如下图所示:
12、允许远程连接到SQL Server实例step1,打开SQL Server实例的属性,选择Connections Tab,勾选“Allow remote connections to this server”,如下图所示:
13、打开防火墙依次打开:控制面板(Control pane)->系统和安全(System and Security)->Windows防火墙(Windows Firewall),如下图所示:
14、允许TCP 1433端口访问本机点击“Advanced settings”,创建Inbound Rules,允许TCP 1433端口访问本机,并未该Inbound Rule命名即可,如下图所示: