sysprep을 사용한 서버 복제
요구 사항
클론된 가상 머신을 사용할 때, 고유한 TSplus Remote Access 설치를 보장하고 라이센스 문제를 피하기 위해 컴퓨터 이름과 디스크 볼륨 ID를 수정하는 것이 중요합니다.
컴퓨터 이름 고려사항
컴퓨터 이름은 이미지 자체의 Windows 레지스트리에 저장됩니다. 이미지를 적용하기 전에 수정하면 Windows 부팅 시 Sysprep에 의해 덮어씌워집니다. 그러나 이름을 미리 정의할 수 있습니다.
Unattended.xml
답변 파일. 보기
Microsoft 문서
자세한 내용은.
컴퓨터 이름을 설정하려면 다음 섹션을 내부에 추가하십시오.
마이크로소프트-윈도우-셸-설정
:
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ComputerName>%COMPUTERNAME%ComputerName> component>
볼륨 ID 고려사항
볼륨 ID는 디스크 파티션과 연결되어 있으며, OS 이미지와는 관련이 없습니다. 이미지를 적용하기 전에 변경할 수 있으며, 변경 사항은 유지됩니다. 사용하십시오.
volumeid.exe
Sysinternals에서 제공됨
Microsoft Sysinternals
윈도우가 부팅되기 전에.
배포 단계
새 가상 머신을 sysprepped 이미지에서 배포할 때, Windows는 첫 부팅 시 Out-Of-Box Experience (OOBE)에 들어가 구성 설정을 요청합니다.
배포를 위한 권장 단계:
- WinPE로 부팅 – 시스템을 Windows로 부팅하지 않고 준비합니다.
- 볼륨 ID 설정 – 이미지를 적용하기 전에 변경하여 지속되도록 하세요.
-
sysprepped 이미지를 배포하십시오
– DISM을 사용하여 이미지를 적용합니다.
C:. - 컴퓨터 이름을 오프라인으로 설정 – 마운트된 이미지 내에서 레지스트리를 편집합니다.
-
복사한
Unattended.xml파일 – OOBE 구성을 자동화합니다. 이 파일은 배포 전에 스크립트를 사용하여 동적으로 수정할 수 있습니다. - 첫 부팅 스크립트 생성 – 최종 구성을 단 한 번의 재부팅으로 완료하십시오.
- Windows로 재부팅 – Windows는 지정된 구성을 사용하여 최종화됩니다.
- 원격 액세스 라이센스 재설정 – 다음 명령을 실행하십시오:
AdminTool.exe /license /reset
이것은 라이센스를 재설정하고 새로운 라이센스를 적용합니다.
배포 스크립트
아래에 관련된 WinPE 배포 스크립트를 찾으십시오.
<# Define variables #> $ImagePath = "D:\Images\Windows.wim" # Path to your sysprepped image $ApplyDrive = "C:" # Target drive for deployment $ComputerName = "REMOTE ACCESS-SERVER-" + (Get-Random -Minimum 1000 -Maximum 9999) # Generate a random name (naive implementation) $VolumeID = "1234-ABCD" # Desired Volume Serial Number $UnattendFile = "D:\Unattended.xml" # Path to the unattended answer file
Write-Host "=== Windows Deployment Automation ==="
<# 1️. Set Volume ID before applying the image #> Write-Host "Setting Volume ID..." Start-Process -NoNewWindow -Wait -FilePath "volumeid.exe" -ArgumentList "$ApplyDrive $VolumeID"
<# 2️. Apply the Sysprepped Windows image #> Write-Host "Applying Windows Image..." dism /apply-image /imagefile:$ImagePath /index:1 /applydir:$ApplyDrive
<# 3️. Load Registry Offline to Set Computer Name #> Write-Host "Modifying Registry to Set Computer Name..." reg load HKLM\TempSys $ApplyDrive\Windows\System32\Config\SYSTEM reg add "HKLM\TempSys\ControlSet001\Control\ComputerName\ComputerName" /v ComputerName /t REG_SZ /d "$ComputerName" /f reg unload HKLM\TempSys
<# 4️. Ensure Unattended Setup is Used #> Write-Host "Copying Unattended File..." Copy-Item -Path $UnattendFile -Destination "$ApplyDrive\Windows\Panther\Unattended.xml" -Force
<# 5️. Set the First Boot Script for Final Configurations #> Write-Host "Creating First Boot Script..." $FirstBootScript = @" Write-Host "Finalizing Configuration..." Rename-Computer -NewName "$ComputerName" -Force Restart-Computer -Force "@ Set-Content -Path "$ApplyDrive\Windows\Setup\Scripts\SetupComplete.cmd" -Value $FirstBootScript -Encoding ASCII
Write-Host "Deployment Complete! Rebooting into Windows..." Write-Host "===============================================" Write-Host " Computer Name: $ComputerName" Write-Host " Volume ID: $VolumeID" Write-Host " Image Applied to: $ApplyDrive" Write-Host "==============================================="
<# Reboot into Windows #> wpeutil reboot
라이센스 활성화
배포 후 라이센스를 활성화하면 가상 머신에 대한 새로운 컴퓨터 ID가 생성됩니다. 이 컴퓨터 ID는 머신이 평가판 또는 라이센스 활성화를 요청할 때 라이센스 포털에 의해 생성됩니다. 클론된 가상 머신의 경우 라이센스 활성화가 필수입니다. 활성화 키 또는 볼륨 라이센스 키를 사용하십시오. 오프라인 설정은 허용되지 않습니다 보안 문제로 인해. 자세한 활성화 단계는 다음을 참조하십시오. TSplus 명령어 목록 .
결론
이 가이드는 TSplus Remote Access로 클론된 가상 머신을 배포할 때의 주요 고려 사항을 설명합니다. 시스템을 올바르게 구성하고 라이센스를 부여하기 위한 필수 단계를 제공하며, 귀하의 필요와 요구 사항에 맞게 조정되어야 합니다.