Blog Marcina Bojko

Linux,Windows,serwer, i tak dalej ;)

Posts Tagged ‘packer

Hyper-V Packer Gen2 machines – version 1.0.4

leave a comment »

Written by marcinbojko

Maj 21, 2018 at 19:44

Napisane w work

Tagged with , , , , ,

Hyper-V Packer Gen2 machines – version 1.0.3

The most „bad ass” release so far 🙂

  • * `BREAKING FEATURE` – preparing switching to submodules/subtree for ./scripts and ./files – to share common code with other providers
  • * tree structure in `./scripts` and `./files`, moved to `./extras`
  • * [Windows] adding `phase-3.ps1` script to put less generic stuff there. Just uncomment line with `exit` to get rid of it
  • * [Windows] added support for `Windows Server 1709 Edition (Standard)`
  • * [Windows] remove some clutter from `bootstrap.ps1`
  • * [Windows] added `exit 0` for most of the scripts as some external commands were leaving packer with non-zero exit codes
  • * [CentOS] added `zeroing.sh` script to make compacting more efficient
  • * [CentOS] reworked bug with UEFI – this time after deploying from image you can run script `/usr/local/bin/uefi.sh` which will recheck and readd CentOS UEFI entries. For SCVMM deployments (which separates vhdx from vmcx) use `RunOnce`
  • * [CentOS] removed clutter from `provision.sh`
  • * [CentOS] removed screenfetch, replaced with neofetch
  • * [CentOS] reworked `motd.sh` in `/etc/profile.d` to reflect .Xauthority existence*

https://github.com/marcinbojko/hv-packer

Written by marcinbojko

Luty 23, 2018 at 19:34

Napisane w work

Tagged with , , , , ,

Hyper-V Packer’s Virtual Machine Generation 2 Templates – Windows 2016 and CentOS 7.4

Selection_999(897)

As you probably know – HashiCorp’s Packer (https://www.packer.io/) is a great tool for generating customized OS images for future use.

You can use many builders, starting from Virtualbox, Azure, Amazon EC2. You can also use mechanizm of providers to customize your image even more.
That becomes very handy when you have to manage your infrastructure fighting for every minute your machine will be available, and later on – ready to work. It’s advisable to put some effort to prepare latest images possible, with your organization custom needs.

However great tool, it still lacked a lots of decent documentation how to prepare images using less common builder – Microsoft’s Hyper-V. Hyper-V is a part of Microsoft Windows for a long time, it can be used as standalone product (Microsoft Hyper-V Server) or a additional feature (Hyper-V Feature in Windows 2016/10). When using packer with so-called „generation 1” images packer templates are no different from common examples prepared for popular Virtualbox builder.

With „Generation 2” images it required some more work to achieve this goal.

What’s the use for Gen-2 images? Few features than can be useful:

  • secure boot (Windows/Linux)
  • UEFI boot
  • no IDE/COM burden from previous generations
  • boot from SCSI devices

If you want to know more about „Genration 2” – read this post: https://www.altaro.com/hyper-v/comparing-hyper-v-generation-1-2-virtual-machines/

It took me a while to prepare them Hyper-V ready, also with SystemCenter Virtual Machine Support. They were (and are) tested with both (2012 and 2016) editions and just became quite important part of my deploys.

Long story short – here is my github repository with Hyper-V Windows 2016 and CentOS 7.4 Generation 2 templates.

https://github.com/marcinbojko/hv-packer

Leave me a sign if these were useful to you 🙂

 

 

Written by marcinbojko

Listopad 11, 2017 at 19:30

Napisane w work

Tagged with , , ,

%d blogerów lubi to: