Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access denied copying guess additions #36

Open
TraGicCode opened this issue Feb 20, 2016 · 9 comments
Open

Access denied copying guess additions #36

TraGicCode opened this issue Feb 20, 2016 · 9 comments

Comments

@TraGicCode
Copy link

Not sure if anyone else is having this issue but it seems like winrm always throws an access denied error when trying to upload the guest additions to the virtual machine. Any help is appreciated!

@mwrock
Copy link
Owner

mwrock commented Feb 20, 2016

Hmm. Have not had that issue. Mind pasting in the error?

@jcii
Copy link

jcii commented Feb 20, 2016

Mine just errored there as well:

==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for WinRM to become available...
==> virtualbox-iso: Connected to WinRM!
==> virtualbox-iso: Uploading VirtualBox version info (4.3.12)
==> virtualbox-iso: Uploading VirtualBox guest additions ISO...
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error uploading guest additions: Error uploading file to $env:TEMP\winrmcp-56c8e141-5347-4eee-5d4d-ca84ca8e5c22.tmp: http error: 500 - <s:Envelope xml:lang="en-US" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><s:Header><a:Action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</a:Action><a:MessageID>uuid:5F47857B-9B08-4613-9F1B-6770E9786259</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:3d3d21ed-f8ab-452a-4cf6-b00fa6f811a5</a:RelatesTo></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value>w:AccessDenied</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">Access is denied. </s:Text></s:Reason><s:Detail><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="127.0.0.1"><f:Message><f:ProviderFault provider="Shell cmd plugin" path="%systemroot%\system32\winrscmd.dll">Access is denied. </f:ProviderFault></f:Message></f:WSManFault></s:Detail></s:Fault></s:Body></s:Envelope>

@TraGicCode
Copy link
Author

thats the one!

@TraGicCode
Copy link
Author

Any update on this issue?

@slowbluecamera
Copy link

