-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Building Windows 10 fails - 'virtualbox-iso' errored: Timeout waiting for SSH. #217
Comments
Which ISO file do you use? |
I used the code as is and did not change anything thus the ISO which is referenced in windows_10.json file was used.
|
OK. I'm online only with a tablet, so not able to test and build a PR. But have a look at StefanScherer@579f24a And try it with this ISO. You also may send a PR if it works. |
I have recently downloaded 1607, too but with German local (http://care.dlservice.microsoft.com/dl/download/C/2/D/C2DF88E2-3BAF-4AC9-9AF0-B195ADA6CC60/14393.0.160715-1616.RS1_RELEASE_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_DE-DE.ISO) May I also try with it (to avoid downloading) or would this require more changes in the code than just editing the url in |
Should work, Update Autounattend.xml as in my commit, maybe select keyboard type etc., calculate the SHA1 sum of that iso and update windows_10.json or run packer with --var iso_url=youriso --var iso_checksum=yourshasum |
I took the ISO that you suggested but same behavior here:
Is it necessary to go with SSH? Can´t the image be configured with WinRM from the start? My experience with SSH was and still is a little messy whenever I am confronted with it. I even could say I hate it - always trouble with SSH! ;-))) Guess I need to take a training on SSH :-/ OK. There is one last thing I have to try - I turned off Windows Updates. So I will try again with updates turned on. |
Btw ... isn´t there a |
Oh yes, I forgot that. The winrm fixes are in the branch jf/switch-to-winrm https://github.com/joefitzgerald/packer-windows/blob/jf/switch-to-winrm/windows_10.json It's time to contribute some of that in master branch... But there also is the conductor branch with a major refactoring. |
Now it seems to hang at
According to the screenshots below it looks like its hanging in an endless loop(?) |
I forgot something, too. I am behind a corporate proxy. Thus Windows updates cant´t work. So I need to turn them off. Or is there a possibility to "burn" proxy settings into the image by Packer? e.g. the following powershell script seemed to work through winrm for a Windows 7 box. It was called from a Vagrantfile config.vm.provision "shell",
path: "set_global_proxy.ps1" # content of set_global_proxy.ps1
$ErrorActionPreference = "Stop"
# set global proxy (in Internet Options)
$reg = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
Set-ItemProperty -Path $reg -Name ProxyServer -Value "http://proxy_host_name:proxy_port"
Set-ItemProperty -Path $reg -Name ProxyEnable -Value 1 |
You probably have to add this script to floppy files and run it from Autounattend.xml. Other scripts also want to download things like sdelete etc. |
Thanks. Internet Options (set proxy) configured succesfully! Autounattend.xml<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\set_global_proxy.ps1</CommandLine>
<Description>Enable WinRM</Description>
<Order>100</Order>
</SynchronousCommand> windows_10.json "floppy_files": [
"{{user `autounattend`}}",
"./scripts/fixnetwork.ps1",
"./scripts/disable-winrm.ps1",
"./scripts/enable-winrm.ps1",
"./scripts/set_global_proxy.ps1",
"./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1",
"./scripts/oracle-cert.cer"
] |
I am now at the point there it states:
How long does it take from here to finish (approx.)? |
@Tset-Noitamotua Did sdelete finish? On my machine it's about 10-15 minutes, but only a guess. |
I dont know yet. It was not ready as I went home. But I have left my PC
|
I'm using Packer 0.10.1, Vagrant 1.8.4, and VirtualBox 5.0.26 (saw the same behaviour with 5.0.22 as well) and I left a Packer build running for about 1.5 hours with the StefanScherer@579f24a changes but without success. SDelete wasn't able to finish within that time. Here's a screenshot of Resource Monitor running in the guest. The VirtualBox Guest Additions service wasn't running either.
|
Same configuration as @avtar but on VBOX 5.0.24. Had to lock it there after a few compatibility issues on windows and osx. sDelete takes around 45 -60 mins in my Windows 7 workstation |
Back at office PC. Does not look good:
But I can't say what went wront as I did not monitored the guest. Is there a log or something on host that could give more insight? Will try again on updated VBox and Vagrant as I ran on VBox 5.0.16 and Vagrant 1.8.1. |
Upgraded VirtualBox and Vagrant:
And ... finally ... after approx. 3 - 4 hours build finished successfully:
|
Several times during |
I had to kill the process on one computer with an SSD that was taking over two hours with no signs of ending and started it on another computer with a faster NVMe drive but just sdelete still took just under two hours to finish. The end result is that a new box did get created but I remember the sdelete process taking about 10 - 15 minutes in the past. |
Any idea why it takes so long now? And is it really necessary? What is it good for (to keep image size small)? Are there other options worth to try? |
I decided not to run sdelete to save time. |
@rustamkulenov And what's the impact of not running sdelete? Is the resulting image much bigger? |
You can try to remove "compact.bat" at all and run. It will finish much faster. |
I think it's definitely worth to try. Just finished building Windows 10 Enterprise which took exactly 3 hours and created a Vagrant Will try without SUMMARYI played around with Windows 10 part of
|
The purpose of these scripts always has been to produce the smallest possible image, knowing that one of the outputs of this could be a vagrant box that you'd use to |
It seems that sdelete takes longer recently, but I haven't measured it exactly. On interesting thing about size is that using these packer templates and enhancing them for the upcoming(?) hyperv builder it turned out that that skipping the compact step results in smaller images as discussed here StefanScherer@f1ebb93 which resulted in this commit PatrickLang@b38ca2f to skip defrag and sdelete for hyperv-iso builder. |
Im trying to build Windows 10 with Virtualbox (while running on a Windows 7 host). Then running with
headless = false
the VM comes up and seems to run properly but on my command line (from where I calledpacker build windows_10.json
) I see==> virtualbox-iso: Waiting for SSH to become available...
for a long time (may be about one hour) until it finally fails with the following lines:The text was updated successfully, but these errors were encountered: