Closed shortstack closed 5 years ago
I can confirm, having the same issue with Windows 2012r2 and Windows 10. I can't bypass the error, tried several Autounattend.xml modifications.
i was successful with windows 7 after i removed "disk_controller_type": "pvscsi"
You are using "disk_controller_type": "pvscsi" which drivers are not available by default you have to provide them in Autounattend.xml:
B:\
And mount them from datastore:
"floppy_img_path": "[datastore1] ISO/vmtools/pvscsi-Windows8.flp"
Correct, the floppies correctly placed on the datastore made it work. Deleting the "disk_controller_type": "pvscsi" in my case did not help.
The suggestion above is correct. If you want using paravirtual SCSI type, external drivers should be provided on floppy
On the latest version of VMWare Tools (tested on 10.3.10), we need to specify the folder on the floppy as well. It seems that Windows doesn't look on the floppy directories recursively. So the autounattended.xml should look like this:
<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">
<!-- pvscsi-Windows8.flp -->
<Path>B:\AMD64\</Path>
</PathAndCredentials>
</DriverPaths>
</component>
I have a new vSphere 6.7 U3 setup in my lab and the vmimages folder did not actually contain any .flp files. Got impatient looking for the files elsewhere and ended up just mounting the VMware Tools ISO on my local machine (D:) and sftp'd the driver files from D:\Program Files\VMware\VMware Tools\Drivers\pvscsi\Win8\amd64 into the setup folder under the project working directory. The same directory defined for the "floppy_files" in the packer build config. This directory is mounted as A:\ in the VM.
"floppy_files": [
"{{template_dir}}/setup/"
Then set the path in the Autounattended.xml for the driver to A:\
<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">
<!-- pvscsi-Windows8.flp -->
<Path>A:\</Path>
</PathAndCredentials>
</DriverPaths>
</component>
The build completed without issue.
I ran into this issue as well, not really understanding it it took me a lot of time to read through threads like this one to understand how it applied to myself. This thread is specifically about Windows 7, but searching in Google for Windows 10 brings this up as a primary result so I'm sharing my personal findings here for future searchers.
I'm still not sure why vSphere presents the hardware differently from other virtualization software (such as VirtualBox) and requires a driver installation first, but it does. I had the most success specifying the controller type as pvscsi
disk_controller_type = [
"pvscsi",
]
With the Windows10 installation ISO as the first virtual CD, I also needed to find and attach our VMWare tools ISO as a second CD (typically found at [datastore1] ISO/VMware Tools/10.2.0/windows.iso
, ours was in a different location [] /usr/lib/vmware/isoimages/windows.iso
).
iso_paths = [
"[Network-Install] Media/Microsoft/Win10/en_windows_10_business_editions_version_2004_updated_oct_2020_x64_dvd_732b2088.iso",
"[] /usr/lib/vmware/isoimages/windows.iso",
]
To account for both x86 and x64 drivers, we need to add two sections to the Autounattend.xml file
<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>E:\Program Files\VMware\VMware Tools\Drivers\pvscsi\Win8\amd64</Path>
</PathAndCredentials>
</DriverPaths>
</component>
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="x86" 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>E:\Program Files\VMware\VMware Tools\Drivers\pvscsi\Win8\i386</Path>
</PathAndCredentials>
</DriverPaths>
</component>
With these individual pieces brought together I was able to get Windows up and running
vSphere 6.7.0 Packer 1.3.1 packer-builder-vsphere 2.0
Cloned the repo, trying to build Windows 7 via vsphere-iso
Getting "Windows could not apply the unattend answer file's"
JSON file:
Autounattend.xml:
Packer output:
Hangs here ^ because unattend error shows up