Building vagrant box from Windows ISO for vagrant-officeVM project. In ecosystem with: vagrant-officeVM and vagrant-provvin.
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.
vagrant
with password vagrant
,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 nolocale
is provided.
windows-10.1607
template is not supported.
%USERPROFILE%\.ssh
folder at host OS,known_hosts
file to ensure non-interactive connection success,id_
,%USERPROFILE%\.ssh\id_*
with known_hosts
packer copies into the virtual floppy,A:\id_*
and A:\known_hosts
are copied to C:\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 within Git Bash
. With SSH keys uploaded you can clone repositories using SSH protocol already on non-interactive provisioning.
Git for Windows Portable
- the same as Git for Windows
.