NOTE
This repo is inspired and initially forked from StefanScherer's GitHub repository, you can find more useful windows resources there.
You can skip this part by using my box on Vagrant Cloud.
- MacOS 12 Monterey or BigSur (Not tested on the lower versions).
- Virtualbox 6.1.30 (for Monterey at least).
- Packer 1.7.0 +
- Vagrant 2.2.17 +
- MSFT RDP for Mac
- Download the ISO from your trusted source, in my case, I use the eva image for testing purpose.
- Obtain the Checksum of the ISO via:
- In Mac terminal
shasum -a 256 <your-iso-path>
- Replace the value in .pkr.hcl file
variable "iso_checksum" { type = string default = "sha256:<your-iso-checksum>" }
- Run the line below to build the box (for virtualbox only)
packer build --var 'iso_url=<your-iso-path>' ./winsrv_2022_vb.pkr.hcl
- Once the box is created, covert a Vagrantfile from the Packer template.
cp ./mdtwinsrv2022/vagrantfile-winsrv_2022.template Vagrantfile
- Add the box to Vagrant
vagrant box add winsvr_2022.box
- Create a folder to host the ISOs on Mac.
- Modify this line for your own folder mapping:
config.vm.synced_folder "<your-iso-folder>", "/mdt", type: "smb", smb_username: "<your_mac_username>"
Note: The reason why I'm using SMB to map the host (MacOS) folder by acknowledging most of the us hate it -- Unfortunately, it's the only technically viable way (for now) works on Vagrant without the need of 3rd party plugins like Virtualbox Guest Addition. Feel free to checkout the other folder syncing options.
- Key in your Mac user's password when prompted:
Win Svr 2022 Base Box: folders shortly. Please use the proper username/password of your
Win Svr 2022 Base Box: account.
Win Svr 2022 Base Box:
Win Svr 2022 Base Box: Username (<your_mac_username>):
Win Svr 2022 Base Box: Password (will be hidden):
-
Observe and validate the Vagrant provisioning script prep-mdt.ps1 by:
-
Customise your MDT settings via the workbench.
-
Fire it up and enjoy!
Vagrant up && Vagrant rdp
In this new update, you will be able to produce an MDT customised ISO from scratch - Automatically! Just do a "Vagrant up", grab a coffee, sit-back and relax.
The ISO I'm creating here - Vanila, zero clicks, and clean.
- Fill the "iso" path and your Mac login user name in Vagrantfile in line:
config.vm.synced_folder "<your-iso-folder>", "/mdt", type: "smb", smb_username:"<your_mac_username>"
config.vm.synced_folder "./bin", "/bin", type: "smb", smb_username: "<your_mac_username>"
-
Customise your own Task Sequence and the options in CustomSettings.ini & Bootstrap.ini. In my case:
- ts.xml - A vanila template will only wipe the disk and install the OS.
- CustomSettings.ini & Bootstrap.ini - A customised task sequence setting template by suppressing the clicks, only displays a final summary page once it's done .
-
Fire it up!
Vagrant up
- Make sure "out_Win10_eva.iso" had landed, give it a go with Virtualbox or the real box.