packer-windows icon indicating copy to clipboard operation
packer-windows copied to clipboard

Windows could not apply the unattend answer file's <DiskConfiguration> setting

Open Sureshhm opened this issue 7 years ago • 6 comments

capture Autounattend.log packerlog-Prod.txt

Hi,

We are facing issue while trying to build windows2012 r2 "Windows could not apply the unattend answer file's <DiskConfiguration> setting" if we try to use "pvscsi" as "scsi0.virtualDev" . Build works fine if we use lsisas1068 as "scsi0.virtualDev". Has any one faced this problem? could you please help me to fix this. Find vmx_data setting below from json file also attached answerfile and packer log

"vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "4096", "numvcpus": "1", "scsi0.virtualDev": "pvscsi", "ethernet0.networkName": "VM Network", "virtualhw.version" : "10", "ethernet0.startConnected": "TRUE" }

Sureshhm avatar Feb 15 '18 12:02 Sureshhm

I'm experiencing the exact error message on the server 2016.

jtauke avatar Apr 12 '18 02:04 jtauke

pvscsi drivers are not included by default during the Windows installation, you need to load the drivers from VMware tools in the Autounattend.xml file.

Something like:

<component name="Microsoft-Windows-PnpCustomizationsWinPE" 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">
            <DriverPaths>
                <PathAndCredentials wcm:action="add" wcm:keyValue="A">
                    <Path>b:\</Path>
                </PathAndCredentials>
            </DriverPaths>
</component>

And make sure the VMware tools ISO is mounted to the VM.

madjam002 avatar Apr 25 '18 20:04 madjam002

Hi, I'm facing the same error while installing windows server 2012 R2 and Windows server 2016 in Lenovo new server. can someone help if any idea ....

nandavaramsuda avatar Jul 16 '18 15:07 nandavaramsuda

Have you tried loading the pvscsi drivers like I suggested above?

madjam002 avatar Jul 16 '18 19:07 madjam002

I would simply change the driver in the answerfile like: "scsi0.virtualDev": "lsisas1068"

rkoesoe avatar Oct 02 '18 13:10 rkoesoe

In my case, the issue was due to missing files and read permissions in the metasplotable3/resources path. At first I tried, from BASH: /usr/local/bin/packer build --only=qemu ./packer/templates/windows_2008_r2.json and got the same error message you got.

In the end, the fix was quite simple: /home/fra/metasploitable3/packer/scripts/virtio-win-drivers.sh chmod -R +r /home/fra/metasploitable3/resources/

papinifrancesco avatar Jul 09 '19 13:07 papinifrancesco