Simply, in a couple of words. It converts Windows ISO file into vagrant's box.
The primary goal of this project is to support vagrant-officeVM. These two projects forms one small ecosystem.
There is only one requirement: packer.
Please download it and install on your own.
After install be sure, that
packer.exe
is accessible inPATH
environment variable.
This project supports two hypervisors: Hyper-V and Virtualbox.
Choose the one you want. Detailed instructions are described at hyperv.md and virtualbox.md.
- Windows installed,
- single user:
vagrant
with passwordvagrant
, - VirtualBox Guest additions installed,
- WinRM access enabled,
- Linux Subsystem for Windows installed,
- Developer Mode enabled,
- SSH Private/Public Keys may be uploaded. Read this to understand it.
Setup file for Windows installer is localized. It contains some elements where strict region ID is specified.
Autounattend.xml
is located under a regional folder just to make a space for other languages.
Build operation supports additional argument locale
to indicate wanted language.
So it is possible to run:
PS packer-officeVM> .\build.ps1 <your-iso-file-path> -locale pl-PL
Supported languages it is a list of subfolders of the target Windows version folder.
Currently polish is the only one supported language :) (maybe for some time only). It's a default one also when no
locale
is provided.
windows-10.1607
template is not supported.
- place your SSH keys at
%USERPROFILE%\.ssh
folder at host OS, - take care of the content of the
known_hosts
file to ensure non-interactive connection success, - the name of your SSH keys file should starts with
id_
, - all files
%USERPROFILE%\.ssh\id_*
withknown_hosts
packer copies into the virtual floppy, - after successful Windows installation all files
A:\id_*
andA:\known_hosts
are copied toC:\Users\vagrant\.ssh
folder.
That's all at this stage. The next steps should be done on vagrant up
at Vagrantfile
.
Remember, that your box contains your SSH Private Key. Do not share the box.
If you don't use SSH keys, then ignore it. Packer will ignore it also.
My real life examples:
-
Bash on Ubuntu on Windows
- link uploaded.ssh
folder with user profile and enjoy git with SSH authentication:~ $ ln -s /mnt/c/Users/vagrant/.ssh .ssh
-
Git for Windows
-%USERPROFILE%
folder is also user profile folder withinGit Bash
. With SSH keys uploaded you can clone repositories using SSH protocol already on non-interactive provisioning. -
Git for Windows Portable
- the same asGit for Windows
.