mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-14 06:17:22 +00:00
added a procedure to expand disk size
This commit is contained in:
parent
99c5585094
commit
cbacd73a46
@ -31,28 +31,9 @@ Description here.
|
|||||||
|
|
||||||
## Install prerequisites
|
## Install prerequisites
|
||||||
|
|
||||||
1. On SRV1, type the following command at an elevated Windows PowerShell prompt on SRV1 to enable .NET Framework 3.5:
|
1. Before installing System Center Configuration Manager, we must install prerequisite services and features. Type the following commands at an elevated Windows PowerShell prompt on SRV1:
|
||||||
```
|
|
||||||
Add-WindowsFeature NET-Framework-Core
|
|
||||||
```
|
|
||||||
2.
|
|
||||||
|
|
||||||
## Install System Center Configuration Manager
|
|
||||||
|
|
||||||
|
|
||||||
2. On SRV1, temporarily disable IE Enhanced Security Configuration for Administrators by typing the following commands at an elevated Windows PowerShell prompt:
|
|
||||||
```
|
|
||||||
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
|
|
||||||
Set-ItemProperty -Path $AdminKey -Name “IsInstalled” -Value 0
|
|
||||||
Stop-Process -Name Explorer
|
|
||||||
```
|
|
||||||
3. Download [System Center Configuration Manager and Endpoint Protection](https://www.microsoft.com/en-us/evalcenter/evaluate-system-center-configuration-manager-and-endpoint-protection) on SRV1, double-click the file, enter **C:\configmgr** for **Unzip to folder**, and click **Unzip**. The directory will be automatically created. Click **OK** and then close the WinZip Self-Extractor dialog box when finished.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
New-Item -Path c:\setupdl -ItemType Directory
|
|
||||||
New-SmbShare -Name SetupDL$ -Path C:\setupdl -ChangeAccess EVERYONE
|
|
||||||
cmd /c c:\configmgr\SMSSETUP\BIN\X64\setupdl.exe "\\greglin-xps\SetupDL$"
|
|
||||||
|
|
||||||
Install-WindowsFeature Web-Windows-Auth
|
Install-WindowsFeature Web-Windows-Auth
|
||||||
Install-WindowsFeature Web-ISAPI-Ext
|
Install-WindowsFeature Web-ISAPI-Ext
|
||||||
Install-WindowsFeature Web-Metabase
|
Install-WindowsFeature Web-Metabase
|
||||||
@ -64,9 +45,50 @@ Install-WindowsFeature Web-Asp-Net
|
|||||||
Install-WindowsFeature Web-Asp-Net45
|
Install-WindowsFeature Web-Asp-Net45
|
||||||
Install-WindowsFeature NET-HTTP-Activation
|
Install-WindowsFeature NET-HTTP-Activation
|
||||||
Install-WindowsFeature NET-Non-HTTP-Activ
|
Install-WindowsFeature NET-Non-HTTP-Activ
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Download [SQL Server 2012 SP2](https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2014-sp2) from the Microsoft Evaluation Center as an .ISO file on the Hyper-V host computer. Save the file to the **C:\VHD** directory.
|
||||||
|
3. When you have downloaded the file **SQLServer2014SP2-FullSlipstream-x64-ENU.iso** and placed it in the C:\VHD directory, type the following command at an elevated Windows PowerShell prompt on the Hyper-V host. This command mounts the .ISO file to the DVD drive on SRV1:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Set-VMDvdDrive -VMName SRV1 -Path c:\VHD\SQLServer2014SP2-FullSlipstream-x64-ENU.iso
|
||||||
|
```
|
||||||
|
4. Type the following command at an elevated Windows PowerShell prompt on SRV1 to install SQL Server 2012 SP2:
|
||||||
|
|
||||||
|
```
|
||||||
|
D:\setup.exe /q /ACTION=Install /ERRORREPORTING="False" /FEATURES=SQLENGINE,RS,IS,SSMS,TOOLS,ADV_SSMS,CONN /INSTANCENAME=MSSQLSERVER /INSTANCEDIR="C:\Program Files\Microsoft SQL Server" /SQLSVCACCOUNT="NT AUTHORITY\System" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /SQLSVCSTARTUPTYPE=Automatic /AGTSVCACCOUNT="NT AUTHORITY\SYSTEM" /AGTSVCSTARTUPTYPE=Automatic /RSSVCACCOUNT="NT AUTHORITY\System" /RSSVCSTARTUPTYPE=Automatic /ISSVCACCOUNT="NT AUTHORITY\System" /ISSVCSTARTUPTYPE=Disabled /ASCOLLATION="Latin1_General_CI_AS" /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS" /TCPENABLED="1" /NPENABLED="1" /IAcceptSQLServerLicenseTerms
|
||||||
|
```
|
||||||
|
Installation might take several minutes. When installation is complete, the following output will be displayed:
|
||||||
|
|
||||||
|
```
|
||||||
|
Microsoft (R) SQL Server 2014 12.00.5000.00
|
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
|
||||||
|
Microsoft (R) .NET Framework CasPol 2.0.50727.7905
|
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
|
||||||
|
Success
|
||||||
|
Microsoft (R) .NET Framework CasPol 2.0.50727.7905
|
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
|
||||||
|
Success
|
||||||
|
```
|
||||||
|
5. On SRV1, temporarily disable IE Enhanced Security Configuration for Administrators by typing the following commands at an elevated Windows PowerShell prompt:
|
||||||
|
```
|
||||||
|
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
|
||||||
|
Set-ItemProperty -Path $AdminKey -Name “IsInstalled” -Value 0
|
||||||
|
Stop-Process -Name Explorer
|
||||||
|
```
|
||||||
|
6. Download and install the latest [Windows Assessment and Deployment Kit (ADK)](https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit) on SRV1 using the default installation settings. The current version is the ADK for Windows 10, version 1607. Installation might require several minutes to acquire all components.
|
||||||
|
|
||||||
|
## Install System Center Configuration Manager
|
||||||
|
|
||||||
|
1. Download [System Center Configuration Manager and Endpoint Protection](https://www.microsoft.com/en-us/evalcenter/evaluate-system-center-configuration-manager-and-endpoint-protection) on SRV1, double-click the file, enter **C:\configmgr** for **Unzip to folder**, and click **Unzip**. The C:\configmgr directory will be automatically created. Click **OK** and then close the **WinZip Self-Extractor** dialog box when finished.
|
||||||
|
2. Type the following command at an elevated Windows PowerShell prompt on SRV1:
|
||||||
|
|
||||||
|
```
|
||||||
|
cmd /c c:\configmgr\SMSSETUP\BIN\X64\setupdl.exe
|
||||||
|
```
|
||||||
|
|
||||||
OK this is what I need to go with:
|
OK this is what I need to go with:
|
||||||
https://gallery.technet.microsoft.com/ConfigMgr-2012-R2-e52919cd
|
https://gallery.technet.microsoft.com/ConfigMgr-2012-R2-e52919cd
|
||||||
@ -75,20 +97,8 @@ Configure it as a primary site, add state migration point, distribution point, e
|
|||||||
|
|
||||||
After running it I need to install the ADK, and WDS
|
After running it I need to install the ADK, and WDS
|
||||||
|
|
||||||
To configure SQL I think I have to download SQLEXPR_x64_ENU which is extracted and then run setup to load the install wizard
|
New-Item -Path c:\setupdl -ItemType Directory
|
||||||
This defaults to NT Service\MSSQL$SQLEXPRESS
|
New-SmbShare -Name SetupDL$ -Path C:\setupdl -ChangeAccess EVERYONE
|
||||||
Windows authentication mode
|
|
||||||
|
|
||||||
configure SQL - using SQL server installation center (?)
|
|
||||||
|
|
||||||
Maybe use a configuration file
|
|
||||||
Maybe use:
|
|
||||||
|
|
||||||
Setup.exe /qs /ACTION=Install /FEATURES=SQLEngine,Replication /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="contoso\administrator" /SQLSVCPASSWORD="pass@word1" /SQLSYSADMINACCOUNTS="contoso\administrator" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /UpdateEnabled=True /IACCEPTSQLSERVERLICENSETERMS
|
|
||||||
|
|
||||||
.\Setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS /SQLSYSADMINACCOUNTS="contoso\administrator" <--- this worked but I probably just need to add /sqlcollation to the first command (install)
|
|
||||||
|
|
||||||
& sc.exe config "$servicename" obj= "[$domain\$username]" password= "[$password] <--- not this
|
|
||||||
|
|
||||||
then run SCCM setup.exe
|
then run SCCM setup.exe
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ The following topics and procedures are provided in this guide:
|
|||||||
- [Verify support and install Hyper-V](#verify-support-and-install-hyper-v): Verify that installation of Hyper-V is supported, and install the Hyper-V server role.
|
- [Verify support and install Hyper-V](#verify-support-and-install-hyper-v): Verify that installation of Hyper-V is supported, and install the Hyper-V server role.
|
||||||
- [Download VHD and ISO files](#download-vhd-and-iso-files): Download evaluation versions of Windows Server 2012 R2 and Windows 10 and prepare these files to be used on the Hyper-V host.
|
- [Download VHD and ISO files](#download-vhd-and-iso-files): Download evaluation versions of Windows Server 2012 R2 and Windows 10 and prepare these files to be used on the Hyper-V host.
|
||||||
- [Convert PC to VHD](#convert-pc-to-vhd): Convert a physical computer on your network to a VHDX file and prepare it to be used on the Hyper-V host.
|
- [Convert PC to VHD](#convert-pc-to-vhd): Convert a physical computer on your network to a VHDX file and prepare it to be used on the Hyper-V host.
|
||||||
|
- [Resize VHD](#resize-vhd): Increase the storage capacity for one of the Windows Server VMs.
|
||||||
- [Configure Hyper-V](#configure-hyper-v): Create virtual switches, determine available RAM for virtual machines, and add virtual machines.
|
- [Configure Hyper-V](#configure-hyper-v): Create virtual switches, determine available RAM for virtual machines, and add virtual machines.
|
||||||
- [Configure VHDs](#configure-vhds): Start virtual machines and configure all services and settings.
|
- [Configure VHDs](#configure-vhds): Start virtual machines and configure all services and settings.
|
||||||
|
|
||||||
@ -129,6 +130,8 @@ The lab architecture is summarized in the following diagram:
|
|||||||
|
|
||||||
[Verify support and install Hyper-V](#verify-support-and-install-hyper-v)<BR>
|
[Verify support and install Hyper-V](#verify-support-and-install-hyper-v)<BR>
|
||||||
[Download VHD and ISO files](#download-vhd-and-iso-files)<BR>
|
[Download VHD and ISO files](#download-vhd-and-iso-files)<BR>
|
||||||
|
[Convert PC to VHD](#convert-pc-to-vhd)<BR>
|
||||||
|
[Resize VHD](#resize-vhd)<BR>
|
||||||
[Configure Hyper-V](#configure-hyper-v)<BR>
|
[Configure Hyper-V](#configure-hyper-v)<BR>
|
||||||
[Convert PC to VHD](#convert-pc-to-vhd)<BR>
|
[Convert PC to VHD](#convert-pc-to-vhd)<BR>
|
||||||
[Configure VHDs](#configure-vhds)<BR>
|
[Configure VHDs](#configure-vhds)<BR>
|
||||||
@ -244,6 +247,40 @@ The lab architecture is summarized in the following diagram:
|
|||||||
w10-enterprise.iso
|
w10-enterprise.iso
|
||||||
w7.VHDX
|
w7.VHDX
|
||||||
```
|
```
|
||||||
|
### Resize VHD
|
||||||
|
|
||||||
|
The second Windows Server 2012 R2 VHD needs to be expanded in size from 40GB to 60GB to support imaging tools.
|
||||||
|
|
||||||
|
1. To add available space for the partition, type the following commands at an elevated Windows PowerShell prompt on the Hyper-V host:
|
||||||
|
|
||||||
|
```
|
||||||
|
Resize-VHD –Path c:\VHD\2012R2-poc-2.vhd –SizeBytes 60GB
|
||||||
|
Mount-VHD –Path c:\VHD\2012R2-poc-2.vhd -passthru | Get-Disk | Get-Partition | Get-Volume
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Note the drive letter of the mounted VHD in the output of the second command. In the example below, the drive letter of the mounted VHD is E:
|
||||||
|
|
||||||
|
```
|
||||||
|
DriveLetter FileSystemLabel FileSystem DriveType HealthStatus OperationalStatus SizeRemaining Size
|
||||||
|
----------- --------------- ---------- --------- ------------ ----------------- ------------- ----
|
||||||
|
E NTFS Fixed Healthy OK 32.66 GB 40 GB
|
||||||
|
```
|
||||||
|
|
||||||
|
If the Hyper-V host you are using has a single hard drive assigned the letter C, and a DVD drive assigned the letter D, then drive E is probably also assigned to the mounted VHD as shown above. The size of the partition for drive E is still 40 GB, but since the VHD was resized to 60 GB in the first step, there is an additional 20 GB of unallocated space available. This additional space will be allocated in the following step.
|
||||||
|
|
||||||
|
3. Replace **E** with the drive letter displayed in the previous command output, and type the following at an elevated Windows PowerShell prompt:
|
||||||
|
|
||||||
|
```
|
||||||
|
$MaxSize = (Get-PartitionSupportedSize -DriveLetter E).SizeMax
|
||||||
|
Resize-Partition -DriveLetter E -Size $MaxSize
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Verify that the mounted VHD drive is resized to 60 GB, and then dismount the drive:
|
||||||
|
|
||||||
|
```
|
||||||
|
(Get-Disk -FriendlyName "Msft Virtual Disk").size/1GB
|
||||||
|
Dismount-VHD –Path c:\VHD\2012R2-poc-2.vhd
|
||||||
|
```
|
||||||
|
|
||||||
### Configure Hyper-V
|
### Configure Hyper-V
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user