Skip to content

Instantly share code, notes, and snippets.

@ruzickap
Last active April 30, 2019 13:20
Show Gist options
  • Save ruzickap/6c67ecb506059032b6417bfa845dfc67 to your computer and use it in GitHub Desktop.
Save ruzickap/6c67ecb506059032b6417bfa845dfc67 to your computer and use it in GitHub Desktop.
Mount the virtio-win iso and run Packer
export VIRTIO_WIN_ISO_DIR=$(mktemp -d --suffix=_virtio-win-iso)
export NAME=windows-server-2016-standard-x64-eval
export WINDOWS_VERSION=2016
export WINDOWS_TYPE=server
export TMPDIR="/var/tmp/"
cd /var/tmp/packer_windows-server-2016-eval
# Download and mount virtio-win to provide basic virtio Windows drivers
wget -c https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso
mount -o loop virtio-win.iso $VIRTIO_WIN_ISO_DIR
# Build image with packer
/usr/local/bin/packerio build windows-server-2016-eval.json
umount $VIRTIO_WIN_ISO_DIR
rmdir $VIRTIO_WIN_ISO_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment