Windows cloud not parse or process unattend answer file for pass [specialize]

Khi bạn Build VM Template trong SCVMM, sau khi chạy SysPrep, bạn dùng template này để tạo mớI VM thì bị lỗi:

“Windows could not parse or process the unattend answer file for pass [specialize]. The settings specified in the answer file cannot be applied. The error was detected while processing settings for component [Microsoft-Windows-Shell-Setup]“

clip_image001

 

Nguyên nhân

Có nhiều nguyên nhân dẫn lỗI trên, tuy nhiên thông thường là:

  • Product Key không đúng
  • Trình điều khiển thiết bị không phù hợp (Invalid Device Drivers)
  • Tên máy tính không hợp lệ (Invalid Computer Names)

Giải pháp:

Để biết chính, bạn cần mở file log(c:\Windows\Panther\unattendGC\setupact.log) để xem, cách thực hiện:

TạI màn hình thông báo lỗI, bạn nhấn tổ hợp phím Shift + F10, thí dụ trường hợp của tôi:

image

 

Trên VMM Server, bạn chạy script sau để gán Product Key cho VM template.

#region

#———————————————————-
# The content of this PowerShell script is provided AS IS;
# with no warranties, and confers no rights.
#
# Copyright 2014 Yung Chou.
#———————————————————-

# This is a sample script to prep vhd and vhdx in vmm library shares
# for Windows Azure Pack (WAP) gallery items

# Specific settings of OS, fmaily name, release and tags of the vhd* file
# associated with a gallery item published in wap must be set according to
# what is stated in the readme file of a particular gallery resource package.
#
# For detailed instructions on installing gallery resources, see
#
http://aka.ms/WAPGalleryResource.

#endregion

Get-VMMServer wapvmm

$vhds = Get-SCVirtualHardDisk | where {$_.Name –like “ws2012Base*.vhd*”}

Write-Host ‘Settins prior to the updates: ‘ -f Black -b Green
$vhds | select Name, FamilyName, OperatingSystem, Release, Tag

$WS2012Datacenter = Get-SCOperatingSystem | where { $_.name –eq ’64-bit edition of Windows Server 2012 Datacenter’ }

$familyName = ‘Windows Server 2012 Datacenter’
$release    = ‘1.0.0.0’
$prodKey    = ‘00000-00000-00000-00000-00000’     # optional field

foreach ($vhd in $vhds) {

    $tags = $vhd.Tag

    if ( $tags -cnotcontains ‘WindowsServer2012’ ) { $tags += @(‘WindowsServer2012’) }
    if ( $tags -cnotcontains ‘R1’                ) { $tags += @(‘R1’)                }
    if ( $tags -cnotcontains ‘.NET3.5’           ) { $tags += @(‘.NET3.5’)           }
    if ( $tags -cnotcontains ‘.NET4.5’           ) { $tags += @(‘.NET4.5’)           }

    Set-scvirtualharddisk `
        –virtualharddisk  $vhd `
        –OperatingSystem  $WS2012Datacenter `
        –FamilyName       $familyName `
        –Release          $release `
        -ProductKey       $prodKey `
        –Tag              $tags

}

Write-Host ‘Settins after the updates: ‘ -f Black -b Green
$vhds | select Name, FamilyName, OperatingSystem, Release, Tag

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s