@also getting same issue, Virtualbox-5.0.16, packer-0.10.0 running on ubuntu 14.04
(running this on linux possibly relates this to https://groups.google.com/forum/#!topic/packer-tool/-Eswu3iV3C4)

[01:27:17][Step 1/1] ==> virtualbox-iso: Executing custom VBoxManage commands...
[01:27:17][Step 1/1]     virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1459497648 --natpf1 guest_winrm,tcp,,55985,,5985
[01:27:17][Step 1/1]     virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1459497648 --memory 2048
[01:27:17][Step 1/1]     virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1459497648 --vram 48
[01:27:17][Step 1/1]     virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1459497648 --cpus 2
[01:27:17][Step 1/1] ==> virtualbox-iso: Starting the virtual machine...
[01:27:17][Step 1/1]     virtualbox-iso: The VM will be run headless, without a GUI. If you want to
[01:27:17][Step 1/1]     virtualbox-iso: view the screen of the VM, connect via VRDP without a password to
[01:27:17][Step 1/1]     virtualbox-iso: 127.0.0.1:5911
[01:27:17][Step 1/1] ==> virtualbox-iso: Waiting 10s for boot...
[01:27:27][Step 1/1] ==> virtualbox-iso: Typing the boot command...
[01:27:27][Step 1/1] ==> virtualbox-iso: Waiting for WinRM to become available...
[05:53:55][Step 1/1] ==> virtualbox-iso: Connected to WinRM!
[05:53:55][Step 1/1] ==> virtualbox-iso: Uploading VirtualBox version info (5.0.16)
[05:54:01][Step 1/1] ==> virtualbox-iso: Uploading VirtualBox guest additions ISO...
[05:56:37][Step 1/1] ==> virtualbox-iso: Unregistering and deleting virtual machine...
[05:56:39][Step 1/1] ==> virtualbox-iso: Deleting output directory...
[05:56:39][Step 1/1] Build 'virtualbox-iso' errored: Error uploading guest additions: Error uploading file to $env:TEMP\winrmcp-56fe6f69-23ea-dade-2452-629bd22561df.tmp: http error: 500 - <s:Envelope xml:lang="en-US" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><s:Header><a:Action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</a:Action><a:MessageID>uuid:E6048BAE-6B94-41B0-B0BC-F5A5E5F67426</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:859876a8-6304-460c-5458-84d0087fbd69</a:RelatesTo></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value>w:AccessDenied</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">Access is denied. </s:Text></s:Reason><s:Detail><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="127.0.0.1"><f:Message><f:ProviderFault provider="Shell cmd plugin" path="%systemroot%\system32\winrscmd.dll">Access is denied. </f:ProviderFault></f:Message></f:WSManFault></s:Detail></s:Fault></s:Body></s:Envelope>
[05:56:39][Step 1/1] 
[05:56:39][Step 1/1] ==> Some builds didn't complete successfully and had errors:
[05:56:39][Step 1/1] --> virtualbox-iso: Error uploading guest additions: Error uploading file to $env:TEMP\winrmcp-56fe6f69-23ea-dade-2452-629bd22561df.tmp: http error: 500 - <s:Envelope xml:lang="en-US" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><s:Header><a:Action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</a:Action><a:MessageID>uuid:E6048BAE-6B94-41B0-B0BC-F5A5E5F67426</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:859876a8-6304-460c-5458-84d0087fbd69</a:RelatesTo></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value>w:AccessDenied</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">Access is denied. </s:Text></s:Reason><s:Detail><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="127.0.0.1"><f:Message><f:ProviderFault provider="Shell cmd plugin" path="%systemroot%\system32\winrscmd.dll">Access is denied. </f:ProviderFault></f:Message></f:WSManFault></s:Detail></s:Fault></s:Body></s:Envelope>
[05:56:39][Step 1/1] 
[05:56:39][Step 1/1] ==> Builds finished but no artifacts were created.

@spuder
Copy link

spuder commented Apr 6, 2016

also getting this error.

OSX 10.10
packer 0.10.0
virtualbox 5.0.16

Using latest commit on master from Feb 20th: eea6e05

packer build --only=virtualbox-iso vbox-2012r2.json
==> virtualbox-iso: Connected to WinRM!
==> virtualbox-iso: Uploading VirtualBox version info (5.0.16)
==> virtualbox-iso: Uploading VirtualBox guest additions ISO...
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error uploading guest additions: Error uploading file to $env:TEMP\winrmcp-570592c3-f6ec-b839-1e37-450aaa1b0312.tmp: http error: 500 - <s:Envelope xml:lang="en-US" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><s:Header><a:Action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</a:Action><a:MessageID>uuid:08AD2D09-1F60-4630-A0DA-5F77979215F0</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:2d5ff51d-d8b1-4021-7b9f-fff0c68567aa</a:RelatesTo></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value>w:AccessDenied</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">Access is denied. </s:Text></s:Reason><s:Detail><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="127.0.0.1"><f:Message><f:ProviderFault provider="Shell cmd plugin" path="%systemroot%\system32\winrscmd.dll">Access is denied. </f:ProviderFault></f:Message></f:WSManFault></s:Detail></s:Fault></s:Body></s:Envelope>

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error uploading guest additions: Error uploading file to $env:TEMP\winrmcp-570592c3-f6ec-b839-1e37-450aaa1b0312.tmp: http error: 500 - <s:Envelope xml:lang="en-US" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><s:Header><a:Action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</a:Action><a:MessageID>uuid:08AD2D09-1F60-4630-A0DA-5F77979215F0</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:2d5ff51d-d8b1-4021-7b9f-fff0c68567aa</a:RelatesTo></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value>w:AccessDenied</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">Access is denied. </s:Text></s:Reason><s:Detail><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="127.0.0.1"><f:Message><f:ProviderFault provider="Shell cmd plugin" path="%systemroot%\system32\winrscmd.dll">Access is denied. </f:ProviderFault></f:Message></f:WSManFault></s:Detail></s:Fault></s:Body></s:Envelope>

==> Builds finished but no artifacts were created.

The key line being

<f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="127.0.0.1">
<f:Message><f:ProviderFault provider="Shell cmd plugin" path="%systemroot%\system32\winrscmd.dll">Access is denied. </f:ProviderFault>

Others are reporting the same problem here: packer-community/winrmcp#8

@crayzeigh
Copy link

Just to confirm I am having the same issue. Since it seems to be floating around the guest additions I will probably just exclude them from the build on my next attempt.

OSX 10.11.14
packer 0.10.0
virtualbox 5.0.20

Notice about guest additions periodically causing issues is noted in MWrock's blog after the initial creation of the repo so I will try that for a work around.

@crayzeigh
Copy link

Confirmed that removing Guest Additions from the upload fixes the problem. In vbox-2012r2.json made the changes to the variables section:

    "guest_additions_mode": "upload",

to:

    "guest_additions_mode": "disable",

This allowed the process to complete, albeit without guest additions

@dragon788
Copy link
Contributor

It would also be possible to change the mode to "attach" which simply mounts the ISO in a virtual drive and install that way, though it wouldn't require the 7zip extract phase iirc and would need to look in a different location for the installer. There was a bug with the virtual drive not being removed post Packer build, but this may have only been with the VMware builder type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants