joefitzgerald / packer-windows

Windows Packer Templates
MIT License
1.63k stars 1.12k forks source link

How to build an image without active internet connection? #107

Closed dkrikun closed 10 years ago

dkrikun commented 10 years ago

Hello,

I would like to build, say Windows 7/8.1 image, on a Windows 7 host, in a sneakernet. Could you please give some general steps of what needs be done to get it work?

Thanks a lot :smiley:

kensykora commented 10 years ago

I assume by Sneakernet you mean running the build on a box that has no network access. Just off the top of my head, some preliminary items you'd have to have downloaded onto media and copied over:

  1. The Windows 7 and 8.1 ISOs (check the json files in the root for the URLs)
  2. Packer installer
  3. Virtualbox and/or VMWare Installer
  4. VM Guest Tools (check scripts/vm-guest-tools.bat)
  5. Any files in the /scripts/ folder you need to use in your run, will want to check for hand-entered URLs and download those files

Then you'd do the following at least:

  1. Install VMWare / Virtualbox
  2. Install Packer
  3. Change the paths to the ISO in windows_7.json / windows_81.json
  4. Either change the autounattend.xml file to run a script to change the Windows Update source server to your local windows update server, (I'm not sure how to do this, nor have I ever done it) or just disable updates altogether by commenting out the update block and un-commenting out the no-updates block
  5. Update the scripts/vm-guest-tools.bat to use the downloaded VM Tools you downloaded
  6. From the step above, any files you downloaded that were referenced in /scripts you'll want to update the scripts to use the downloaded files instead.

That should be it but there might be a few things I overlooked. Feel free to submit a PR if you get the above working with documentation on how you got it to work.

ferventcoder commented 10 years ago

A good place to look would be https://github.com/jen20/packer-windows-netdev - James does this completely offline. I need to get the offline story for Chocolatey to be easier so that we can convert him back to using Chocolatey to do this.

kensykora commented 10 years ago

Closing, please reopen if you have any more questions on this.