Windows Server 2012 Essentials を自動応答ファイルで無人インストールする

WSEをヘッドレスシステムにインストールする場合、自動応答ファイルを用意する必要があります。WHS2011ではcfg.iniを用意しましたが、Windows Server 2012 Essentails では完全な無人インストールを実現するには、Windows Server 2012 部分のインストールにautounattend.xml、Windows Server 2012 Essentials 固有の設定を行うのにcfg.ini と、2つのファイルを用意する必要があります。用意したautounattend.xmlとcfg.iniをUSBメモリーのルートに保存しインストール時に読み込ませることで、自動インストールが可能になります。

autounattend.xmlの設定

autounattend.xml では、ディスクのフォーマット(パーティションのサイズ)、サーバー名、プロダクトキーを指定します。以下の例では、システム予約領域を350MB、残りを全て一つのパーティションとして構成しています。autounattend.xmlの作成は、http://derek858.blogspot.jp/2012/07/windows-server-2012-unattended.htmlを参考にしました。
autoanattend.xmlで設定する administratorのパスワードは一時的にしか利用しないので、英数混在で8文字以上の任意のパスワードを設定します。

<?xml version=”1.0″ encoding=”UTF-8″?>
<unattend xmlns=”urn:schemas-microsoft-com:unattend”>
<settings pass=”windowsPE”>
<component name=”Microsoft-Windows-International-Core-WinPE” 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”>
<SetupUILanguage>
<UILanguage>ja-JP</UILanguage>
</SetupUILanguage>
<InputLocale>ja-JP</InputLocale>
<SystemLocale>ja-JP</SystemLocale>
<UILanguage>ja-JP</UILanguage>
<UserLocale>ja-JP</UserLocale>
</component>
<component name=”Microsoft-Windows-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”>
<DiskConfiguration>
<Disk wcm:action=”add”>
<CreatePartitions>
      <CreatePartition wcm:action=”add”>
<Order>1</Order>
<Size>350</Size>
<Type>Primary</Type>
</CreatePartition>
<CreatePartition wcm:action=”add”>
<Order>2</Order>
<Extend>true</Extend>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
                    <ModifyPartitions>
<ModifyPartition wcm:action=”add”>
<Active>true</Active>
<Format>NTFS</Format>
<Label>Boot</Label>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action=”add”>
<Format>NTFS</Format>
<Label>SYSTEM</Label>
<Order>2</Order>
<PartitionID>2</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action=”add”>
<Value>Windows Server 2012 Essentials</Value>
<Key>/IMAGE/NAME</Key>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<Key></Key>
<WillShowUI>OnError</WillShowUI>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>-</FullName>
<Organization>-</Organization>
</UserData>
</component>
</settings>
<settings pass=”specialize”>
<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”>
<ProductKey>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</ProductKey>
<ComputerName><サーバー名></ComputerName>
<RegisteredOrganization>-</RegisteredOrganization>
<TimeZone>Tokyo Standard Time</TimeZone>
</component>
</settings>
<settings pass=”oobeSystem”>
<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”>
<AutoLogon>
<Password>
<Value>Password2012</Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>2</LogonCount>
<Username>administrator</Username>
</AutoLogon>
<UserAccounts>
<AdministratorPassword>
<Value>Password2012</Value>
<PlainText>true</PlainText></AdministratorPassword>
<RegisteredOwner>-</RegisteredOwner>
<RegisteredOrganization>-</RegisteredOrganization>
</component>
</settings>
<cpi:offlineImage cpi:source=”wim:j:/sources/install.wim#Windows Server 2012 Essentials” xmlns:cpi=”urn:schemas-microsoft-com:cpi” />
</unattend>

cfg.ini の設定

cfg.iniでは、WSE固有の設定値を指定します。以下は例ですが、以下の例以外にも指定できるパラメーターがあります。詳細は、http://technet.microsoft.com/en-us/library/jj200150を参照してください。

[InitialConfiguration]
;Optional, display language can only be one of the installed language
Language=ja-JP
;Optional, The name of a script that runs after setupComplete.cmd but before the initial configuration begins.
;Optional
Locale=ja-JP
;Optional
;Country=
;Optional
Keyboard=0411:00000411
AcceptEula=true
;This is only required on a server where an OEM EULA has been specified
;by using the OOBE.xml file
;Optional. Example My Company Name
CompanyName=<会社名>
; 例 Server
ServerName=<サーバー名>
; 例 Domain
NetbiosName=<NetBIOS名>
; 例 domain.local
DNSName=<ドメイン名>
; 管理者のユーザー名
UserName=<管理者のユーザー名>
;管理者のパスワード 8文字以上で英数混在
PlainTextPassword=<管理者のパスワード>
; 標準ユーザーのユーザー名
StdUserName=<標準ユーザーのユーザー名>
;標準ユーザーのパスワード 8文字以上で英数混在
StdUserPlainTextPassword=<標準ユーザーのパスワード>
;自動更新のポリシー。インストール時は Noneにしておくとインストールが早くするが、インストール後ダッシュボードから自動に設定変更を推奨
Settings=None

コメント

タイトルとURLをコピーしました