Giter VIP home page Giter VIP logo

Comments (10)

StefanScherer avatar StefanScherer commented on May 26, 2024 1

Maybe the VM does not get an IP address and only has 169.254.x.x as fallback without internet connection. The win-update.ps1 script then hangs forever in the VM. Open the Hyper-V Manager and connect to the VM to have a look at the terminal window output.

Check the virtual switch to be either an external or having an internal switch with NAT configured as described in https://github.com/charlieding/Virtualization-Documentation/tree/live/hyperv-tools/Nested#setting-up-internet-for-the-nested-environment

from docker-windows-box.

StefanScherer avatar StefanScherer commented on May 26, 2024

Haven't tried the hyperv build for a long time, but the build looks like this.
The VM starts a script that installs all Windows updates, this script also may reboot several times and restarts automatically after a reboot. A powershell window should be visible during that phase.
You may have a look into the VM while packer waits for WinRM, the update script writes a logfile in C:\Windows\Temp\win-updates.log.

At the end of the update script it should enable WinRM so packer can run further provision scripts.

from docker-windows-box.

Boggin avatar Boggin commented on May 26, 2024

win-updates.ps1 hasn't run, I think, as there's no C:\Windows\Temp\win-updates.log

One of the console log lines does say:

hyperv-iso: Copying file: ./scripts/win-updates.ps1

from docker-windows-box.

StefanScherer avatar StefanScherer commented on May 26, 2024

Hm.
The scripts are copied into a virtual floppy drive, then the VM is booting with the A:\Autounattend.xml to start installation automatically. Then some scripts from this floppy drive are started.
Don't know how to investigate that. You may list all files on the floppy drive a: if all files are there that are listed in the json file in the floppy section.

from docker-windows-box.

glennsarti avatar glennsarti commented on May 26, 2024

May also help to do some fundamental testing:
Can you WinRM into the guest when you think it should be available?
What are the firewall rules on the guest?
Can you grab output from the script running inside the guest?

from docker-windows-box.

StefanScherer avatar StefanScherer commented on May 26, 2024

I'm closing this. If you still have questions, feel free to comment.

from docker-windows-box.

benjaminknox avatar benjaminknox commented on May 26, 2024

Hey this is happening to me, I'm seeing the Checking For Windows Updates message, I'm using Hyper V and building windows 2016

packer build --only=hyperv-iso windows_2016_docker.json

Hangs there for a long time. Can I skip this step?

from docker-windows-box.

StefanScherer avatar StefanScherer commented on May 26, 2024

@benjaminknox This worked for my last week, so maybe you have problems to connect to Windows Update servers in your environment. Maybe a corporate network blocks direct connections.

from docker-windows-box.

benjaminknox avatar benjaminknox commented on May 26, 2024

Ok, thank you!

from docker-windows-box.

linsongyang avatar linsongyang commented on May 26, 2024

When the packer.exe is unzipped from the download package, and then copied to the target. Windows may block the file.

Right click on the "packer.exe" and you will see a message

"The file is from another computer and might be blocked to help protect this computer."

Check the "Unblock" checkbox, next to the message, and apply.

from docker-windows-box.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.