bento
bento copied to clipboard
Window Server 2019 in VMware Workstation 17 errors on wrong drive for VMware Tools
Version
Main branch as of February 8th 2023.
Environment
Host operating system: Windows 11 version 10.0.22000.1455 x64. Vagrant for Windows version 2.3.4. Packer for Windows version 1.8.5. VMware Workstation Pro 17.0.1.
Scenario
Creating a VMware based installation of Windows Server 2019.
Steps to Reproduce
packer init -upgrade ./packer_templates
packer build -only=vmware-iso.vm -var-file=os_pkrvars\windows\windows-2019-x86_64.pkrvars.hcl ./packer_templates
Expected Result
A VM containing Windows Server 2019.
Actual Result
==> vmware-iso.vm: https://software-static.download.prss.microsoft.com/pr/download/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso?checksum=sha256%3A549bca46c055157291be6c22a3aaaed8330e78ef4382c99ee82c896426a1cee1 => C:\Users\Mea\Downloads\bento-main\packer_cache\e713134d34c0e6b17c2bb255d974420ddabd776d.iso
==> vmware-iso.vm: Configuring output and export directories...
==> vmware-iso.vm: Creating floppy disk...
vmware-iso.vm: Copying files flatly from floppy_files
vmware-iso.vm: Copying file: ./packer_templates/win_answer_files/2019/Autounattend.xml
vmware-iso.vm: Copying file: ./packer_templates/scripts/windows/base_setup.ps1
vmware-iso.vm: Done copying files from floppy_files
vmware-iso.vm: Collecting paths from floppy_dirs
vmware-iso.vm: Resulting paths from floppy_dirs : []
vmware-iso.vm: Done copying paths from floppy_dirs
vmware-iso.vm: Copying files from floppy_content
vmware-iso.vm: Done copying files from floppy_content
==> vmware-iso.vm: Creating required virtual machine disks
==> vmware-iso.vm: Building and writing VMX file
==> vmware-iso.vm: Starting HTTP server on port 8544
==> vmware-iso.vm: Starting virtual machine...
vmware-iso.vm: The VM will be run headless, without a GUI. If you want to
vmware-iso.vm: view the screen of the VM, connect via VNC with the password "wHJJBXks" to
vmware-iso.vm: vnc://127.0.0.1:5975
==> vmware-iso.vm: Connecting to VNC...
==> vmware-iso.vm: Waiting 1m0s for boot...
==> vmware-iso.vm: Typing the boot command over VNC...
==> vmware-iso.vm: Waiting for WinRM to become available...
vmware-iso.vm: WinRM connected.
==> vmware-iso.vm: Connected to WinRM!
==> vmware-iso.vm: Uploading the 'windows' VMware Tools
==> vmware-iso.vm: Provisioning with Powershell...
==> vmware-iso.vm: Provisioning with powershell script: ./packer_templates/scripts/windows/disable-windows-updates.ps1
==> vmware-iso.vm: Provisioning with powershell script: ./packer_templates/scripts/windows/disable-windows-defender.ps1
vmware-iso.vm:
vmware-iso.vm: Success Restart Needed Exit Code Feature Result
vmware-iso.vm: ------- -------------- --------- --------------
vmware-iso.vm: True Yes SuccessRest... {Windows Defender Antivirus}
vmware-iso.vm: WARNING: You must restart this server to finish the removal process.
==> vmware-iso.vm: Provisioning with powershell script: ./packer_templates/scripts/windows/remove-one-drive.ps1
==> vmware-iso.vm: Provisioning with powershell script: ./packer_templates/scripts/windows/virtualbox-prevent-vboxsrv-resolution-delay.ps1
==> vmware-iso.vm: Provisioning with powershell script: ./packer_templates/scripts/windows/provision-guest-tools-qemu-kvm.ps1
vmware-iso.vm: Not QEMU machine exiting
==> vmware-iso.vm: Provisioning with powershell script: ./packer_templates/scripts/windows/provision-vmwaretools.ps1
vmware-iso.vm: Installing VMware Tools...
vmware-iso.vm:
vmware-iso.vm: ERROR: The term 'E:\setup64.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
vmware-iso.vm: ERROR: at <ScriptBlock>, C:\Windows\Temp\script-63e39975-876f-ef0d-75fd-aaf882b3d423.ps1: line 39
vmware-iso.vm: ERROR: at <ScriptBlock>, <No file>: line 1
vmware-iso.vm: ERROR: at <ScriptBlock>, <No file>: line 1
vmware-iso.vm: Sleeping for 60m to give you time to look around the virtual machine before self-destruction...
I looked into the VM and the VMware Tools were available from drive D:, not drive E:. So E:\setup64.exe
needs to be D:\setup64.exe
.
I do plan to get to this, but have a lot of build issues for several boxes to figure out. Suggest using the old json templates in the old branch until this is fixed.
Thanks. I removed the installation of the VMware Tools from the config and re-ran it, which succeeded. Afterwards, I manually added the VMware Tools. Not a real solution, but nevertheless, good enuf for me.
Yes that's a known issue, I haven't had the chance to diagnose and fix it yet but will get to it eventually.