Skip to content
This repository was archived by the owner on Jul 11, 2026. It is now read-only.
This repository was archived by the owner on Jul 11, 2026. It is now read-only.

Windows 10 -- Performance issues when uploading VMWare tools due to Windows Defender's Realtime Protection #161

Description

@GeoffWilliams

Using VMWare Workstation 15, packer 1.3.1, host ubuntu 18.04 I get Error uploading VMware Tools. The VM can be seen grinding away at 100% CPU and the upload eventually times out:

2018/10/27 12:10:15 packer: 2018/10/27 12:10:15 [INFO] starting remote command: powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA
2018/10/27 12:10:15 packer: 2018/10/27 12:10:15 [INFO] command 'powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA' exited with code: 0
    vmware-iso: WinRM connected.
    vmware-iso: #< CLIXML
2018/10/27 12:10:15 packer: 2018/10/27 12:10:15 Connected to machine
    vmware-iso: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><Obj S="progress" RefId="1"><TNRef RefId="0" /><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>
==> vmware-iso: Connected to WinRM!
2018/10/27 12:10:15 packer: 2018/10/27 12:10:15 Uploading file to 'windows.iso'
==> vmware-iso: Uploading the 'windows' VMware Tools
==> vmware-iso: Error uploading VMware Tools: Error uploading file to $env:TEMP\winrmcp-b5741928-c52e-4768-6fc2-031307baab9a.tmp: upload operation returned code=3221225794
2018/10/27 12:20:01 ui error: ==> vmware-iso: Error uploading VMware Tools: Error uploading file to $env:TEMP\winrmcp-b5741928-c52e-4768-6fc2-031307baab9a.tmp: upload operation returned code=3221225794
2018/10/27 12:20:01 packer: 2018/10/27 12:20:01 Executing: /usr/bin/vmrun -T ws list
2018/10/27 12:20:01 packer: 2018/10/27 12:20:01 stdout: Total running VMs: 1
2018/10/27 12:20:01 packer: /home/geoff/github/boxcutter_windows/output-vmware-iso/eval-win10x64-enterprise.vmx
2018/10/27 12:20:01 packer: 2018/10/27 12:20:01 stderr:
==> vmware-iso: Stopping virtual machine...
2018/10/27 12:20:01 packer: 2018/10/27 12:20:01 Executing: /usr/bin/vmrun -T ws stop output-vmware-iso/eval-win10x64-enterprise.vmx hard
2018/10/27 12:20:03 packer: 2018/10/27 12:20:03 stdout:
2018/10/27 12:20:03 packer: 2018/10/27 12:20:03 stderr:
2018/10/27 12:20:03 packer: 2018/10/27 12:20:03 Deleting floppy disk: /tmp/packer987397621
==> vmware-iso: Deleting output directory...
2018/10/27 12:20:04 [INFO] (telemetry) ending vmware-iso
2018/10/27 12:20:04 ui error: Build 'vmware-iso' errored: Error uploading VMware Tools: Error uploading file to $env:TEMP\winrmcp-b5741928-c52e-4768-6fc2-031307baab9a.tmp: upload operation returned code=3221225794
2018/10/27 12:20:04 Builds completed. Waiting on interrupt barrier...
2018/10/27 12:20:04 machine readable: error-count []string{"1"}
2018/10/27 12:20:04 ui error: 
==> Some builds didn't complete successfully and had errors:
2018/10/27 12:20:04 machine readable: vmware-iso,error []string{"Error uploading VMware Tools: Error uploading file to $env:TEMP\\winrmcp-b5741928-c52e-4768-6fc2-031307baab9a.tmp: upload operation returned code=3221225794"}
2018/10/27 12:20:04 ui error: --> vmware-iso: Error uploading VMware Tools: Error uploading file to $env:TEMP\winrmcp-b5741928-c52e-4768-6fc2-031307baab9a.tmp: upload operation returned code=3221225794
==> Builds finished but no artifacts were created.
2018/10/27 12:20:04 [INFO] (telemetry) Finalizing.
Build 'vmware-iso' errored: Error uploading VMware Tools: Error uploading file to $env:TEMP\winrmcp-b5741928-c52e-4768-6fc2-031307baab9a.tmp: upload operation returned code=3221225794

==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Error uploading VMware Tools: Error uploading file to $env:TEMP\winrmcp-b5741928-c52e-4768-6fc2-031307baab9a.tmp: upload operation returned code=3221225794

==> Builds finished but no artifacts were created.
2018/10/27 12:20:06 waiting for all plugin processes to complete...
2018/10/27 12:20:06 /usr/local/bin/packer: plugin process exited
2018/10/27 12:20:06 /usr/local/bin/packer: plugin process exited
2018/10/27 12:20:06 /usr/local/bin/packer: plugin process exited
Makefile:492: recipe for target 'box/vmware/eval-win10x64-enterprise-nocm-1.0.4.box' failed
make: *** [box/vmware/eval-win10x64-enterprise-nocm-1.0.4.box] Error 1

The fix for this seems to be to just add more memory and CPU. I increased to 4 CPUs and 4096MB ram and the problem went away instantly.

Metadata

Metadata

Assignees

Labels

bugA bug in the way that a template is built or provisionedhelp wanted

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions