Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

packer build -only=virtualbox-iso -force windows_7.json hangs #234

Open
basictheprogram opened this issue Mar 24, 2017 · 9 comments
Open

Comments

@basictheprogram
Copy link

What to build just the virtualbox-iso for Windows 7

$ packer build -only=virtualbox-iso -force windows_7.json
virtualbox-iso output will be in this color.

Here is the output

==> virtualbox-iso: Downloading or copying Guest additions
    virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
    virtualbox-iso: Downloading or copying: http://care.dlservice.microsoft.com/dl/download/evalx/win7/x64/EN/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso
==> virtualbox-iso: Deleting previous output directory...
==> virtualbox-iso: Creating floppy disk...
    virtualbox-iso: Copying: ./answer_files/7/Autounattend.xml
    virtualbox-iso: Copying: ./scripts/dis-updates.ps1
    virtualbox-iso: Copying: ./scripts/hotfix-KB3102810.bat
    virtualbox-iso: Copying: ./scripts/microsoft-updates.bat
    virtualbox-iso: Copying: ./scripts/win-updates.ps1
    virtualbox-iso: Copying: ./scripts/openssh.ps1
    virtualbox-iso: Copying: ./scripts/oracle-cert.cer
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Attaching floppy disk...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 3989)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1490294881 --memory 2048
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1490294881 --cpus 2
==> virtualbox-iso: Starting the virtual machine...
    virtualbox-iso: The VM will be run headless, without a GUI. If you want to
    virtualbox-iso: view the screen of the VM, connect via VRDP without a password to
    virtualbox-iso: 127.0.0.1:5924
==> virtualbox-iso: Waiting 2m0s for boot...

4 hours later it's still saying Waiting.

VirtualBox Version 5.1.18 r114002 (Qt5.6.2)
$ packer --version
0.10.1

The VirtualBox console shows:

  • Post of the virtual hardsare
  • Boot loader
  • Windows 7 Language, Time/Currency, Keyboard selection

And just hangs. It's like the Answer file is not correct?

@lmayorga1980
Copy link
Contributor

Did you enable automatic updates?

@lmayorga1980
Copy link
Contributor

Try to enable headless: false so you can check if the Autounattend.xml throws some errors.

@basictheprogram
Copy link
Author

basictheprogram commented Mar 24, 2017 via email

@lmayorga1980
Copy link
Contributor

I had issues with VBox versions in the past and specially if your host is a Windows OS. I have my setup locked to VBox 5.1.6 but on OSX.

@basictheprogram
Copy link
Author

I'm macOS 10.12.3

 grep headless windows_7.json
      "headless": false,
      "headless": false,

And I get a dialog now, same as the VB Preview and RDP console, then Windows 7 Language, Time/Currency, Keyboard, drop downs and it just hangs again.

$ packer build -only=virtualbox-iso -force windows_7.json
virtualbox-iso output will be in this color.

==> virtualbox-iso: Downloading or copying Guest additions
    virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
    virtualbox-iso: Downloading or copying: http://care.dlservice.microsoft.com/dl/download/evalx/win7/x64/EN/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso
==> virtualbox-iso: Deleting previous output directory...
==> virtualbox-iso: Creating floppy disk...
    virtualbox-iso: Copying: ./answer_files/7/Autounattend.xml
    virtualbox-iso: Copying: ./scripts/dis-updates.ps1
    virtualbox-iso: Copying: ./scripts/hotfix-KB3102810.bat
    virtualbox-iso: Copying: ./scripts/microsoft-updates.bat
    virtualbox-iso: Copying: ./scripts/win-updates.ps1
    virtualbox-iso: Copying: ./scripts/openssh.ps1
    virtualbox-iso: Copying: ./scripts/oracle-cert.cer
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Attaching floppy disk...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 2959)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1490322905 --memory 2048
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1490322905 --cpus 2
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 2m0s for boot...

Do I need to take the base Windows7 image that gets automatically downloaded and install the sshd into this image?

A couple attempts and things got a little further.

==> virtualbox-iso: Waiting 2m0s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for SSH to become available...

@lmayorga1980
Copy link
Contributor

Sounds like Autounattend.xml issue to me.

@robdyke
Copy link

robdyke commented Mar 28, 2017

@basictheprogram concur re Autounattend.xml. Have you modified the language or input settings at all?

I modified these settings to set language / input and managed to break my build.....

<SetupUILanguage> <UILanguage>en-US</UILanguage> </SetupUILanguage> <InputLocale>en-US</InputLocale> <SystemLocale>en-US</SystemLocale> <UILanguage>en-US</UILanguage> <UILanguageFallback>en-US</UILanguageFallback> <UserLocale>en-US</UserLocale>

@basictheprogram
Copy link
Author

basictheprogram commented Mar 29, 2017 via email

@rajeshr264
Copy link

rajeshr264 commented Apr 25, 2017

See issue #224 . windows_7.json only worked when I ran it on a Windows 7 Professional box! I was struggling with the issue you reported for a week on a Mac.
Thought I would try it on a Windows 7 box that was available. Installed packer on it. It just worked!

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

No branches or pull requests

4 participants