This commit is contained in:
4
packer/ova/OWNERS
Normal file
4
packer/ova/OWNERS
Normal file
@ -0,0 +1,4 @@
|
||||
# See the OWNERS docs at https://go.k8s.io/owners
|
||||
|
||||
approvers:
|
||||
- cluster-api-vsphere-maintainers
|
17
packer/ova/centos-7.json
Normal file
17
packer/ova/centos-7.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"boot_command_prefix": "<tab> text ks=hd:fd0:",
|
||||
"boot_command_suffix": "/7/ks.cfg<enter><wait>",
|
||||
"boot_media_path": "/HTTP",
|
||||
"build_name": "centos-7",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "centos",
|
||||
"distro_version": "7",
|
||||
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||
"guest_os_type": "centos7-64",
|
||||
"iso_checksum": "07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "https://mirrors.edge.kernel.org/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso",
|
||||
"os_display_name": "CentOS 7",
|
||||
"shutdown_command": "sys-unconfig",
|
||||
"vsphere_guest_os_type": "centos7_64Guest"
|
||||
}
|
25
packer/ova/flatcar.json
Normal file
25
packer/ova/flatcar.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"ansible_extra_vars": "guestinfo_datasource_slug={{user `guestinfo_datasource_slug`}} guestinfo_datasource_ref={{user `guestinfo_datasource_ref`}} guestinfo_datasource_script={{user `guestinfo_datasource_script`}} ansible_python_interpreter=/opt/bin/python",
|
||||
"boot_command_prefix": "sudo systemctl mask sshd.socket --now<enter>curl -sLo /tmp/ignition.json https://raw.githubusercontent.com/kubernetes-sigs/image-builder/0bb5cd6db390516c75daeeaf27f19b1aa958428b/images/capi/packer/files/flatcar/ignition/bootstrap.json<enter>sed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.json<enter>sudo flatcar-install -d /dev/sda -o vmware_raw -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json<enter>sudo reboot<enter>",
|
||||
"boot_wait": "60s",
|
||||
"build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}",
|
||||
"channel_name": "{{env `FLATCAR_CHANNEL`}}",
|
||||
"containerd_cri_socket": "/run/docker/libcontainerd/docker-containerd.sock",
|
||||
"crictl_source_type": "http",
|
||||
"distro_name": "flatcar",
|
||||
"guest_os_type": "flatcar-64",
|
||||
"http_directory": "",
|
||||
"iso_checksum": "https://{{env `FLATCAR_CHANNEL`}}.release.flatcar-linux.net/amd64-usr/{{env `FLATCAR_VERSION`}}/flatcar_production_iso_image.iso.DIGESTS.asc",
|
||||
"iso_checksum_type": "file",
|
||||
"iso_url": "https://{{env `FLATCAR_CHANNEL`}}.release.flatcar-linux.net/amd64-usr/{{env `FLATCAR_VERSION`}}/flatcar_production_iso_image.iso",
|
||||
"kubernetes_cni_source_type": "http",
|
||||
"kubernetes_source_type": "http",
|
||||
"os_display_name": "Flatcar Container Linux ({{env `FLATCAR_CHANNEL`}} channel release {{env `FLATCAR_VERSION`}})",
|
||||
"python_path": "/opt/bin/builder-env/site-packages",
|
||||
"release_version": "{{env `FLATCAR_VERSION`}}",
|
||||
"shutdown_command": "shutdown -P now",
|
||||
"systemd_prefix": "/etc/systemd",
|
||||
"sysusr_prefix": "/opt",
|
||||
"sysusrlocal_prefix": "/opt",
|
||||
"vsphere_guest_os_type": "other3xLinux64Guest"
|
||||
}
|
95
packer/ova/linux/centos/http/7/ks.cfg
Normal file
95
packer/ova/linux/centos/http/7/ks.cfg
Normal file
@ -0,0 +1,95 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Perform a fresh install, not an upgrade
|
||||
install
|
||||
cdrom
|
||||
|
||||
# Perform a text installation
|
||||
text
|
||||
|
||||
# Do not install an X server
|
||||
skipx
|
||||
|
||||
# Configure the locale/keyboard
|
||||
lang en_US.UTF-8
|
||||
keyboard us
|
||||
|
||||
# Configure networking
|
||||
network --onboot yes --bootproto dhcp --hostname capv.vm
|
||||
firewall --disabled
|
||||
selinux --permissive
|
||||
timezone UTC
|
||||
|
||||
# Don't flip out if unsupported hardware is detected
|
||||
unsupported_hardware
|
||||
|
||||
# Configure the user(s)
|
||||
auth --enableshadow --passalgo=sha512 --kickstart
|
||||
user --name=builder --plaintext --password builder --groups=builder,wheel
|
||||
|
||||
# Disable general install minutia
|
||||
firstboot --disabled
|
||||
eula --agreed
|
||||
|
||||
# Create a single partition with no swap space
|
||||
bootloader --location=mbr
|
||||
zerombr
|
||||
clearpart --all --initlabel
|
||||
part / --grow --asprimary --fstype=ext4 --label=slash
|
||||
|
||||
%packages --ignoremissing --excludedocs
|
||||
openssh-server
|
||||
sed
|
||||
sudo
|
||||
|
||||
# Remove unnecessary firmware
|
||||
-*-firmware
|
||||
|
||||
# Remove other unnecessary packages
|
||||
-postfix
|
||||
%end
|
||||
|
||||
# Enable/disable the following services
|
||||
services --enabled=sshd
|
||||
|
||||
# Perform a reboot once the installation has completed
|
||||
reboot
|
||||
|
||||
# The %post section is essentially a shell script
|
||||
%post --erroronfail
|
||||
|
||||
# Update the root certificates
|
||||
update-ca-trust force-enable
|
||||
|
||||
# Ensure that the "builder" user doesn't require a password to use sudo,
|
||||
# or else Ansible will fail
|
||||
echo 'builder ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/builder
|
||||
chmod 440 /etc/sudoers.d/builder
|
||||
|
||||
# Install open-vm-tools
|
||||
yum install -y open-vm-tools
|
||||
|
||||
# Remove the package cache
|
||||
yum -y clean all
|
||||
|
||||
# Disable swap
|
||||
swapoff -a
|
||||
rm -f /swapfile
|
||||
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
|
||||
|
||||
# Ensure on next boot that network devices get assigned unique IDs.
|
||||
sed -i '/^\(HWADDR\|UUID\)=/d' /etc/sysconfig/network-scripts/ifcfg-*
|
||||
|
||||
%end
|
75
packer/ova/linux/centos/http/8/ks.cfg
Normal file
75
packer/ova/linux/centos/http/8/ks.cfg
Normal file
@ -0,0 +1,75 @@
|
||||
# version=RHEL8
|
||||
# Install OS instead of upgrade
|
||||
install
|
||||
cdrom
|
||||
auth --enableshadow --passalgo=sha512 --kickstart
|
||||
# License agreement
|
||||
eula --agreed
|
||||
# Use text mode install
|
||||
text
|
||||
# Disable Initial Setup on first boot
|
||||
firstboot --disable
|
||||
# Keyboard layout
|
||||
keyboard --vckeymap=us --xlayouts='us'
|
||||
# System language
|
||||
lang en_US.UTF-8
|
||||
# Network information
|
||||
network --bootproto=dhcp --device=link --activate
|
||||
network --hostname=rhel8
|
||||
firewall --disabled
|
||||
# Root password
|
||||
rootpw builder --plaintext
|
||||
# SELinux configuration
|
||||
selinux --permissive
|
||||
# Do not configure the X Window System
|
||||
skipx
|
||||
# System timezone
|
||||
timezone UTC
|
||||
# Add a user named builder
|
||||
user --groups=wheel --name=builder --password=builder --plaintext --gecos="builder"
|
||||
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr --boot-drive=sda
|
||||
# Clear the Master Boot Record
|
||||
zerombr
|
||||
clearpart --all --initlabel --drives=sda
|
||||
part / --fstype="ext4" --grow --asprimary --label=slash --ondisk=sda
|
||||
|
||||
# Reboot after successful installation
|
||||
reboot
|
||||
|
||||
%packages --ignoremissing --excludedocs
|
||||
# dnf group info minimal-environment
|
||||
@^minimal-environment
|
||||
@core
|
||||
openssh-server
|
||||
sed
|
||||
sudo
|
||||
python3
|
||||
open-vm-tools
|
||||
|
||||
# Exclude unnecessary firmwares
|
||||
-iwl*firmware
|
||||
%end
|
||||
|
||||
# Enable/disable the following services
|
||||
services --enabled=sshd
|
||||
|
||||
%post --nochroot --logfile=/mnt/sysimage/root/ks-post.log
|
||||
# Disable quiet boot and splash screen
|
||||
sed --follow-symlinks -i "s/ rhgb quiet//" /mnt/sysimage/etc/default/grub
|
||||
sed --follow-symlinks -i "s/ rhgb quiet//" /mnt/sysimage/boot/grub2/grubenv
|
||||
|
||||
# Passwordless sudo for the user 'builder'
|
||||
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /mnt/sysimage/etc/sudoers.d/builder
|
||||
# Remove the package cache
|
||||
yum -y clean all
|
||||
|
||||
# Disable swap
|
||||
swapoff -a
|
||||
rm -f /swapfile
|
||||
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
|
||||
|
||||
sed -i '/^\(HWADDR\|UUID\)=/d' /etc/sysconfig/network-scripts/ifcfg-*
|
||||
|
||||
%end
|
60
packer/ova/linux/photon/http/3/ks.json
Normal file
60
packer/ova/linux/photon/http/3/ks.json
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"disk": "/dev/sda",
|
||||
"hostname": "localhost",
|
||||
"packages": [
|
||||
"bash",
|
||||
"bc",
|
||||
"bridge-utils",
|
||||
"bzip2",
|
||||
"ca-certificates",
|
||||
"cloud-init",
|
||||
"cpio",
|
||||
"cracklib-dicts",
|
||||
"dbus",
|
||||
"e2fsprogs",
|
||||
"file",
|
||||
"filesystem",
|
||||
"findutils",
|
||||
"gdbm",
|
||||
"grep",
|
||||
"gzip",
|
||||
"iana-etc",
|
||||
"initramfs",
|
||||
"iptables",
|
||||
"iproute2",
|
||||
"iputils",
|
||||
"libtool",
|
||||
"linux",
|
||||
"motd",
|
||||
"net-tools",
|
||||
"openssh-server",
|
||||
"open-vm-tools",
|
||||
"pkg-config",
|
||||
"photon-release",
|
||||
"photon-repos",
|
||||
"procps-ng",
|
||||
"rpm",
|
||||
"sed",
|
||||
"sudo",
|
||||
"tdnf",
|
||||
"tzdata",
|
||||
"util-linux",
|
||||
"vim",
|
||||
"which"
|
||||
],
|
||||
"password": {
|
||||
"age": -1,
|
||||
"crypted": true,
|
||||
"text": "*"
|
||||
},
|
||||
"postinstall": [
|
||||
"#!/bin/sh",
|
||||
"useradd -U -d /home/builder -m --groups wheel builder && echo 'builder:builder' | chpasswd",
|
||||
"echo 'builder ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/builder",
|
||||
"chmod 440 /etc/sudoers.d/builder",
|
||||
"systemctl enable sshd",
|
||||
"tdnf clean all",
|
||||
"swapoff -a",
|
||||
"rm -f /swapfile"
|
||||
]
|
||||
}
|
1
packer/ova/linux/photon/http/4
Symbolic link
1
packer/ova/linux/photon/http/4
Symbolic link
@ -0,0 +1 @@
|
||||
3
|
1
packer/ova/linux/rhel
Symbolic link
1
packer/ova/linux/rhel
Symbolic link
@ -0,0 +1 @@
|
||||
centos
|
96
packer/ova/linux/rockylinux/http/8/ks.cfg
Normal file
96
packer/ova/linux/rockylinux/http/8/ks.cfg
Normal file
@ -0,0 +1,96 @@
|
||||
# Use CDROM installation media
|
||||
repo --name="AppStream" --baseurl="http://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/"
|
||||
cdrom
|
||||
|
||||
# Use text install
|
||||
text
|
||||
|
||||
# Don't run the Setup Agent on first boot
|
||||
firstboot --disabled
|
||||
eula --agreed
|
||||
|
||||
# Keyboard layouts
|
||||
keyboard --vckeymap=us --xlayouts='us'
|
||||
|
||||
# System language
|
||||
lang en_US.UTF-8
|
||||
|
||||
# Network information
|
||||
network --bootproto=dhcp --onboot=on --ipv6=auto --activate --hostname=capv.vm
|
||||
|
||||
# Lock Root account
|
||||
rootpw --lock
|
||||
|
||||
# Create builder user
|
||||
user --name=builder --groups=wheel --password=builder --plaintext --shell=/bin/bash
|
||||
|
||||
# System services
|
||||
selinux --permissive
|
||||
firewall --disabled
|
||||
services --enabled="NetworkManager,sshd,chronyd"
|
||||
|
||||
# System timezone
|
||||
timezone UTC
|
||||
|
||||
# System booloader configuration
|
||||
bootloader --location=mbr --boot-drive=sda
|
||||
zerombr
|
||||
clearpart --all --initlabel --drives=sda
|
||||
part / --fstype="ext4" --grow --asprimary --label=slash --ondisk=sda
|
||||
|
||||
skipx
|
||||
|
||||
%packages --ignoremissing --excludedocs
|
||||
openssh-server
|
||||
open-vm-tools
|
||||
sudo
|
||||
sed
|
||||
python3
|
||||
|
||||
# unnecessary firmware
|
||||
-aic94xx-firmware
|
||||
-atmel-firmware
|
||||
-b43-openfwwf
|
||||
-bfa-firmware
|
||||
-ipw2100-firmware
|
||||
-ipw2200-firmware
|
||||
-ivtv-firmware
|
||||
-iwl*-firmware
|
||||
-libertas-usb8388-firmware
|
||||
-ql*-firmware
|
||||
-rt61pci-firmware
|
||||
-rt73usb-firmware
|
||||
-xorg-x11-drv-ati-firmware
|
||||
-zd1211-firmware
|
||||
-cockpit
|
||||
-quota
|
||||
-alsa-*
|
||||
-fprintd-pam
|
||||
-intltool
|
||||
-microcode_ctl
|
||||
%end
|
||||
|
||||
%addon com_redhat_kdump --disable
|
||||
%end
|
||||
|
||||
reboot
|
||||
|
||||
%post
|
||||
|
||||
echo 'builder ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/builder
|
||||
chmod 440 /etc/sudoers.d/builder
|
||||
|
||||
# Remove the package cache
|
||||
yum -y clean all
|
||||
|
||||
swapoff -a
|
||||
rm -f /swapfile
|
||||
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
|
||||
|
||||
systemctl enable vmtoolsd
|
||||
systemctl start vmtoolsd
|
||||
|
||||
# Ensure on next boot that network devices get assigned unique IDs.
|
||||
sed -i '/^\(HWADDR\|UUID\)=/d' /etc/sysconfig/network-scripts/ifcfg-*
|
||||
|
||||
%end
|
15
packer/ova/linux/ubuntu/http/18.04/preseed.cfg
Normal file
15
packer/ova/linux/ubuntu/http/18.04/preseed.cfg
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
d-i preseed/include string ../base/preseed.cfg
|
15
packer/ova/linux/ubuntu/http/20.04/preseed-efi.cfg
Normal file
15
packer/ova/linux/ubuntu/http/20.04/preseed-efi.cfg
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
d-i preseed/include string ../base/preseed-efi.cfg
|
15
packer/ova/linux/ubuntu/http/20.04/preseed.cfg
Normal file
15
packer/ova/linux/ubuntu/http/20.04/preseed.cfg
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
d-i preseed/include string ../base/preseed.cfg
|
0
packer/ova/linux/ubuntu/http/22.04/meta-data
Normal file
0
packer/ova/linux/ubuntu/http/22.04/meta-data
Normal file
87
packer/ova/linux/ubuntu/http/22.04/user-data
Normal file
87
packer/ova/linux/ubuntu/http/22.04/user-data
Normal file
@ -0,0 +1,87 @@
|
||||
#cloud-config
|
||||
# Copyright 2022 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# For more information on how autoinstall is configured, please refer to
|
||||
# https://ubuntu.com/server/docs/install/autoinstall-reference
|
||||
autoinstall:
|
||||
version: 1
|
||||
# Disable ssh server during installation, otherwise packer tries to connect and exceed max attempts
|
||||
early-commands:
|
||||
- systemctl stop ssh
|
||||
# Configure the locale
|
||||
locale: en_US.UTF-8
|
||||
keyboard:
|
||||
layout: us
|
||||
# Create a single-partition with no swap space. Kubernetes
|
||||
# really dislikes the idea of anyone else managing memory.
|
||||
# For more information on how partitioning is configured,
|
||||
# please refer to https://curtin.readthedocs.io/en/latest/topics/storage.html.
|
||||
storage:
|
||||
config:
|
||||
- type: disk
|
||||
id: disk-0
|
||||
size: largest
|
||||
grub_device: true
|
||||
preserve: false
|
||||
ptable: msdos
|
||||
wipe: superblock
|
||||
- type: partition
|
||||
id: partition-0
|
||||
device: disk-0
|
||||
size: -1
|
||||
number: 1
|
||||
preserve: false
|
||||
flag: boot
|
||||
- type: format
|
||||
id: format-0
|
||||
volume: partition-0
|
||||
fstype: ext4
|
||||
preserve: false
|
||||
- type: mount
|
||||
id: mount-0
|
||||
device: format-0
|
||||
path: /
|
||||
updates: 'all'
|
||||
ssh:
|
||||
install-server: true
|
||||
allow-pw: true
|
||||
# Customize the list of packages installed.
|
||||
packages:
|
||||
- open-vm-tools
|
||||
# Create the default user.
|
||||
# Ensures the "builder" user doesn't require a password to use sudo.
|
||||
user-data:
|
||||
users:
|
||||
- name: builder
|
||||
# openssl passwd -6 -stdin <<< builder
|
||||
passwd: $6$xyz$UtXVazU08Q5b8AW.TJ3MPYZglyXa3Ttf2RCel8MCUPlEYO1evWxeWBhZ2QqivU/Ij4tqYAxMCqc2ujEM4dMSe1
|
||||
groups: [adm, cdrom, dip, plugdev, lxd, sudo]
|
||||
lock-passwd: false
|
||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||
shell: /bin/bash
|
||||
|
||||
# This command runs after all other steps; it:
|
||||
# 1. Disables swapfiles
|
||||
# 2. Removes the existing swapfile
|
||||
# 3. Removes the swapfile entry from /etc/fstab
|
||||
# 4. Cleans up any packages that are no longer required
|
||||
# 5. Removes the cached list of packages
|
||||
late-commands:
|
||||
- swapoff -a
|
||||
- rm -f /swapfile
|
||||
- sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
|
||||
- apt-get purge --auto-remove -y
|
||||
- rm -rf /var/lib/apt/lists/*
|
128
packer/ova/linux/ubuntu/http/base/preseed-efi.cfg
Normal file
128
packer/ova/linux/ubuntu/http/base/preseed-efi.cfg
Normal file
@ -0,0 +1,128 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Configure the locale
|
||||
d-i debian-installer/locale string en_US.utf8
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i console-setup/layout string us
|
||||
|
||||
# Configure the clock
|
||||
d-i time/zone string UTC
|
||||
d-i clock-setup/utc-auto boolean true
|
||||
d-i clock-setup/utc boolean true
|
||||
|
||||
# Configure the keyboard
|
||||
d-i kbd-chooser/method select American English
|
||||
|
||||
# Configure networking
|
||||
d-i netcfg/wireless_wep string
|
||||
|
||||
# Select the kernel
|
||||
d-i base-installer/kernel/override-image string linux-virtual
|
||||
|
||||
# Configure a non-interactive install
|
||||
debconf debconf/frontend select Noninteractive
|
||||
|
||||
# Configure the base installation
|
||||
d-i pkgsel/install-language-support boolean false
|
||||
d-i pkgsel/language-packs multiselect
|
||||
tasksel tasksel/first multiselect # standard, ubuntu-server
|
||||
|
||||
|
||||
### Simple GPT configuration w/o LVM
|
||||
d-i partman-auto/disk string /dev/sda
|
||||
|
||||
d-i partman/alignment string cylinder
|
||||
d-i partman/confirm_write_new_label boolean true
|
||||
d-i partman-basicfilesystems/choose_label string gpt
|
||||
d-i partman-basicfilesystems/default_label string gpt
|
||||
d-i partman-partitioning/choose_label string gpt
|
||||
d-i partman-partitioning/default_label string gpt
|
||||
d-i partman/choose_label string gpt
|
||||
d-i partman/default_label string gpt
|
||||
|
||||
d-i partman-auto/method string regular
|
||||
d-i partman-auto/choose_recipe select gpt-boot-root-swap
|
||||
d-i partman-auto/expert_recipe string \
|
||||
gpt-boot-root-swap :: \
|
||||
1 1 1 free \
|
||||
$bios_boot{ } \
|
||||
method{ biosgrub } . \
|
||||
200 200 200 fat32 \
|
||||
$primary{ } \
|
||||
method{ efi } format{ } . \
|
||||
512 512 512 ext3 \
|
||||
$primary{ } $bootable{ } \
|
||||
method{ format } format{ } \
|
||||
use_filesystem{ } filesystem{ ext3 } \
|
||||
mountpoint{ /boot } . \
|
||||
1000 20000 -1 ext4 \
|
||||
$primary{ } \
|
||||
method{ format } format{ } \
|
||||
use_filesystem{ } filesystem{ ext4 } \
|
||||
mountpoint{ / } .
|
||||
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
# Create the default user.
|
||||
d-i passwd/user-fullname string builder
|
||||
d-i passwd/username string builder
|
||||
d-i passwd/user-password password builder
|
||||
d-i passwd/user-password-again password builder
|
||||
d-i user-setup/encrypt-home boolean false
|
||||
d-i user-setup/allow-password-weak boolean true
|
||||
|
||||
# Disable upgrading packages upon installation.
|
||||
d-i pkgsel/upgrade select none
|
||||
d-i grub-installer/only_debian boolean true
|
||||
d-i grub-installer/with_other_os boolean true
|
||||
d-i finish-install/reboot_in_progress note
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Disable use of the apt mirror during base install
|
||||
# This means only packages available in the ISO can be installed
|
||||
d-i apt-setup/use_mirror boolean false
|
||||
|
||||
# Disable the security repo as well (it's on by default)
|
||||
d-i apt-setup/services-select multiselect none
|
||||
|
||||
# Customize the list of packages installed.
|
||||
d-i pkgsel/include string openssh-server open-vm-tools
|
||||
|
||||
|
||||
# Ensure questions about these packages do not bother the installer.
|
||||
libssl1.1 libssl1.1/restart-without-asking boolean true
|
||||
libssl1.1:amd64 libssl1.1/restart-without-asking boolean true
|
||||
libssl1.1 libssl1.1/restart-services string
|
||||
libssl1.1:amd64 libssl1.1/restart-services string
|
||||
|
||||
|
||||
# This command runs after all other steps; it:
|
||||
# 1. Ensures the "builder" user doesn't require a password to use sudo
|
||||
# 2. Cleans up any packages that are no longer required
|
||||
# 3. Cleans the package cache
|
||||
# 4. Removes the cached list of packages
|
||||
# 5. Disables swapfiles
|
||||
# 6. Removes the existing swapfile
|
||||
# 7. Removes the swapfile entry from /etc/fstab
|
||||
d-i preseed/late_command string \
|
||||
echo 'builder ALL=(ALL) NOPASSWD: ALL' >/target/etc/sudoers.d/builder ; \
|
||||
in-target chmod 440 /etc/sudoers.d/builder ; \
|
||||
in-target swapoff -a ; \
|
||||
in-target rm -f /swapfile ; \
|
||||
in-target sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab ; \
|
||||
in-target rm -f /etc/udev/rules.d/70-persistent-net.rules
|
128
packer/ova/linux/ubuntu/http/base/preseed.cfg
Normal file
128
packer/ova/linux/ubuntu/http/base/preseed.cfg
Normal file
@ -0,0 +1,128 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Configure the locale
|
||||
d-i debian-installer/locale string en_US.utf8
|
||||
d-i debian-installer/add-kernel-opts console=ttyS0
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i console-setup/layout string us
|
||||
|
||||
# Configure the clock
|
||||
d-i time/zone string UTC
|
||||
d-i clock-setup/utc-auto boolean true
|
||||
d-i clock-setup/utc boolean true
|
||||
|
||||
# Configure the keyboard
|
||||
d-i kbd-chooser/method select American English
|
||||
|
||||
# Configure networking
|
||||
d-i netcfg/wireless_wep string
|
||||
|
||||
# Select the kernel
|
||||
d-i base-installer/kernel/override-image string linux-virtual
|
||||
|
||||
# Configure a non-interactive install
|
||||
debconf debconf/frontend select Noninteractive
|
||||
|
||||
# Configure the base installation
|
||||
d-i pkgsel/install-language-support boolean false
|
||||
d-i pkgsel/language-packs multiselect
|
||||
tasksel tasksel/first multiselect # standard, ubuntu-server
|
||||
|
||||
# Create a single-partition with no swap space. For more information
|
||||
# on how partitioning is configured, please refer to
|
||||
# https://github.com/xobs/debian-installer/blob/master/doc/devel/partman-auto-recipe.txt.
|
||||
d-i partman-auto/method string regular
|
||||
d-i partman-lvm/device_remove_lvm boolean true
|
||||
d-i partman-md/device_remove_md boolean true
|
||||
d-i partman-lvm/confirm boolean true
|
||||
d-i partman-auto-lvm/guided_size string max
|
||||
|
||||
# Again, this creates a single-partition with no swap. Kubernetes
|
||||
# really dislikes the idea of anyone else managing memory.
|
||||
d-i partman-auto/expert_recipe string \
|
||||
slash :: \
|
||||
0 0 -1 ext4 \
|
||||
$primary{ } $bootable{ } \
|
||||
method{ format } format{ } \
|
||||
use_filesystem{ } filesystem{ ext4 } \
|
||||
mountpoint{ / } \
|
||||
.
|
||||
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
d-i partman-basicfilesystems/no_swap boolean false
|
||||
d-i partman-md/confirm boolean true
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
d-i partman-md/confirm_nooverwrite boolean true
|
||||
d-i partman-lvm/confirm_nooverwrite boolean true
|
||||
d-i partman-partitioning/no_bootable_gpt_biosgrub boolean true
|
||||
d-i partman-partitioning/no_bootable_gpt_efi boolean false
|
||||
d-i partman-efi/non_efi_system boolean false
|
||||
|
||||
# Create the default user.
|
||||
d-i passwd/user-fullname string builder
|
||||
d-i passwd/username string builder
|
||||
d-i passwd/user-password password builder
|
||||
d-i passwd/user-password-again password builder
|
||||
d-i user-setup/encrypt-home boolean false
|
||||
d-i user-setup/allow-password-weak boolean true
|
||||
|
||||
# Disable upgrading packages upon installation.
|
||||
d-i pkgsel/upgrade select none
|
||||
d-i grub-installer/only_debian boolean true
|
||||
d-i grub-installer/with_other_os boolean true
|
||||
d-i finish-install/reboot_in_progress note
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# Disable use of the apt mirror during base install
|
||||
# This means only packages available in the ISO can be installed
|
||||
d-i apt-setup/use_mirror boolean false
|
||||
|
||||
# Disable the security repo as well (it's on by default)
|
||||
d-i apt-setup/services-select multiselect none
|
||||
|
||||
# Customize the list of packages installed.
|
||||
d-i pkgsel/include string openssh-server open-vm-tools
|
||||
|
||||
|
||||
# Ensure questions about these packages do not bother the installer.
|
||||
libssl1.1 libssl1.1/restart-without-asking boolean true
|
||||
libssl1.1:amd64 libssl1.1/restart-without-asking boolean true
|
||||
libssl1.1 libssl1.1/restart-services string
|
||||
libssl1.1:amd64 libssl1.1/restart-services string
|
||||
|
||||
|
||||
# This command runs after all other steps; it:
|
||||
# 1. Ensures the "builder" user doesn't require a password to use sudo
|
||||
# 2. Cleans up any packages that are no longer required
|
||||
# 3. Cleans the package cache
|
||||
# 4. Removes the cached list of packages
|
||||
# 5. Disables swapfiles
|
||||
# 6. Removes the existing swapfile
|
||||
# 7. Removes the swapfile entry from /etc/fstab
|
||||
d-i preseed/late_command string \
|
||||
echo 'builder ALL=(ALL) NOPASSWD: ALL' >/target/etc/sudoers.d/builder ; \
|
||||
in-target chmod 440 /etc/sudoers.d/builder ; \
|
||||
in-target swapoff -a ; \
|
||||
in-target rm -f /swapfile ; \
|
||||
in-target sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab ; \
|
||||
in-target rm -f /etc/udev/rules.d/70-persistent-net.rules ; \
|
||||
in-target apt-get purge --auto-remove -y ; \
|
||||
in-target rm -rf /var/lib/apt/lists/*
|
33
packer/ova/packer-common.json
Normal file
33
packer/ova/packer-common.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"boot_wait": "10s",
|
||||
"convert_to_template": "false",
|
||||
"cpu": "4",
|
||||
"cpu_cores": "1",
|
||||
"disk_controller_type": "pvscsi",
|
||||
"disk_thin_provisioned": "true",
|
||||
"disk_type_id": "0",
|
||||
"firmware": "bios",
|
||||
"format": "",
|
||||
"guestinfo_datasource_ref": "v1.4.1",
|
||||
"guestinfo_datasource_script": "{{user `guestinfo_datasource_slug`}}/{{user `guestinfo_datasource_ref`}}/install.sh",
|
||||
"guestinfo_datasource_slug": "https://raw.githubusercontent.com/vmware/cloud-init-vmware-guestinfo",
|
||||
"headless": "true",
|
||||
"insecure_connection": "false",
|
||||
"memory": "8192",
|
||||
"network": "",
|
||||
"network_card": "vmxnet3",
|
||||
"remote_datastore": "",
|
||||
"remote_host": "",
|
||||
"remote_password": "",
|
||||
"remote_type": "",
|
||||
"remote_username": "",
|
||||
"skip_compaction": "false",
|
||||
"ssh_password": "builder",
|
||||
"ssh_timeout": "60m",
|
||||
"ssh_username": "builder",
|
||||
"vmx_version": "15",
|
||||
"vnc_bind_address": "127.0.0.1",
|
||||
"vnc_disable_password": "false",
|
||||
"vnc_port_max": "6000",
|
||||
"vnc_port_min": "5900"
|
||||
}
|
485
packer/ova/packer-node.json
Normal file
485
packer/ova/packer-node.json
Normal file
@ -0,0 +1,485 @@
|
||||
{
|
||||
"builders": [
|
||||
{
|
||||
"communicator": "ssh",
|
||||
"disable_vnc": "True",
|
||||
"format": "{{user `format`}}",
|
||||
"headless": "{{user `headless`}}",
|
||||
"http_directory": "{{user `http_directory`}}",
|
||||
"http_port_max": "{{user `http_port_max`}}",
|
||||
"http_port_min": "{{user `http_port_min`}}",
|
||||
"name": "vmware-vmx",
|
||||
"output_directory": "{{user `output_dir`}}",
|
||||
"remote_datastore": "{{user `remote_datastore`}}",
|
||||
"remote_host": "{{user `remote_host`}}",
|
||||
"remote_password": "{{user `remote_password`}}",
|
||||
"remote_type": "{{user `remote_type`}}",
|
||||
"remote_username": "{{user `remote_username`}}",
|
||||
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'usermod -L {{user `ssh_username`}} && {{user `shutdown_command`}}'",
|
||||
"skip_compaction": "{{user `skip_compaction`}}",
|
||||
"source_path": "{{ user `source_path`}}",
|
||||
"ssh_password": "{{user `ssh_password`}}",
|
||||
"ssh_timeout": "4h",
|
||||
"ssh_username": "{{user `ssh_username`}}",
|
||||
"type": "vmware-vmx",
|
||||
"vm_name": "{{user `build_version`}}",
|
||||
"vmx_data": {
|
||||
"ethernet0.networkName": "{{user `network`}}"
|
||||
},
|
||||
"vnc_bind_address": "{{user `vnc_bind_address`}}",
|
||||
"vnc_disable_password": "{{user `vnc_disable_password`}}",
|
||||
"vnc_port_max": "{{user `vnc_port_max`}}",
|
||||
"vnc_port_min": "{{user `vnc_port_min`}}"
|
||||
},
|
||||
{
|
||||
"boot_command": [
|
||||
"{{user `boot_command_prefix`}}",
|
||||
"{{user `boot_media_path`}}",
|
||||
"{{user `boot_command_suffix`}}"
|
||||
],
|
||||
"boot_wait": "{{user `boot_wait`}}",
|
||||
"communicator": "ssh",
|
||||
"cores": "{{user `cpu_cores`}}",
|
||||
"cpus": "{{user `cpu`}}",
|
||||
"disk_adapter_type": "scsi",
|
||||
"disk_size": "{{user `disk_size`}}",
|
||||
"disk_type_id": "{{user `disk_type_id`}}",
|
||||
"floppy_dirs": "{{ user `floppy_dirs`}}",
|
||||
"format": "{{user `format`}}",
|
||||
"guest_os_type": "{{user `guest_os_type`}}",
|
||||
"headless": "{{user `headless`}}",
|
||||
"http_directory": "{{ user `http_directory`}}",
|
||||
"http_port_max": "{{user `http_port_max`}}",
|
||||
"http_port_min": "{{user `http_port_min`}}",
|
||||
"iso_checksum": "{{user `iso_checksum_type`}}:{{user `iso_checksum`}}",
|
||||
"iso_url": "{{user `iso_url`}}",
|
||||
"memory": "{{user `memory`}}",
|
||||
"name": "vmware-iso-base",
|
||||
"output_directory": "{{user `base_output_dir`}}",
|
||||
"remote_datastore": "{{user `remote_datastore`}}",
|
||||
"remote_host": "{{user `remote_host`}}",
|
||||
"remote_password": "{{user `remote_password`}}",
|
||||
"remote_type": "{{user `remote_type`}}",
|
||||
"remote_username": "{{user `remote_username`}}",
|
||||
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c '{{user `shutdown_command`}}'",
|
||||
"skip_compaction": "{{user `skip_compaction`}}",
|
||||
"ssh_password": "{{user `ssh_password`}}",
|
||||
"ssh_timeout": "4h",
|
||||
"ssh_username": "{{user `ssh_username`}}",
|
||||
"type": "vmware-iso",
|
||||
"version": "{{user `vmx_version`}}",
|
||||
"vm_name": "{{user `base_build_version`}}",
|
||||
"vmdk_name": "{{user `base_build_version`}}",
|
||||
"vmx_data": {
|
||||
"ethernet0.networkName": "{{user `network`}}"
|
||||
},
|
||||
"vnc_bind_address": "{{user `vnc_bind_address`}}",
|
||||
"vnc_disable_password": "{{user `vnc_disable_password`}}",
|
||||
"vnc_port_max": "{{user `vnc_port_max`}}",
|
||||
"vnc_port_min": "{{user `vnc_port_min`}}"
|
||||
},
|
||||
{
|
||||
"boot_command": [
|
||||
"{{user `boot_command_prefix`}}",
|
||||
"{{user `boot_media_path`}}",
|
||||
"{{user `boot_command_suffix`}}"
|
||||
],
|
||||
"boot_wait": "{{user `boot_wait`}}",
|
||||
"communicator": "ssh",
|
||||
"cores": "{{user `cpu_cores`}}",
|
||||
"cpus": "{{user `cpu`}}",
|
||||
"disk_adapter_type": "scsi",
|
||||
"disk_size": "{{user `disk_size`}}",
|
||||
"disk_type_id": "{{user `disk_type_id`}}",
|
||||
"floppy_dirs": "{{ user `floppy_dirs`}}",
|
||||
"format": "{{user `format`}}",
|
||||
"guest_os_type": "{{user `guest_os_type`}}",
|
||||
"headless": "{{user `headless`}}",
|
||||
"http_directory": "{{ user `http_directory`}}",
|
||||
"http_port_max": "{{user `http_port_max`}}",
|
||||
"http_port_min": "{{user `http_port_min`}}",
|
||||
"iso_checksum": "{{user `iso_checksum_type`}}:{{user `iso_checksum`}}",
|
||||
"iso_url": "{{user `iso_url`}}",
|
||||
"memory": "{{user `memory`}}",
|
||||
"name": "vmware-iso",
|
||||
"output_directory": "{{user `output_dir`}}",
|
||||
"remote_datastore": "{{user `remote_datastore`}}",
|
||||
"remote_host": "{{user `remote_host`}}",
|
||||
"remote_password": "{{user `remote_password`}}",
|
||||
"remote_type": "{{user `remote_type`}}",
|
||||
"remote_username": "{{user `remote_username`}}",
|
||||
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'usermod -L {{user `ssh_username`}} && {{user `shutdown_command`}}'",
|
||||
"skip_compaction": "{{user `skip_compaction`}}",
|
||||
"ssh_password": "{{user `ssh_password`}}",
|
||||
"ssh_timeout": "4h",
|
||||
"ssh_username": "{{user `ssh_username`}}",
|
||||
"type": "vmware-iso",
|
||||
"version": "{{user `vmx_version`}}",
|
||||
"vm_name": "{{user `build_version`}}",
|
||||
"vmdk_name": "{{user `build_version`}}",
|
||||
"vmx_data": {
|
||||
"ethernet0.networkName": "{{user `network`}}"
|
||||
},
|
||||
"vnc_bind_address": "{{user `vnc_bind_address`}}",
|
||||
"vnc_disable_password": "{{user `vnc_disable_password`}}",
|
||||
"vnc_port_max": "{{user `vnc_port_max`}}",
|
||||
"vnc_port_min": "{{user `vnc_port_min`}}"
|
||||
},
|
||||
{
|
||||
"CPUs": "{{user `cpu`}}",
|
||||
"RAM": "{{user `memory`}}",
|
||||
"boot_command": [
|
||||
"{{user `boot_command_prefix`}}",
|
||||
"{{user `boot_media_path`}}",
|
||||
"{{user `boot_command_suffix`}}"
|
||||
],
|
||||
"boot_wait": "{{user `boot_wait`}}",
|
||||
"cluster": "{{user `cluster`}}",
|
||||
"communicator": "ssh",
|
||||
"convert_to_template": "{{user `convert_to_template`}}",
|
||||
"cpu_cores": "{{user `cpu_cores`}}",
|
||||
"create_snapshot": "{{user `create_snapshot`}}",
|
||||
"datacenter": "{{user `datacenter`}}",
|
||||
"datastore": "{{user `datastore`}}",
|
||||
"disk_controller_type": "{{user `disk_controller_type`}}",
|
||||
"firmware": "{{user `firmware`}}",
|
||||
"floppy_dirs": "{{ user `floppy_dirs`}}",
|
||||
"folder": "{{user `folder`}}",
|
||||
"guest_os_type": "{{user `vsphere_guest_os_type`}}",
|
||||
"host": "{{user `host`}}",
|
||||
"http_directory": "{{ user `http_directory`}}",
|
||||
"http_port_max": "{{user `http_port_max`}}",
|
||||
"http_port_min": "{{user `http_port_min`}}",
|
||||
"insecure_connection": "{{user `insecure_connection`}}",
|
||||
"iso_checksum": "{{user `iso_checksum_type`}}:{{user `iso_checksum`}}",
|
||||
"iso_urls": "{{user `iso_url`}}",
|
||||
"name": "vsphere-iso-base",
|
||||
"network_adapters": [
|
||||
{
|
||||
"network": "{{user `network`}}",
|
||||
"network_card": "{{user `network_card`}}"
|
||||
}
|
||||
],
|
||||
"password": "{{user `password`}}",
|
||||
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c '{{user `shutdown_command`}}'",
|
||||
"ssh_clear_authorized_keys": "false",
|
||||
"ssh_password": "{{user `ssh_password`}}",
|
||||
"ssh_timeout": "4h",
|
||||
"ssh_username": "{{user `ssh_username`}}",
|
||||
"storage": [
|
||||
{
|
||||
"disk_size": "{{user `disk_size`}}",
|
||||
"disk_thin_provisioned": "{{user `disk_thin_provisioned`}}"
|
||||
}
|
||||
],
|
||||
"type": "vsphere-iso",
|
||||
"username": "{{user `username`}}",
|
||||
"vcenter_server": "{{user `vcenter_server`}}",
|
||||
"vm_name": "{{user `base_build_version`}}",
|
||||
"vm_version": "{{user `vmx_version`}}"
|
||||
},
|
||||
{
|
||||
"CPUs": "{{user `cpu`}}",
|
||||
"RAM": "{{user `memory`}}",
|
||||
"boot_command": [
|
||||
"{{user `boot_command_prefix`}}",
|
||||
"{{user `boot_media_path`}}",
|
||||
"{{user `boot_command_suffix`}}"
|
||||
],
|
||||
"boot_wait": "{{user `boot_wait`}}",
|
||||
"cluster": "{{user `cluster`}}",
|
||||
"communicator": "ssh",
|
||||
"convert_to_template": "{{user `convert_to_template`}}",
|
||||
"cpu_cores": "{{user `cpu_cores`}}",
|
||||
"datacenter": "{{user `datacenter`}}",
|
||||
"datastore": "{{user `datastore`}}",
|
||||
"disk_controller_type": "{{user `disk_controller_type`}}",
|
||||
"export": {
|
||||
"force": true,
|
||||
"manifest": "{{ user `export_manifest`}}",
|
||||
"output_directory": "{{user `output_dir`}}"
|
||||
},
|
||||
"firmware": "{{user `firmware`}}",
|
||||
"floppy_dirs": "{{ user `floppy_dirs`}}",
|
||||
"folder": "{{user `folder`}}",
|
||||
"guest_os_type": "{{user `vsphere_guest_os_type`}}",
|
||||
"host": "{{user `host`}}",
|
||||
"http_directory": "{{ user `http_directory`}}",
|
||||
"http_port_max": "{{user `http_port_max`}}",
|
||||
"http_port_min": "{{user `http_port_min`}}",
|
||||
"insecure_connection": "{{user `insecure_connection`}}",
|
||||
"iso_checksum": "{{user `iso_checksum_type`}}:{{user `iso_checksum`}}",
|
||||
"iso_urls": "{{user `iso_url`}}",
|
||||
"name": "vsphere",
|
||||
"network_adapters": [
|
||||
{
|
||||
"network": "{{user `network`}}",
|
||||
"network_card": "{{user `network_card`}}"
|
||||
}
|
||||
],
|
||||
"password": "{{user `password`}}",
|
||||
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'usermod -L {{user `ssh_username`}} && {{user `shutdown_command`}}'",
|
||||
"ssh_password": "{{user `ssh_password`}}",
|
||||
"ssh_timeout": "4h",
|
||||
"ssh_username": "{{user `ssh_username`}}",
|
||||
"storage": [
|
||||
{
|
||||
"disk_size": "{{user `disk_size`}}",
|
||||
"disk_thin_provisioned": "{{user `disk_thin_provisioned`}}"
|
||||
}
|
||||
],
|
||||
"type": "vsphere-iso",
|
||||
"username": "{{user `username`}}",
|
||||
"vcenter_server": "{{user `vcenter_server`}}",
|
||||
"vm_name": "{{user `build_version`}}",
|
||||
"vm_version": "{{user `vmx_version`}}"
|
||||
},
|
||||
{
|
||||
"CPUs": "{{user `cpu`}}",
|
||||
"RAM": "{{user `memory`}}",
|
||||
"cluster": "{{user `cluster`}}",
|
||||
"communicator": "ssh",
|
||||
"convert_to_template": "{{user `convert_to_template`}}",
|
||||
"cpu_cores": "{{user `cpu_cores`}}",
|
||||
"create_snapshot": "{{user `create_snapshot`}}",
|
||||
"datacenter": "{{user `datacenter`}}",
|
||||
"datastore": "{{user `datastore`}}",
|
||||
"export": {
|
||||
"force": true,
|
||||
"manifest": "{{ user `export_manifest`}}",
|
||||
"output_directory": "{{user `output_dir`}}"
|
||||
},
|
||||
"folder": "{{user `folder`}}",
|
||||
"host": "{{user `host`}}",
|
||||
"insecure_connection": "{{user `insecure_connection`}}",
|
||||
"linked_clone": "{{user `linked_clone`}}",
|
||||
"name": "vsphere-clone",
|
||||
"network": "{{user `network`}}",
|
||||
"password": "{{user `password`}}",
|
||||
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'usermod -L {{user `ssh_username`}} && {{user `shutdown_command`}}'",
|
||||
"ssh_password": "{{user `ssh_password`}}",
|
||||
"ssh_timeout": "4h",
|
||||
"ssh_username": "{{user `ssh_username`}}",
|
||||
"template": "{{user `template`}}",
|
||||
"type": "vsphere-clone",
|
||||
"username": "{{user `username`}}",
|
||||
"vcenter_server": "{{user `vcenter_server`}}",
|
||||
"vm_name": "{{user `build_version`}}"
|
||||
}
|
||||
],
|
||||
"post-processors": [
|
||||
{
|
||||
"custom_data": {
|
||||
"build_date": "{{isotime}}",
|
||||
"build_name": "{{user `build_name`}}",
|
||||
"build_timestamp": "{{user `build_timestamp`}}",
|
||||
"containerd_version": "{{user `containerd_version`}}",
|
||||
"disk_size": "{{user `disk_size`}}",
|
||||
"distro_arch": "{{ user `distro_arch` }}",
|
||||
"distro_name": "{{ user `distro_name` }}",
|
||||
"distro_version": "{{ user `distro_version` }}",
|
||||
"firmware": "{{user `firmware`}}",
|
||||
"guest_os_type": "{{user `guest_os_type`}}",
|
||||
"ib_version": "{{user `ib_version`}}",
|
||||
"kubernetes_cni_semver": "{{user `kubernetes_cni_semver`}}",
|
||||
"kubernetes_semver": "{{user `kubernetes_semver`}}",
|
||||
"kubernetes_source_type": "{{user `kubernetes_source_type`}}",
|
||||
"kubernetes_typed_version": "{{user `kubernetes_typed_version`}}",
|
||||
"os_name": "{{user `os_display_name`}}",
|
||||
"vsphere_guest_os_type": "{{user `vsphere_guest_os_type`}}"
|
||||
},
|
||||
"except": [
|
||||
"vmware-iso-base",
|
||||
"vsphere-iso-base"
|
||||
],
|
||||
"name": "packer-manifest",
|
||||
"output": "{{user `output_dir`}}/packer-manifest.json",
|
||||
"strip_path": true,
|
||||
"type": "manifest"
|
||||
},
|
||||
{
|
||||
"except": [
|
||||
"vsphere-iso-base"
|
||||
],
|
||||
"inline": [
|
||||
"cd {{user `output_dir`}}",
|
||||
"../../hack/image-build-ova.py --vmx {{user `vmx_version`}} --eula ../../hack/ovf_eula.txt --ovf_template ../../hack/ovf_template.xml --vmdk_file {{user `build_version`}}-disk-0.vmdk"
|
||||
],
|
||||
"name": "vsphere",
|
||||
"type": "shell-local"
|
||||
},
|
||||
{
|
||||
"except": [
|
||||
"vmware-iso-base"
|
||||
],
|
||||
"inline": [
|
||||
"./hack/image-build-ova.py --stream_vmdk --vmx {{user `vmx_version`}} --eula ./hack/ovf_eula.txt --ovf_template ./hack/ovf_template.xml {{user `output_dir`}}",
|
||||
"./hack/image-post-create-config.sh {{user `output_dir`}}"
|
||||
],
|
||||
"name": "local",
|
||||
"type": "shell-local"
|
||||
},
|
||||
{
|
||||
"environment_vars": [
|
||||
"CUSTOM_POST_PROCESSOR={{user `custom_post_processor`}}"
|
||||
],
|
||||
"inline": [
|
||||
"if [ \"$CUSTOM_POST_PROCESSOR\" != \"true\" ]; then exit 0; fi",
|
||||
"{{user `custom_post_processor_command`}}"
|
||||
],
|
||||
"name": "custom-post-processor",
|
||||
"type": "shell-local"
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"environment_vars": [
|
||||
"BUILD_NAME={{user `build_name`}}"
|
||||
],
|
||||
"execute_command": "BUILD_NAME={{user `build_name`}}; if [[ \"${BUILD_NAME}\" == *\"flatcar\"* ]]; then sudo {{.Vars}} -S -E bash '{{.Path}}'; fi",
|
||||
"script": "./packer/files/flatcar/scripts/bootstrap-flatcar.sh",
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"ansible_env_vars": [
|
||||
"ANSIBLE_SSH_ARGS='{{user `existing_ansible_ssh_args`}} {{user `ansible_common_ssh_args`}}'"
|
||||
],
|
||||
"except": [
|
||||
"vmware-iso-base",
|
||||
"vsphere-iso-base"
|
||||
],
|
||||
"extra_arguments": [
|
||||
"--extra-vars",
|
||||
"{{user `ansible_common_vars`}}",
|
||||
"--extra-vars",
|
||||
"{{user `ansible_extra_vars`}}",
|
||||
"--extra-vars",
|
||||
"{{user `ansible_user_vars`}}",
|
||||
"--scp-extra-args",
|
||||
"{{user `ansible_scp_extra_args`}}"
|
||||
],
|
||||
"playbook_file": "./ansible/firstboot.yml",
|
||||
"type": "ansible",
|
||||
"user": "{{user `ssh_username`}}"
|
||||
},
|
||||
{
|
||||
"environment_vars": [
|
||||
"DISTRO_NAME={{user `distro_name`}}"
|
||||
],
|
||||
"expect_disconnect": true,
|
||||
"inline": [
|
||||
"if [ $DISTRO_NAME != \"photon\" ]; then exit 0; fi",
|
||||
"sudo reboot now"
|
||||
],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"ansible_env_vars": [
|
||||
"ANSIBLE_SSH_ARGS='{{user `existing_ansible_ssh_args`}} {{user `ansible_common_ssh_args`}}'"
|
||||
],
|
||||
"except": [
|
||||
"vmware-iso-base",
|
||||
"vsphere-iso-base"
|
||||
],
|
||||
"extra_arguments": [
|
||||
"--extra-vars",
|
||||
"{{user `ansible_common_vars`}}",
|
||||
"--extra-vars",
|
||||
"{{user `ansible_extra_vars`}}",
|
||||
"--extra-vars",
|
||||
"{{user `ansible_user_vars`}}",
|
||||
"--scp-extra-args",
|
||||
"{{user `ansible_scp_extra_args`}}"
|
||||
],
|
||||
"playbook_file": "./ansible/node.yml",
|
||||
"type": "ansible",
|
||||
"user": "{{user `ssh_username`}}"
|
||||
},
|
||||
{
|
||||
"arch": "{{user `goss_arch`}}",
|
||||
"download_path": "{{user `goss_download_path`}}",
|
||||
"except": [
|
||||
"vmware-iso-base",
|
||||
"vsphere-iso-base"
|
||||
],
|
||||
"format": "{{user `goss_format`}}",
|
||||
"format_options": "{{user `goss_format_options`}}",
|
||||
"goss_file": "{{user `goss_entry_file`}}",
|
||||
"inspect": "{{user `goss_inspect_mode`}}",
|
||||
"remote_folder": "{{user `goss_remote_folder`}}",
|
||||
"remote_path": "{{user `goss_remote_path`}}",
|
||||
"skip_install": "{{user `goss_skip_install`}}",
|
||||
"tests": [
|
||||
"{{user `goss_tests_dir`}}"
|
||||
],
|
||||
"type": "goss",
|
||||
"url": "{{user `goss_url`}}",
|
||||
"use_sudo": true,
|
||||
"vars_file": "{{user `goss_vars_file`}}",
|
||||
"vars_inline": {
|
||||
"ARCH": "amd64",
|
||||
"OS": "{{user `distro_name` | lower}}",
|
||||
"OS_VERSION": "{{user `distro_version` | lower}}",
|
||||
"PROVIDER": "ova",
|
||||
"containerd_version": "{{user `containerd_version`}}",
|
||||
"kubernetes_cni_deb_version": "{{ user `kubernetes_cni_deb_version` }}",
|
||||
"kubernetes_cni_rpm_version": "{{ split (user `kubernetes_cni_rpm_version`) \"-\" 0 }}",
|
||||
"kubernetes_cni_source_type": "{{user `kubernetes_cni_source_type`}}",
|
||||
"kubernetes_cni_version": "{{user `kubernetes_cni_semver` | replace \"v\" \"\" 1}}",
|
||||
"kubernetes_deb_version": "{{ user `kubernetes_deb_version` }}",
|
||||
"kubernetes_rpm_version": "{{ split (user `kubernetes_rpm_version`) \"-\" 0 }}",
|
||||
"kubernetes_source_type": "{{user `kubernetes_source_type`}}",
|
||||
"kubernetes_version": "{{user `kubernetes_semver` | replace \"v\" \"\" 1}}"
|
||||
},
|
||||
"version": "{{user `goss_version`}}"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"ansible_common_vars": "",
|
||||
"ansible_extra_vars": "guestinfo_datasource_slug={{user `guestinfo_datasource_slug`}} guestinfo_datasource_ref={{user `guestinfo_datasource_ref`}} guestinfo_datasource_script={{user `guestinfo_datasource_script`}}",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user_vars": "",
|
||||
"base_build_version": "base-{{user `build_name`}}",
|
||||
"base_output_dir": "./output/{{user `base_build_version`}}",
|
||||
"build_timestamp": "{{timestamp}}",
|
||||
"build_version": "{{user `build_name`}}-kube-{{user `kubernetes_semver`}}",
|
||||
"cluster": "",
|
||||
"containerd_sha256": null,
|
||||
"containerd_url": "https://github.com/containerd/containerd/releases/download/v{{user `containerd_version`}}/cri-containerd-cni-{{user `containerd_version`}}-linux-amd64.tar.gz",
|
||||
"containerd_version": null,
|
||||
"crictl_url": "https://github.com/kubernetes-sigs/cri-tools/releases/download/v{{user `crictl_version`}}/crictl-v{{user `crictl_version`}}-linux-amd64.tar.gz",
|
||||
"crictl_version": null,
|
||||
"datastore": "",
|
||||
"disk_size": "20480",
|
||||
"existing_ansible_ssh_args": "{{env `ANSIBLE_SSH_ARGS`}}",
|
||||
"export_manifest": "none",
|
||||
"folder": "",
|
||||
"guest_os_type": null,
|
||||
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||
"http_port_max": "",
|
||||
"http_port_min": "",
|
||||
"ib_version": "{{env `IB_VERSION`}}",
|
||||
"kubernetes_cni_deb_version": null,
|
||||
"kubernetes_cni_http_source": null,
|
||||
"kubernetes_cni_rpm_version": null,
|
||||
"kubernetes_cni_semver": null,
|
||||
"kubernetes_cni_source_type": null,
|
||||
"kubernetes_container_registry": null,
|
||||
"kubernetes_deb_gpg_key": null,
|
||||
"kubernetes_deb_repo": null,
|
||||
"kubernetes_deb_version": null,
|
||||
"kubernetes_http_source": null,
|
||||
"kubernetes_load_additional_imgs": null,
|
||||
"kubernetes_rpm_gpg_check": null,
|
||||
"kubernetes_rpm_gpg_key": null,
|
||||
"kubernetes_rpm_repo": null,
|
||||
"kubernetes_rpm_version": null,
|
||||
"kubernetes_semver": null,
|
||||
"kubernetes_source_type": null,
|
||||
"kubernetes_typed_version": "kube-{{user `kubernetes_semver`}}",
|
||||
"output_dir": "./output/{{user `build_version`}}",
|
||||
"username": "",
|
||||
"vcenter_server": "",
|
||||
"vsphere_guest_os_type": null
|
||||
}
|
||||
}
|
267
packer/ova/packer-windows.json
Normal file
267
packer/ova/packer-windows.json
Normal file
@ -0,0 +1,267 @@
|
||||
{
|
||||
"builders": [
|
||||
{
|
||||
"content": "{\n \"unattend_timezone\" : \"{{user `unattend_timezone`}}\"\n}",
|
||||
"target": "./packer_cache/unattend.json",
|
||||
"type": "file"
|
||||
},
|
||||
{
|
||||
"boot_wait": "{{user `boot_wait`}}",
|
||||
"communicator": "winrm",
|
||||
"cpus": "{{user `cpu`}}",
|
||||
"disk_adapter_type": "scsi",
|
||||
"disk_size": "{{user `disk_size`}}",
|
||||
"disk_type_id": "{{user `disk_type_id`}}",
|
||||
"floppy_dirs": [
|
||||
"./packer/ova/windows/pvscsi"
|
||||
],
|
||||
"floppy_files": [
|
||||
"./packer/ova/windows/{{user `build_name`}}/autounattend.xml",
|
||||
"./packer/ova/windows/disable-network-discovery.cmd",
|
||||
"./packer/ova/windows/disable-winrm.ps1",
|
||||
"./packer/ova/windows/enable-winrm.ps1",
|
||||
"./packer/ova/windows/sysprep.ps1"
|
||||
],
|
||||
"guest_os_type": "{{user `local_guest_os_type`}}",
|
||||
"http_port_max": "{{user `http_port_max`}}",
|
||||
"http_port_min": "{{user `http_port_min`}}",
|
||||
"iso_checksum": "{{user `iso_checksum` }}",
|
||||
"iso_urls": [
|
||||
"{{user `os_iso_url`}}"
|
||||
],
|
||||
"memory": "{{user `memory`}}",
|
||||
"name": "vmware-iso",
|
||||
"output_directory": "{{user `output_dir`}}",
|
||||
"shutdown_command": "powershell A:/sysprep.ps1",
|
||||
"shutdown_timeout": "1h",
|
||||
"type": "vmware-iso",
|
||||
"version": "{{user `vmx_version`}}",
|
||||
"vm_name": "{{user `build_version`}}",
|
||||
"vmdk_name": "{{user `build_version`}}",
|
||||
"vmx_data": {
|
||||
"numvcpus": "4",
|
||||
"scsi0.virtualDev": "pvscsi"
|
||||
},
|
||||
"winrm_password": "S3cr3t0!",
|
||||
"winrm_timeout": "4h",
|
||||
"winrm_username": "Administrator"
|
||||
},
|
||||
{
|
||||
"CPUs": "{{user `cpu`}}",
|
||||
"RAM": "{{user `memory`}}",
|
||||
"boot_wait": "{{user `boot_wait`}}",
|
||||
"cluster": "{{user `cluster`}}",
|
||||
"communicator": "winrm",
|
||||
"convert_to_template": "{{user `convert_to_template`}}",
|
||||
"datacenter": "{{user `datacenter`}}",
|
||||
"datastore": "{{user `datastore`}}",
|
||||
"disk_controller_type": "{{user `disk_controller_type`}}",
|
||||
"export": {
|
||||
"force": true,
|
||||
"output_directory": "{{user `output_dir`}}"
|
||||
},
|
||||
"firmware": "bios",
|
||||
"floppy_dirs": [
|
||||
"./packer/ova/windows/pvscsi"
|
||||
],
|
||||
"floppy_files": [
|
||||
"./packer/ova/windows/{{user `build_name`}}/autounattend.xml",
|
||||
"./packer/ova/windows/disable-network-discovery.cmd",
|
||||
"./packer/ova/windows/disable-winrm.ps1",
|
||||
"./packer/ova/windows/enable-winrm.ps1",
|
||||
"./packer/ova/windows/sysprep.ps1"
|
||||
],
|
||||
"folder": "{{user `folder`}}",
|
||||
"guest_os_type": "{{user `vsphere_guest_os_type`}}",
|
||||
"host": "{{user `host`}}",
|
||||
"http_port_max": "{{user `http_port_max`}}",
|
||||
"http_port_min": "{{user `http_port_min`}}",
|
||||
"insecure_connection": "{{user `insecure_connection`}}",
|
||||
"iso_paths": [
|
||||
"{{user `os_iso_path`}}",
|
||||
"{{user `vmtools_iso_path`}}"
|
||||
],
|
||||
"name": "vsphere",
|
||||
"network_adapters": [
|
||||
{
|
||||
"network": "{{user `network`}}",
|
||||
"network_card": "{{user `network_card`}}"
|
||||
}
|
||||
],
|
||||
"password": "{{user `password`}}",
|
||||
"resource_pool": "{{user `resource_pool`}}",
|
||||
"shutdown_command": "powershell A:/sysprep.ps1",
|
||||
"shutdown_timeout": "1h",
|
||||
"storage": [
|
||||
{
|
||||
"disk_size": "{{user `disk_size`}}",
|
||||
"disk_thin_provisioned": "{{user `disk_thin_provisioned`}}"
|
||||
}
|
||||
],
|
||||
"type": "vsphere-iso",
|
||||
"username": "{{user `username`}}",
|
||||
"vcenter_server": "{{user `vcenter_server`}}",
|
||||
"vm_name": "{{user `build_version`}}",
|
||||
"vm_version": "{{user `vmx_version`}}",
|
||||
"winrm_insecure": true,
|
||||
"winrm_password": "S3cr3t0!",
|
||||
"winrm_timeout": "4h",
|
||||
"winrm_username": "Administrator"
|
||||
}
|
||||
],
|
||||
"post-processors": [
|
||||
{
|
||||
"custom_data": {
|
||||
"build_date": "{{isotime}}",
|
||||
"build_name": "{{user `build_name`}}",
|
||||
"build_timestamp": "{{user `build_timestamp`}}",
|
||||
"containerd_version": "{{user `containerd_version`}}",
|
||||
"debug_tools": "{{user `debug_tools`}}",
|
||||
"disable_hypervisor": "{{user `disable_hypervisor`}}",
|
||||
"disk_size": "{{user `disk_size`}}",
|
||||
"distro_arch": "{{user `distro_arch` }}",
|
||||
"distro_name": "{{user `distro_name` }}",
|
||||
"distro_version": "{{user `distro_version` }}",
|
||||
"firmware": "{{user `firmware`}}",
|
||||
"guest_os_type": "{{user `guest_os_type`}}",
|
||||
"ib_version": "{{user `ib_version`}}",
|
||||
"kubernetes_cni_semver": "{{user `kubernetes_cni_semver`}}",
|
||||
"kubernetes_semver": "{{user `kubernetes_semver`}}",
|
||||
"kubernetes_source_type": "{{user `kubernetes_source_type`}}",
|
||||
"kubernetes_typed_version": "{{user `kubernetes_typed_version`}}",
|
||||
"os_name": "{{user `os_display_name`}}",
|
||||
"vsphere_guest_os_type": "{{user `vsphere_guest_os_type`}}"
|
||||
},
|
||||
"except": [
|
||||
"file"
|
||||
],
|
||||
"output": "{{user `output_dir`}}/packer-manifest.json",
|
||||
"strip_path": true,
|
||||
"type": "manifest"
|
||||
},
|
||||
{
|
||||
"except": [
|
||||
"file"
|
||||
],
|
||||
"inline": [
|
||||
"cd {{user `output_dir`}}",
|
||||
"../../hack/image-build-ova.py --vmx {{user `vmx_version`}} --eula ../../hack/ovf_eula.txt --ovf_template ../../hack/ovf_template.xml --vmdk_file {{user `build_version`}}-disk-0.vmdk"
|
||||
],
|
||||
"name": "vsphere",
|
||||
"type": "shell-local"
|
||||
},
|
||||
{
|
||||
"except": [
|
||||
"file"
|
||||
],
|
||||
"inline": [
|
||||
"./hack/image-build-ova.py --stream_vmdk --vmx {{user `vmx_version`}} --eula ./hack/ovf_eula.txt --ovf_template ./hack/ovf_template.xml {{user `output_dir`}}",
|
||||
"./hack/image-post-create-config.sh {{user `output_dir`}}"
|
||||
],
|
||||
"name": "local",
|
||||
"type": "shell-local"
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"except": "file",
|
||||
"extra_arguments": [
|
||||
"-e",
|
||||
"ansible_winrm_server_cert_validation=ignore",
|
||||
"--extra-vars",
|
||||
"{{user `ansible_common_vars`}}",
|
||||
"--extra-vars",
|
||||
"{{user `ansible_extra_vars`}}",
|
||||
"--extra-vars",
|
||||
"{{user `ansible_user_vars`}}"
|
||||
],
|
||||
"playbook_file": "ansible/windows/node_windows.yml",
|
||||
"type": "ansible",
|
||||
"use_proxy": false,
|
||||
"user": "Administrator"
|
||||
},
|
||||
{
|
||||
"except": "file",
|
||||
"restart_check_command": "powershell -command \"& {if ((get-content C:\\ProgramData\\lastboot.txt) -eq (Get-WmiObject win32_operatingsystem).LastBootUpTime) {Write-Output 'Sleeping for 600 seconds to wait for reboot'; start-sleep 600} else {Write-Output 'Reboot complete'}}\"",
|
||||
"restart_command": "powershell \"& {(Get-WmiObject win32_operatingsystem).LastBootUpTime > C:\\ProgramData\\lastboot.txt; Restart-Computer -force}\"",
|
||||
"type": "windows-restart"
|
||||
},
|
||||
{
|
||||
"arch": "{{user `goss_arch`}}",
|
||||
"download_path": "{{user `goss_download_path`}}",
|
||||
"except": "file",
|
||||
"format": "{{user `goss_format`}}",
|
||||
"format_options": "{{user `goss_format_options`}}",
|
||||
"goss_file": "{{user `goss_entry_file`}}",
|
||||
"inspect": "{{user `goss_inspect_mode`}}",
|
||||
"remote_folder": "{{user `goss_remote_folder`}}",
|
||||
"remote_path": "{{user `goss_remote_path`}}",
|
||||
"skip_install": "{{user `goss_skip_install`}}",
|
||||
"target_os": "Windows",
|
||||
"tests": [
|
||||
"{{user `goss_tests_dir`}}"
|
||||
],
|
||||
"type": "goss",
|
||||
"url": "{{user `goss_url`}}",
|
||||
"use_sudo": false,
|
||||
"vars_env": {
|
||||
"GOSS_MAX_CONCURRENT": "1",
|
||||
"GOSS_USE_ALPHA": "1"
|
||||
},
|
||||
"vars_file": "{{user `goss_vars_file`}}",
|
||||
"vars_inline": {
|
||||
"OS": "{{user `distro_name` | lower}}",
|
||||
"PROVIDER": "ova",
|
||||
"containerd_version": "{{user `containerd_version`}}",
|
||||
"distribution_version": "{{user `distro_version`}}",
|
||||
"docker_ee_version": "{{user `docker_ee_version`}}",
|
||||
"kubernetes_version": "{{user `kubernetes_semver`}}",
|
||||
"pause_image": "{{user `pause_image`}}",
|
||||
"runtime": "{{user `runtime`}}",
|
||||
"ssh_source_url": "{{user `ssh_source_url`}}"
|
||||
},
|
||||
"version": "{{user `goss_version`}}"
|
||||
},
|
||||
{
|
||||
"inline": [
|
||||
"rm -Force -Recurse C:\\var\\log\\kubelet\\*"
|
||||
],
|
||||
"type": "powershell"
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"additional_debug_files": null,
|
||||
"ansible_common_vars": "",
|
||||
"ansible_extra_vars": "",
|
||||
"ansible_user_vars": "",
|
||||
"build_name": null,
|
||||
"build_timestamp": "{{timestamp}}",
|
||||
"build_version": "{{user `build_name`}}-kube-{{user `kubernetes_semver`}}",
|
||||
"cloudbase_init_url": "https://github.com/cloudbase/cloudbase-init/releases/download/{{user `cloudbase_init_version`}}/CloudbaseInitSetup_{{user `cloudbase_init_version` | replace_all `.` `_` }}_x64.msi",
|
||||
"cloudbase_metadata_services": "cloudbaseinit.metadata.services.vmwareguestinfoservice.VMwareGuestInfoService",
|
||||
"cloudbase_metadata_services_unattend": "cloudbaseinit.metadata.services.vmwareguestinfoservice.VMwareGuestInfoService",
|
||||
"cloudbase_plugins": "cloudbaseinit.plugins.windows.createuser.CreateUserPlugin, cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin, cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin, cloudbaseinit.plugins.common.ephemeraldisk.EphemeralDiskPlugin, cloudbaseinit.plugins.common.mtu.MTUPlugin, cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin, cloudbaseinit.plugins.common.sshpublickeys.SetUserSSHPublicKeysPlugin, cloudbaseinit.plugins.common.userdata.UserDataPlugin, cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin, cloudbaseinit.plugins.windows.createuser.CreateUserPlugin, cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin",
|
||||
"cloudbase_plugins_unattend": "cloudbaseinit.plugins.common.mtu.MTUPlugin",
|
||||
"containerd_sha256": null,
|
||||
"containerd_url": "",
|
||||
"containerd_version": null,
|
||||
"disable_hypervisor": null,
|
||||
"disk_size": "81920",
|
||||
"http_port_max": "",
|
||||
"http_port_min": "",
|
||||
"ib_version": "{{env `IB_VERSION`}}",
|
||||
"kubernetes_base_url": "https://kubernetesreleases.blob.core.windows.net/kubernetes/{{user `kubernetes_semver`}}/binaries/node/windows/{{user `kubernetes_goarch`}}",
|
||||
"kubernetes_http_package_url": "",
|
||||
"kubernetes_typed_version": "kube-{{user `kubernetes_semver`}}",
|
||||
"manifest_output": "manifest.json",
|
||||
"netbios_host_name_compatibility": null,
|
||||
"nssm_url": null,
|
||||
"output_dir": "./output/{{user `build_version`}}",
|
||||
"prepull": null,
|
||||
"unattend_timezone": "Pacific Standard Time",
|
||||
"windows_service_manager": null,
|
||||
"windows_updates_categories": null,
|
||||
"windows_updates_kbs": null,
|
||||
"wins_url": "https://github.com/rancher/wins/releases/download/v{{user `wins_version`}}/wins.exe"
|
||||
}
|
||||
}
|
16
packer/ova/photon-3.json
Normal file
16
packer/ova/photon-3.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"boot_command_prefix": "<esc><wait> vmlinuz initrd=initrd.img root/dev/ram0 loglevel=3 photon.media=cdrom ks=",
|
||||
"boot_command_suffix": "/3/ks.json<enter><wait>",
|
||||
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}",
|
||||
"build_name": "photon-3",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "photon",
|
||||
"distro_version": "3",
|
||||
"guest_os_type": "vmware-photon-64",
|
||||
"iso_checksum": "76fbe13df3f7340c94cf5706a0ec33ffc377c47e",
|
||||
"iso_checksum_type": "sha1",
|
||||
"iso_url": "https://packages.vmware.com/photon/3.0/Rev3/iso/Update1/photon-minimal-3.0-913b49438.iso",
|
||||
"os_display_name": "VMware Photon OS 64-bit",
|
||||
"shutdown_command": "shutdown now",
|
||||
"vsphere_guest_os_type": "vmwarePhoton64Guest"
|
||||
}
|
16
packer/ova/photon-4.json
Normal file
16
packer/ova/photon-4.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"boot_command_prefix": "<esc><wait> vmlinuz initrd=initrd.img root/dev/ram0 loglevel=3 photon.media=cdrom ks=",
|
||||
"boot_command_suffix": "/4/ks.json insecure_installation=1<enter><wait>",
|
||||
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}",
|
||||
"build_name": "photon-4",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "photon",
|
||||
"distro_version": "4",
|
||||
"guest_os_type": "vmware-photon-64",
|
||||
"iso_checksum": "4d5b9c6c59bbb7b6f501b7fa5e8af669332155ed",
|
||||
"iso_checksum_type": "sha1",
|
||||
"iso_url": "https://packages.vmware.com/photon/4.0/Rev2/iso/photon-minimal-4.0-c001795b8.iso",
|
||||
"os_display_name": "VMware Photon OS 64-bit",
|
||||
"shutdown_command": "shutdown now",
|
||||
"vsphere_guest_os_type": "vmwarePhoton64Guest"
|
||||
}
|
18
packer/ova/rhel-7.json
Normal file
18
packer/ova/rhel-7.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"boot_command_prefix": "<tab><wait><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>quiet text inst.ks=hd:fd0:",
|
||||
"boot_command_suffix": "/7/ks.cfg<enter><wait>",
|
||||
"boot_media_path": "/HTTP",
|
||||
"build_name": "rhel-7",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "7",
|
||||
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||
"guest_os_type": "rhel7-64",
|
||||
"iso_checksum": "19d653ce2f04f202e79773a0cbeda82070e7527557e814ebbce658773fbe8191",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "file:///rhel-server-7.9-x86_64-dvd.iso",
|
||||
"os_display_name": "RHEL 7",
|
||||
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm",
|
||||
"shutdown_command": "sys-unconfig",
|
||||
"vsphere_guest_os_type": "rhel7_64Guest"
|
||||
}
|
19
packer/ova/rhel-8.json
Normal file
19
packer/ova/rhel-8.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"boot_command_prefix": "<up><tab> text inst.ks=",
|
||||
"boot_command_suffix": "/8/ks.cfg<enter><wait>",
|
||||
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}",
|
||||
"build_name": "rhel-8",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "8",
|
||||
"epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8",
|
||||
"guest_os_type": "rhel8-64",
|
||||
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||
"iso_checksum": "48f955712454c32718dcde858dea5aca574376a1d7a4b0ed6908ac0b85597811",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "file:///rhel-8.4-x86_64-dvd.iso",
|
||||
"os_display_name": "RHEL 8",
|
||||
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm",
|
||||
"shutdown_command": "shutdown -P now",
|
||||
"vsphere_guest_os_type": "rhel8_64Guest"
|
||||
}
|
18
packer/ova/rockylinux-8.json
Normal file
18
packer/ova/rockylinux-8.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"boot_command_prefix": "<up><tab> text inst.ks=",
|
||||
"boot_command_suffix": "/8/ks.cfg<enter><wait><enter>",
|
||||
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}",
|
||||
"build_name": "rockylinux-8",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "rockylinux",
|
||||
"distro_version": "8",
|
||||
"epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8",
|
||||
"guest_os_type": "centos8-64",
|
||||
"iso_checksum": "13c3e7fca1fd32df61695584baafc14fa28d62816d0813116d23744f5394624b",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.7-x86_64-minimal.iso",
|
||||
"os_display_name": "RockyLinux 8",
|
||||
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm",
|
||||
"shutdown_command": "/sbin/halt -h -p",
|
||||
"vsphere_guest_os_type": "other4xLinux64Guest"
|
||||
}
|
18
packer/ova/ubuntu-1804.json
Normal file
18
packer/ova/ubuntu-1804.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"boot_command_prefix": "<enter><wait><f6><wait><esc><wait><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>/install/vmlinuz auto console-setup/ask_detect=false console-setup/layoutcode=us debconf/frontend=noninteractive debian-installer=en_US fb=false initrd=/install/initrd.gz kbd-chooser/method=us keyboard-configuration/layout=USA keyboard-configuration/variant=USA locale=en_US netcfg/get_domain=local netcfg/get_hostname=localhost grub-installer/bootdev=/dev/sda ipv6.disable={{ user `boot_disable_ipv6` }} preseed/file=",
|
||||
"boot_command_suffix": "/18.04/preseed.cfg -- <enter>",
|
||||
"boot_disable_ipv6": "0",
|
||||
"boot_media_path": "/media/HTTP",
|
||||
"build_name": "ubuntu-1804",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "ubuntu",
|
||||
"distro_version": "18.04",
|
||||
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||
"guest_os_type": "ubuntu-64",
|
||||
"iso_checksum": "f5cbb8104348f0097a8e513b10173a07dbc6684595e331cb06f93f385d0aecf6",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.6-server-amd64.iso",
|
||||
"os_display_name": "Ubuntu 18.04",
|
||||
"shutdown_command": "shutdown -P now",
|
||||
"vsphere_guest_os_type": "ubuntu64Guest"
|
||||
}
|
20
packer/ova/ubuntu-2004-efi.json
Normal file
20
packer/ova/ubuntu-2004-efi.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"boot_command_prefix": "<esc><wait><esc><wait><enter><wait>linux /install/vmlinuz auto console-setup/ask_detect=false console-setup/layoutcode=us console-setup/modelcode=pc105 debconf/frontend=noninteractive debian-installer=en_US fb=false kbd-chooser/method=us keyboard-configuration/layout=USA keyboard-configuration/variant=USA locale=en_US netcfg/get_domain=local netcfg/get_hostname=localhost ipv6.disable={{ user `boot_disable_ipv6` }} preseed/file=",
|
||||
"boot_command_suffix": "/20.04/preseed-efi.cfg -- <wait><enter>initrd /install/initrd.gz<enter>boot<enter><wait>",
|
||||
"boot_disable_ipv6": "0",
|
||||
"boot_media_path": "/media/HTTP",
|
||||
"build_name": "ubuntu-2004-efi",
|
||||
"cdrom_type": "sata",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "ubuntu",
|
||||
"distro_version": "20.04",
|
||||
"firmware": "efi",
|
||||
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||
"guest_os_type": "ubuntu-64",
|
||||
"iso_checksum": "f11bda2f2caed8f420802b59f382c25160b114ccc665dbac9c5046e7fceaced2",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso",
|
||||
"os_display_name": "Ubuntu 20.04",
|
||||
"shutdown_command": "shutdown -P now",
|
||||
"vsphere_guest_os_type": "ubuntu64Guest"
|
||||
}
|
18
packer/ova/ubuntu-2004.json
Normal file
18
packer/ova/ubuntu-2004.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"boot_command_prefix": "<esc><wait><esc><wait><enter><wait>/install/vmlinuz auto console-setup/ask_detect=false console-setup/layoutcode=us console-setup/modelcode=pc105 debconf/frontend=noninteractive debian-installer=en_US fb=false initrd=/install/initrd.gz kbd-chooser/method=us keyboard-configuration/layout=USA keyboard-configuration/variant=USA locale=en_US netcfg/get_domain=local netcfg/get_hostname=localhost ipv6.disable={{ user `boot_disable_ipv6` }} grub-installer/bootdev=/dev/sda preseed/file=",
|
||||
"boot_command_suffix": "/20.04/preseed.cfg -- <wait><enter><wait>",
|
||||
"boot_disable_ipv6": "0",
|
||||
"boot_media_path": "/media/HTTP",
|
||||
"build_name": "ubuntu-2004",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "ubuntu",
|
||||
"distro_version": "20.04",
|
||||
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||
"guest_os_type": "ubuntu-64",
|
||||
"iso_checksum": "f11bda2f2caed8f420802b59f382c25160b114ccc665dbac9c5046e7fceaced2",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso",
|
||||
"os_display_name": "Ubuntu 20.04",
|
||||
"shutdown_command": "shutdown -P now",
|
||||
"vsphere_guest_os_type": "ubuntu64Guest"
|
||||
}
|
17
packer/ova/ubuntu-2204.json
Normal file
17
packer/ova/ubuntu-2204.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"boot_command_prefix": "c<wait>linux /casper/vmlinuz --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/22.04/'<enter><wait>initrd /casper/initrd<enter><wait>boot<enter>",
|
||||
"boot_disable_ipv6": "0",
|
||||
"boot_media_path": "/media/HTTP",
|
||||
"build_name": "ubuntu-2204",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "ubuntu",
|
||||
"distro_version": "22.04",
|
||||
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||
"guest_os_type": "ubuntu-64",
|
||||
"iso_checksum": "10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "https://releases.ubuntu.com/22.04/ubuntu-22.04.1-live-server-amd64.iso",
|
||||
"os_display_name": "Ubuntu 22.04",
|
||||
"shutdown_command": "shutdown -P now",
|
||||
"vsphere_guest_os_type": "ubuntu64Guest"
|
||||
}
|
3
packer/ova/vmx.json
Normal file
3
packer/ova/vmx.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"source_path": ""
|
||||
}
|
16
packer/ova/vsphere.json
Normal file
16
packer/ova/vsphere.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"cluster": "",
|
||||
"convert_to_template": "false",
|
||||
"create_snapshot": "true",
|
||||
"datacenter": "",
|
||||
"datastore": "",
|
||||
"folder": "",
|
||||
"insecure_connection": "false",
|
||||
"linked_clone": "true",
|
||||
"network": "",
|
||||
"password": "",
|
||||
"resource_pool": "",
|
||||
"template": "",
|
||||
"username": "",
|
||||
"vcenter_server": ""
|
||||
}
|
15
packer/ova/windows-2004.json
Normal file
15
packer/ova/windows-2004.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"build_name": "windows-2004",
|
||||
"disk_controller_type": "pvscsi",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "windows",
|
||||
"distro_version": "2004",
|
||||
"guest_os_type": "Windows2004Server-64",
|
||||
"iso_checksum": "none",
|
||||
"local_guest_os_type": "windows9srv-64",
|
||||
"os_display_name": "Windows Server 2004",
|
||||
"os_iso_path": "[datastore] ISO/en_windows_server_version_2004_x64_dvd_765aeb22.iso",
|
||||
"os_iso_url": "file:/path/en_windows_server_version_2004_x64_dvd_765aeb22.iso",
|
||||
"vmtools_iso_path": "[datastore] ISO/vmtools/windows-11.1.5.iso",
|
||||
"vsphere_guest_os_type": "windows9Server64Guest"
|
||||
}
|
16
packer/ova/windows-2019.json
Normal file
16
packer/ova/windows-2019.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"build_name": "windows-2019",
|
||||
"disk_controller_type": "pvscsi",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "windows",
|
||||
"distro_version": "2019",
|
||||
"guest_os_type": "Windows2019Server-64",
|
||||
"iso_checksum": "none",
|
||||
"local_guest_os_type": "windows9srv-64",
|
||||
"os_display_name": "Windows Server 2019",
|
||||
"os_iso_path": "[datastore] ISO/en_windows_server_2019_x64_dvd_4cb967d8.iso",
|
||||
"os_iso_url": "file:/path/en_windows_server_2019_x64_dvd_4cb967d8.iso",
|
||||
"vmtools_iso_path": "[datastore] ISO/vmtools/windows-11.1.5.iso",
|
||||
"vmtools_iso_url": "file:/path/VMware-tools-windows-11.1.5-16724464.iso",
|
||||
"vsphere_guest_os_type": "windows9Server64Guest"
|
||||
}
|
16
packer/ova/windows-2022.json
Normal file
16
packer/ova/windows-2022.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"build_name": "windows-2022",
|
||||
"disk_controller_type": "pvscsi",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "windows",
|
||||
"distro_version": "2022",
|
||||
"guest_os_type": "Windows2019Server-64",
|
||||
"iso_checksum": "none",
|
||||
"local_guest_os_type": "windows9srv-64",
|
||||
"os_display_name": "Windows Server 2022",
|
||||
"os_iso_path": "[datastore] ISO/en-us_windows_server_2022_x64_dvd_620d7eac.iso",
|
||||
"os_iso_url": "file:/path/en-us_windows_server_2022_x64_dvd_620d7eac.iso",
|
||||
"vmtools_iso_path": "[datastore] ISO/vmtools/windows-11.1.5.iso",
|
||||
"vmtools_iso_url": "file:/path/VMware-tools-windows-11.1.5-16724464.iso",
|
||||
"vsphere_guest_os_type": "windows9Server64Guest"
|
||||
}
|
2
packer/ova/windows/disable-network-discovery.cmd
Normal file
2
packer/ova/windows/disable-network-discovery.cmd
Normal file
@ -0,0 +1,2 @@
|
||||
reg ADD HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff /f
|
||||
netsh advfirewall firewall set rule group="Network Discovery" new enable=No
|
8
packer/ova/windows/disable-winrm.ps1
Normal file
8
packer/ova/windows/disable-winrm.ps1
Normal file
@ -0,0 +1,8 @@
|
||||
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=block
|
||||
netsh advfirewall firewall set rule group="Windows Remote Management" new enable=yes
|
||||
$winrmService = Get-Service -Name WinRM
|
||||
if ($winrmService.Status -eq "Running"){
|
||||
Disable-PSRemoting -Force
|
||||
}
|
||||
Stop-Service winrm
|
||||
Set-Service -Name winrm -StartupType Disabled
|
18
packer/ova/windows/enable-winrm.ps1
Normal file
18
packer/ova/windows/enable-winrm.ps1
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
$NetworkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"))
|
||||
$Connections = $NetworkListManager.GetNetworkConnections()
|
||||
$Connections | ForEach-Object { $_.GetNetwork().SetCategory(1) }
|
||||
|
||||
Enable-PSRemoting -Force
|
||||
winrm quickconfig -q
|
||||
winrm quickconfig -transport:http
|
||||
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
|
||||
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}'
|
||||
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
|
||||
winrm set winrm/config/service/auth '@{Basic="true"}'
|
||||
winrm set winrm/config/client/auth '@{Basic="true"}'
|
||||
winrm set winrm/config/listener?Address=*+Transport=HTTP '@{Port="5985"}'
|
||||
netsh advfirewall firewall set rule group="Windows Remote Administration" new enable=yes
|
||||
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=allow
|
||||
Set-Service winrm -startuptype "auto"
|
||||
Restart-Service winrm
|
BIN
packer/ova/windows/pvscsi/amd64/pvscsi.cat
Normal file
BIN
packer/ova/windows/pvscsi/amd64/pvscsi.cat
Normal file
Binary file not shown.
221
packer/ova/windows/pvscsi/amd64/pvscsi.inf
Normal file
221
packer/ova/windows/pvscsi/amd64/pvscsi.inf
Normal file
@ -0,0 +1,221 @@
|
||||
|
||||
;pvscsi.inf
|
||||
;This file contains the information required to load the driver for the VMware PVSCSI Controller
|
||||
; Copyright (C) 2001 - 2019, VMware, Inc.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[version]
|
||||
Signature="$Windows NT$"
|
||||
Class=SCSIAdapter
|
||||
ClassGuid={4D36E97B-E325-11CE-BFC1-08002BE10318}
|
||||
Provider=%VMWARE%
|
||||
DriverVer=08/02/2019,1.3.15.0
|
||||
CatalogFile=pvscsi.cat
|
||||
|
||||
[ControlFlags]
|
||||
ExcludeFromSelect = *
|
||||
|
||||
[SourceDisksNames]
|
||||
1 = %DSKID1%,pvscsi.sys,,
|
||||
|
||||
[SourceDisksFiles]
|
||||
pvscsi.sys = 1,,
|
||||
|
||||
[Manufacturer]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%VMWARE%=pvscsi,NTamd64.6.2
|
||||
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
; Other architectures are unsupported, as are older versions of Windows on all platforms.
|
||||
[pvscsi]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[pvscsi.NTamd64.6.2]
|
||||
%DEVICE%=DDInstall.x64.vista, PCI\VEN_15AD&DEV_07C0
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[DDInstall.x64.vista.NT]
|
||||
CopyFiles=pvscsi.x64.CopyFiles
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DDInstall.x64.vista.NT.HW]
|
||||
AddReg=enableMSI.reg
|
||||
Include=machine.inf
|
||||
Needs=PciIoSpaceNotRequired
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[pvscsi.x64.CopyFiles]
|
||||
pvscsi.sys,,,2
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DDInstall.x64.NT.Services]
|
||||
AddService=pvscsi,2,Service_Install.x64,EventLog_Install
|
||||
|
||||
[DDInstall.x64.vista.NT.Services]
|
||||
AddService=pvscsi,2,Service_Install.x64,EventLog_Install
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DestinationDirs]
|
||||
pvscsi.x64.CopyFiles = 12
|
||||
DefaultDestDir=12
|
||||
|
||||
; ##################################################
|
||||
|
||||
[Service_Install.x64]
|
||||
DisplayName=%pvscsi.DiskName%
|
||||
ServiceType=1 ; %SERVICE_KERNEL_DRIVER%
|
||||
StartType=0 ; %SERVICE_BOOT_START%
|
||||
ErrorControl=1 ; %SERVICE_ERROR_NORMAL%
|
||||
ServiceBinary=%12%\pvscsi.sys
|
||||
LoadOrderGroup=SCSI Miniport
|
||||
|
||||
; We need to force the use of \Driver\pvscsi32 as the driver object name,
|
||||
; otherwise the crash dump driver loader functions cannot find the driver.
|
||||
; StartName entry defined in the INF format is supposed to facilitate that,
|
||||
; but at least on win2k3sp2-32 and win2k8-datacenter-32 the driver installer
|
||||
; interpretes StartName as the name of the account to start the service under,
|
||||
; which is an incorrect interpretation for SERVICE_KERNEL_DRIVER type. As a
|
||||
; work around ObjectName registry entry is added directly using brute-force.
|
||||
|
||||
AddReg=busTypeSAS,pnpsafe_pci_addreg,vmware_installers_addreg
|
||||
DelReg=driverObjectName.del
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[busTypeSAS]
|
||||
HKR, "Parameters", "BusType", 0x00010001, 0x0000000A ; BusTypeSAS
|
||||
|
||||
[enableMSI.reg]
|
||||
HKR, Interrupt Management,, %FLG_ADDREG_KEYONLY%
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties,, %FLG_ADDREG_KEYONLY%
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, \
|
||||
%FLG_ADDREG_TYPE_DWORD%, 1
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, \
|
||||
%FLG_ADDREG_TYPE_DWORD%, 1
|
||||
|
||||
[pnpsafe_pci_addreg]
|
||||
HKR, "Parameters\PnpInterface", "5", 0x00010001, 0x00000001
|
||||
|
||||
[vmware_installers_addreg]
|
||||
HKR,, %pvscsi.installers.value.name%, %FLG_ADDREG_KEYONLY%, %pvscsi.installers.value.windows%
|
||||
;; FLG_ADDREG_KEYONLY
|
||||
HKR,, %pvscsi.installers.value.name%, 0x00010002, %pvscsi.installers.value.windows%
|
||||
;; FLG_ADDREG_NOCLOBBER | FLG_ADDREG_TYPE_MULTI_SZ
|
||||
|
||||
[driverObjectName.del]
|
||||
HKR, , "ObjectName"
|
||||
|
||||
[EventLog_Install]
|
||||
AddReg = EventLog_AddReg
|
||||
|
||||
[EventLog_AddReg]
|
||||
HKR,,EventMessageFile,%FLG_ADDREG_TYPE_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll"
|
||||
HKR,,TypesSupported,%FLG_ADDREG_TYPE_DWORD%,7
|
||||
|
||||
[strings]
|
||||
pvscsi.installers.value.name="vwdk.installers"
|
||||
pvscsi.installers.value.windows="Windows"
|
||||
pvscsi.DiskName="pvscsi Storage Controller Driver"
|
||||
VMWARE="VMware, Inc."
|
||||
DEVICE="VMware PVSCSI Controller"
|
||||
DSKID1="VMware PVSCSI Controller Installation Disk 1"
|
||||
FLG_ADDREG_KEYONLY = 0x00000010
|
||||
FLG_ADDREG_TYPE_DWORD = 0x00010001
|
||||
FLG_ADDREG_TYPE_EXPAND_SZ = 0x00020000
|
||||
FLG_DELREG_MULTI_SZ_DELSTRING = 0x00018002
|
BIN
packer/ova/windows/pvscsi/amd64/pvscsi.sys
Normal file
BIN
packer/ova/windows/pvscsi/amd64/pvscsi.sys
Normal file
Binary file not shown.
35
packer/ova/windows/pvscsi/amd64/txtsetup.oem
Normal file
35
packer/ova/windows/pvscsi/amd64/txtsetup.oem
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
; txtsetup.oem file.
|
||||
; Required to install the pvscsi driver at install time.
|
||||
|
||||
[Disks]
|
||||
;"directory" should specify the full-path as per the documentation, but only
|
||||
; relative paths worked during testing.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[Defaults]
|
||||
SCSI = pvscsi
|
||||
|
||||
[SCSI]
|
||||
pvscsi = "VMware PVSCSI Controller"
|
||||
|
||||
[Files.SCSI.pvscsi]
|
||||
driver = disk,pvscsi.sys,pvscsi
|
||||
inf = disk,pvscsi.inf
|
||||
catalog = disk,pvscsi.cat
|
||||
|
||||
[Config.pvscsi]
|
||||
value = Parameters\PnpInterface, 5 ,REG_DWORD, 1
|
||||
value = Parameters, BusType, REG_DWORD, A
|
||||
|
||||
[HardwareIds.scsi.pvscsi]
|
||||
id = "PCI\VEN_15AD&DEV_07C0", "pvscsi"
|
BIN
packer/ova/windows/pvscsi/i386/pvscsi.cat
Normal file
BIN
packer/ova/windows/pvscsi/i386/pvscsi.cat
Normal file
Binary file not shown.
221
packer/ova/windows/pvscsi/i386/pvscsi.inf
Normal file
221
packer/ova/windows/pvscsi/i386/pvscsi.inf
Normal file
@ -0,0 +1,221 @@
|
||||
|
||||
;pvscsi.inf
|
||||
;This file contains the information required to load the driver for the VMware PVSCSI Controller
|
||||
; Copyright (C) 2001 - 2019, VMware, Inc.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[version]
|
||||
Signature="$Windows NT$"
|
||||
Class=SCSIAdapter
|
||||
ClassGuid={4D36E97B-E325-11CE-BFC1-08002BE10318}
|
||||
Provider=%VMWARE%
|
||||
DriverVer=08/02/2019,1.3.15.0
|
||||
CatalogFile=pvscsi.cat
|
||||
|
||||
[ControlFlags]
|
||||
ExcludeFromSelect = *
|
||||
|
||||
[SourceDisksNames]
|
||||
1 = %DSKID1%,pvscsi.sys,,
|
||||
|
||||
[SourceDisksFiles]
|
||||
pvscsi.sys = 1,,
|
||||
|
||||
[Manufacturer]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%VMWARE%=pvscsi,NTx86.6.2
|
||||
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
; Other architectures are unsupported, as are older versions of Windows on all platforms.
|
||||
[pvscsi]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[pvscsi.NTx86.6.2]
|
||||
%DEVICE%=DDInstall.x86.vista, PCI\VEN_15AD&DEV_07C0
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[DDInstall.x86.vista.NT]
|
||||
CopyFiles=pvscsi.x86.CopyFiles
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DDInstall.x86.vista.NT.HW]
|
||||
AddReg=enableMSI.reg
|
||||
Include=machine.inf
|
||||
Needs=PciIoSpaceNotRequired
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[pvscsi.x86.CopyFiles]
|
||||
pvscsi.sys,,,2
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DDInstall.x86.NT.Services]
|
||||
AddService=pvscsi,2,Service_Install.x86,EventLog_Install
|
||||
|
||||
[DDInstall.x86.vista.NT.Services]
|
||||
AddService=pvscsi,2,Service_Install.x86,EventLog_Install
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[DestinationDirs]
|
||||
pvscsi.x86.CopyFiles = 12
|
||||
DefaultDestDir=12
|
||||
|
||||
; ##################################################
|
||||
|
||||
[Service_Install.x86]
|
||||
DisplayName=%pvscsi.DiskName%
|
||||
ServiceType=1 ; %SERVICE_KERNEL_DRIVER%
|
||||
StartType=0 ; %SERVICE_BOOT_START%
|
||||
ErrorControl=1 ; %SERVICE_ERROR_NORMAL%
|
||||
ServiceBinary=%12%\pvscsi.sys
|
||||
LoadOrderGroup=SCSI Miniport
|
||||
|
||||
; We need to force the use of \Driver\pvscsi32 as the driver object name,
|
||||
; otherwise the crash dump driver loader functions cannot find the driver.
|
||||
; StartName entry defined in the INF format is supposed to facilitate that,
|
||||
; but at least on win2k3sp2-32 and win2k8-datacenter-32 the driver installer
|
||||
; interpretes StartName as the name of the account to start the service under,
|
||||
; which is an incorrect interpretation for SERVICE_KERNEL_DRIVER type. As a
|
||||
; work around ObjectName registry entry is added directly using brute-force.
|
||||
|
||||
AddReg=busTypeSAS,pnpsafe_pci_addreg,vmware_installers_addreg
|
||||
DelReg=driverObjectName.del
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ##################################################
|
||||
|
||||
[busTypeSAS]
|
||||
HKR, "Parameters", "BusType", 0x00010001, 0x0000000A ; BusTypeSAS
|
||||
|
||||
[enableMSI.reg]
|
||||
HKR, Interrupt Management,, %FLG_ADDREG_KEYONLY%
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties,, %FLG_ADDREG_KEYONLY%
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, \
|
||||
%FLG_ADDREG_TYPE_DWORD%, 1
|
||||
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, \
|
||||
%FLG_ADDREG_TYPE_DWORD%, 1
|
||||
|
||||
[pnpsafe_pci_addreg]
|
||||
HKR, "Parameters\PnpInterface", "5", 0x00010001, 0x00000001
|
||||
|
||||
[vmware_installers_addreg]
|
||||
HKR,, %pvscsi.installers.value.name%, %FLG_ADDREG_KEYONLY%, %pvscsi.installers.value.windows%
|
||||
;; FLG_ADDREG_KEYONLY
|
||||
HKR,, %pvscsi.installers.value.name%, 0x00010002, %pvscsi.installers.value.windows%
|
||||
;; FLG_ADDREG_NOCLOBBER | FLG_ADDREG_TYPE_MULTI_SZ
|
||||
|
||||
[driverObjectName.del]
|
||||
HKR, , "ObjectName"
|
||||
|
||||
[EventLog_Install]
|
||||
AddReg = EventLog_AddReg
|
||||
|
||||
[EventLog_AddReg]
|
||||
HKR,,EventMessageFile,%FLG_ADDREG_TYPE_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll"
|
||||
HKR,,TypesSupported,%FLG_ADDREG_TYPE_DWORD%,7
|
||||
|
||||
[strings]
|
||||
pvscsi.installers.value.name="vwdk.installers"
|
||||
pvscsi.installers.value.windows="Windows"
|
||||
pvscsi.DiskName="pvscsi Storage Controller Driver"
|
||||
VMWARE="VMware, Inc."
|
||||
DEVICE="VMware PVSCSI Controller"
|
||||
DSKID1="VMware PVSCSI Controller Installation Disk 1"
|
||||
FLG_ADDREG_KEYONLY = 0x00000010
|
||||
FLG_ADDREG_TYPE_DWORD = 0x00010001
|
||||
FLG_ADDREG_TYPE_EXPAND_SZ = 0x00020000
|
||||
FLG_DELREG_MULTI_SZ_DELSTRING = 0x00018002
|
BIN
packer/ova/windows/pvscsi/i386/pvscsi.sys
Normal file
BIN
packer/ova/windows/pvscsi/i386/pvscsi.sys
Normal file
Binary file not shown.
35
packer/ova/windows/pvscsi/i386/txtsetup.oem
Normal file
35
packer/ova/windows/pvscsi/i386/txtsetup.oem
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
; txtsetup.oem file.
|
||||
; Required to install the pvscsi driver at install time.
|
||||
|
||||
[Disks]
|
||||
;"directory" should specify the full-path as per the documentation, but only
|
||||
; relative paths worked during testing.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[Defaults]
|
||||
SCSI = pvscsi
|
||||
|
||||
[SCSI]
|
||||
pvscsi = "VMware PVSCSI Controller"
|
||||
|
||||
[Files.SCSI.pvscsi]
|
||||
driver = disk,pvscsi.sys,pvscsi
|
||||
inf = disk,pvscsi.inf
|
||||
catalog = disk,pvscsi.cat
|
||||
|
||||
[Config.pvscsi]
|
||||
value = Parameters\PnpInterface, 5 ,REG_DWORD, 1
|
||||
value = Parameters, BusType, REG_DWORD, A
|
||||
|
||||
[HardwareIds.scsi.pvscsi]
|
||||
id = "PCI\VEN_15AD&DEV_07C0", "pvscsi"
|
13
packer/ova/windows/sysprep.ps1
Normal file
13
packer/ova/windows/sysprep.ps1
Normal file
@ -0,0 +1,13 @@
|
||||
Write-Output '>>> Sysprepping VM ...'
|
||||
if( Test-Path $Env:SystemRoot\system32\Sysprep\unattend.xml ) {
|
||||
Remove-Item $Env:SystemRoot\system32\Sysprep\unattend.xml -Force
|
||||
}
|
||||
$unattendedXml = "$ENV:ProgramFiles\Cloudbase Solutions\Cloudbase-Init\conf\Unattend.xml"
|
||||
$FileExists = Test-Path $unattendedXml
|
||||
If ($FileExists -eq $True) {
|
||||
# Use the Cloudbase-init provided unattend file during install
|
||||
Write-Output "Using cloudbase-init unattend file for sysprep: $unattendedXml"
|
||||
& $Env:SystemRoot\System32\Sysprep\Sysprep.exe /oobe /generalize /mode:vm /shutdown /quiet /unattend:$unattendedXml
|
||||
}else {
|
||||
& $Env:SystemRoot\System32\Sysprep\Sysprep.exe /oobe /generalize /mode:vm /shutdown /quiet
|
||||
}
|
231
packer/ova/windows/windows-2004/autounattend.xml
Normal file
231
packer/ova/windows/windows-2004/autounattend.xml
Normal file
@ -0,0 +1,231 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--*************************************************
|
||||
Windows Server 2004 Answer File
|
||||
|
||||
Installation Notes
|
||||
Location:
|
||||
Notes: We currently assume your image is using a licesnsed media, and hard code product keys accordingly
|
||||
Users will want to modify this file.
|
||||
Installation Notes:
|
||||
- We currently assume your image is using a licesnsed media, and hard code product keys accordingly
|
||||
- ProductKey: must be removed if using an eval version
|
||||
- The OOBE and UserAccounts sections: might be removed for administrator details
|
||||
- The Timezone in this file should match the location your using (otherwise you hit race conditions related to time.windows.com)
|
||||
- We hard code an administrative passcode in here, which administrators may need to modify
|
||||
- There are many other parameters in here which may need to be changed. Over time we will parameterize these as part of the image-builder process
|
||||
**************************************************-->
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DriverPaths>
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="A">
|
||||
<Path>a:\</Path>
|
||||
</PathAndCredentials>
|
||||
</DriverPaths>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DiskConfiguration>
|
||||
<Disk wcm:action="add">
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Type>Primary</Type>
|
||||
<Size>350</Size>
|
||||
</CreatePartition>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Extend>true</Extend>
|
||||
<Order>2</Order>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Label>System</Label>
|
||||
<Format>NTFS</Format>
|
||||
<PartitionID>1</PartitionID>
|
||||
<TypeID>0x27</TypeID>
|
||||
</ModifyPartition>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<PartitionID>2</PartitionID>
|
||||
<Letter>C</Letter>
|
||||
<Label>OS</Label>
|
||||
<Format>NTFS</Format>
|
||||
</ModifyPartition>
|
||||
</ModifyPartitions>
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
</Disk>
|
||||
</DiskConfiguration>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/NAME</Key>
|
||||
<Value>Windows Server SERVERSTANDARDACORE</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>2</PartitionID>
|
||||
</InstallTo>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
<UserData>
|
||||
<ProductKey>
|
||||
<Key>N2KJX-J94YW-TQVFB-DG9YT-724CC</Key>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</ProductKey>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<FullName>Administrator</FullName>
|
||||
<Organization>Organization</Organization>
|
||||
</UserData>
|
||||
<EnableFirewall>true</EnableFirewall>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SetupUILanguage>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
</SetupUILanguage>
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="offlineServicing">
|
||||
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<EnableLUA>false</EnableLUA>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="generalize">
|
||||
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SkipRearm>1</SkipRearm>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<RunSynchronous>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<WillReboot>Always</WillReboot>
|
||||
<Path>e:\setup64.exe /s /v "/qb REBOOT=R ADDLOCAL=ALL"</Path>
|
||||
<Order>1</Order>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SkipAutoActivation>true</SkipAutoActivation>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<CEIPEnabled>0</CEIPEnabled>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ProductKey>N2KJX-J94YW-TQVFB-DG9YT-724CC</ProductKey>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="oobeSystem">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<RegisteredOrganization>Organization</RegisteredOrganization>
|
||||
<RegisteredOwner>Owner</RegisteredOwner>
|
||||
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
|
||||
<TimeZone>Pacific Standard Time</TimeZone>
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
<LocalAccounts>
|
||||
<LocalAccount wcm:action="add">
|
||||
<Password>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Name>Administrator</Name>
|
||||
<Group>Administrators</Group>
|
||||
<DisplayName>Administrator</DisplayName>
|
||||
<Description>Administrator</Description>
|
||||
</LocalAccount>
|
||||
</LocalAccounts>
|
||||
</UserAccounts>
|
||||
<FirstLogonCommands>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<Description>Set Execution Policy 64 Bit</Description>
|
||||
<Order>1</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Description>Set Execution Policy 32 Bit</Description>
|
||||
<CommandLine>%SystemRoot%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Description>Zero Hibernation File</Description>
|
||||
<Order>3</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Description>Disable Hibernation</Description>
|
||||
<Order>4</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>5</Order>
|
||||
<CommandLine>cmd.exe /c wmic useraccount where "name='Administrator'" set PasswordExpires=FALSE</CommandLine>
|
||||
<Description>Disable password expiration for Administrator user</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c %SystemDrive%\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\enable-winrm.ps1</CommandLine>
|
||||
<Description>Enable WinRM</Description>
|
||||
<Order>6</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c a:\disable-network-discovery.cmd</CommandLine>
|
||||
<Description>Disable Network Discovery</Description>
|
||||
<Order>7</Order>
|
||||
</SynchronousCommand>
|
||||
</FirstLogonCommands>
|
||||
<AutoLogon>
|
||||
<Password>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Enabled>true</Enabled>
|
||||
<Username>Administrator</Username>
|
||||
</AutoLogon>
|
||||
</component>
|
||||
</settings>
|
||||
<cpi:offlineImage cpi:source="wim:c:/windows-2004/sources/install.wim#Windows Server SERVERSTANDARDACORE"
|
||||
xmlns:cpi="urn:schemas-microsoft-com:cpi" />
|
||||
</unattend>
|
255
packer/ova/windows/windows-2019/autounattend.xml
Normal file
255
packer/ova/windows/windows-2019/autounattend.xml
Normal file
@ -0,0 +1,255 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--*************************************************
|
||||
Windows Server 2019 Answer File Generator
|
||||
Created using Windows AFG found at:
|
||||
;http://www.windowsafg.com
|
||||
|
||||
Installation Notes:
|
||||
- We currently assume your image is using a licesnsed media, and hard code product keys accordingly
|
||||
- ProductKey: must be removed if using an eval version
|
||||
- The OOBE and UserAccounts sections: might be removed for administrator details
|
||||
- The Timezone in this file should match the location your using (otherwise you hit race conditions related to time.windows.com)
|
||||
- We hard code an administrative passcode in here, which administrators may need to modify
|
||||
- There are many other parameters in here which may need to be changed. Over time we will parameterize these as part of the image-builder process
|
||||
**************************************************-->
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DriverPaths>
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="A">
|
||||
<Path>a:\</Path>
|
||||
</PathAndCredentials>
|
||||
</DriverPaths>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DiskConfiguration>
|
||||
<Disk wcm:action="add">
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Size>350</Size>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Extend>true</Extend>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Format>NTFS</Format>
|
||||
<Label>System</Label>
|
||||
<Order>1</Order>
|
||||
<PartitionID>1</PartitionID>
|
||||
<TypeID>0x27</TypeID>
|
||||
</ModifyPartition>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<PartitionID>2</PartitionID>
|
||||
<Letter>C</Letter>
|
||||
<Label>OS</Label>
|
||||
<Format>NTFS</Format>
|
||||
</ModifyPartition>
|
||||
</ModifyPartitions>
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
</Disk>
|
||||
</DiskConfiguration>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>2</PartitionID>
|
||||
</InstallTo>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/NAME</Key>
|
||||
<Value>Windows Server 2019 SERVERSTANDARDCORE</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
<UserData>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<FullName>Administrator</FullName>
|
||||
<Organization>Organization</Organization>
|
||||
<ProductKey>
|
||||
<Key>N69G4-B89J2-4G8F4-WWYCC-J464C</Key>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</ProductKey>
|
||||
</UserData>
|
||||
<EnableFirewall>true</EnableFirewall>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SetupUILanguage>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
</SetupUILanguage>
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="offlineServicing">
|
||||
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<EnableLUA>false</EnableLUA>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="generalize">
|
||||
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SkipRearm>1</SkipRearm>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<RunSynchronous>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<WillReboot>Always</WillReboot>
|
||||
<Path>e:\setup64.exe /s /v "/qb REBOOT=R ADDLOCAL=ALL"</Path>
|
||||
<Order>1</Order>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SkipAutoActivation>true</SkipAutoActivation>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<CEIPEnabled>0</CEIPEnabled>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ComputerName></ComputerName>
|
||||
<ProductKey>N69G4-B89J2-4G8F4-WWYCC-J464C</ProductKey>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="oobeSystem">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<AutoLogon>
|
||||
<Password>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Enabled>true</Enabled>
|
||||
<Username>Administrator</Username>
|
||||
</AutoLogon>
|
||||
<FirstLogonCommands>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Description>Set Execution Policy 64 Bit</Description>
|
||||
<CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Description>Set Execution Policy 32 Bit</Description>
|
||||
<CommandLine>%SystemDrive%\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>3</Order>
|
||||
<Description>Show file extensions in Explorer</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>4</Order>
|
||||
<Description>Enable QuickEdit mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>5</Order>
|
||||
<Description>Show Run command in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>6</Order>
|
||||
<Description>Show Administrative Tools in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>7</Order>
|
||||
<Description>Zero Hibernation File</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>8</Order>
|
||||
<Description>Disable Hibernation Mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c wmic useraccount where "name='Administrator'" set PasswordExpires=FALSE</CommandLine>
|
||||
<Order>9</Order>
|
||||
<Description>Disable password expiration for Administrator user</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c %SystemDrive%\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\enable-winrm.ps1</CommandLine>
|
||||
<Description>Enable WinRM</Description>
|
||||
<Order>10</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c a:\disable-network-discovery.cmd</CommandLine>
|
||||
<Description>Disable Network Discovery</Description>
|
||||
<Order>11</Order>
|
||||
</SynchronousCommand>
|
||||
</FirstLogonCommands>
|
||||
<OOBE>
|
||||
<HideEULAPage>true</HideEULAPage>
|
||||
<HideLocalAccountScreen>true</HideLocalAccountScreen>
|
||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||
<NetworkLocation>Work</NetworkLocation>
|
||||
<ProtectYourPC>1</ProtectYourPC>
|
||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||
<SkipUserOOBE>true</SkipUserOOBE>
|
||||
</OOBE>
|
||||
<RegisteredOrganization>Organization</RegisteredOrganization>
|
||||
<RegisteredOwner>Owner</RegisteredOwner>
|
||||
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
|
||||
<TimeZone>Pacific Standard Time</TimeZone>
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
<LocalAccounts>
|
||||
<LocalAccount wcm:action="add">
|
||||
<Description>Administrator</Description>
|
||||
<DisplayName>Administrator</DisplayName>
|
||||
<Group>Administrators</Group>
|
||||
<Name>Administrator</Name>
|
||||
</LocalAccount>
|
||||
</LocalAccounts>
|
||||
</UserAccounts>
|
||||
</component>
|
||||
</settings>
|
||||
</unattend>
|
256
packer/ova/windows/windows-2022/autounattend.xml
Normal file
256
packer/ova/windows/windows-2022/autounattend.xml
Normal file
@ -0,0 +1,256 @@
|
||||
<!--*************************************************
|
||||
Windows Server 2019 Answer File Generator
|
||||
Created using Windows AFG found at:
|
||||
;http://www.windowsafg.com
|
||||
|
||||
Installation Notes:
|
||||
- We currently assume your image is using a licesnsed media, and hard code product keys accordingly
|
||||
- ProductKey: must be removed if using an eval version
|
||||
- The OOBE and UserAccounts sections: might be removed for administrator details
|
||||
- The Timezone in this file should match the location your using (otherwise you hit race conditions related to time.windows.com)
|
||||
- We hard code an administrative passcode in here, which administrators may need to modify
|
||||
- There are many other parameters in here which may need to be changed. Over time we will parameterize these as part of the image-builder process
|
||||
**************************************************-->
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DriverPaths>
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="A">
|
||||
<Path>a:\</Path>
|
||||
</PathAndCredentials>
|
||||
</DriverPaths>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DiskConfiguration>
|
||||
<Disk wcm:action="add">
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Size>350</Size>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Extend>true</Extend>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Format>NTFS</Format>
|
||||
<Label>System</Label>
|
||||
<Order>1</Order>
|
||||
<PartitionID>1</PartitionID>
|
||||
<TypeID>0x27</TypeID>
|
||||
</ModifyPartition>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<PartitionID>2</PartitionID>
|
||||
<Letter>C</Letter>
|
||||
<Label>OS</Label>
|
||||
<Format>NTFS</Format>
|
||||
</ModifyPartition>
|
||||
</ModifyPartitions>
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
</Disk>
|
||||
</DiskConfiguration>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>2</PartitionID>
|
||||
</InstallTo>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/NAME</Key>
|
||||
<Value>Windows Server 2022 SERVERSTANDARDCORE</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
<UserData>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<FullName>Administrator</FullName>
|
||||
<Organization>Organization</Organization>
|
||||
<ProductKey>
|
||||
<Key>VDYBN-27WPP-V4HQT-9VMD4-VMK7H</Key>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</ProductKey>
|
||||
</UserData>
|
||||
<EnableFirewall>true</EnableFirewall>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SetupUILanguage>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
</SetupUILanguage>
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="offlineServicing">
|
||||
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<EnableLUA>false</EnableLUA>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="generalize">
|
||||
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SkipRearm>1</SkipRearm>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<RunSynchronous>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<WillReboot>Always</WillReboot>
|
||||
<Path>e:\setup64.exe /s /v "/qb REBOOT=R ADDLOCAL=ALL"</Path>
|
||||
<Order>1</Order>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SkipAutoActivation>true</SkipAutoActivation>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<CEIPEnabled>0</CEIPEnabled>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ComputerName></ComputerName>
|
||||
<ProductKey>VDYBN-27WPP-V4HQT-9VMD4-VMK7H</ProductKey>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="oobeSystem">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<AutoLogon>
|
||||
<Password>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Enabled>true</Enabled>
|
||||
<Username>Administrator</Username>
|
||||
</AutoLogon>
|
||||
<FirstLogonCommands>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Description>Set Execution Policy 64 Bit</Description>
|
||||
<CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Description>Set Execution Policy 32 Bit</Description>
|
||||
<CommandLine>%SystemDrive%\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>3</Order>
|
||||
<Description>Show file extensions in Explorer</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>4</Order>
|
||||
<Description>Enable QuickEdit mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>5</Order>
|
||||
<Description>Show Run command in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>6</Order>
|
||||
<Description>Show Administrative Tools in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>7</Order>
|
||||
<Description>Zero Hibernation File</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>8</Order>
|
||||
<Description>Disable Hibernation Mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c wmic useraccount where "name='Administrator'" set PasswordExpires=FALSE</CommandLine>
|
||||
<Order>9</Order>
|
||||
<Description>Disable password expiration for Administrator user</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c %SystemDrive%\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\enable-winrm.ps1</CommandLine>
|
||||
<Description>Enable WinRM</Description>
|
||||
<Order>10</Order>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c a:\disable-network-discovery.cmd</CommandLine>
|
||||
<Description>Disable Network Discovery</Description>
|
||||
<Order>11</Order>
|
||||
</SynchronousCommand>
|
||||
</FirstLogonCommands>
|
||||
<OOBE>
|
||||
<HideEULAPage>true</HideEULAPage>
|
||||
<HideLocalAccountScreen>true</HideLocalAccountScreen>
|
||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||
<NetworkLocation>Work</NetworkLocation>
|
||||
<ProtectYourPC>1</ProtectYourPC>
|
||||
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||
<SkipUserOOBE>true</SkipUserOOBE>
|
||||
</OOBE>
|
||||
<RegisteredOrganization>Organization</RegisteredOrganization>
|
||||
<RegisteredOwner>Owner</RegisteredOwner>
|
||||
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
|
||||
<TimeZone>Pacific Standard Time</TimeZone>
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value>S3cr3t0!</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
<LocalAccounts>
|
||||
<LocalAccount wcm:action="add">
|
||||
<Description>Administrator</Description>
|
||||
<DisplayName>Administrator</DisplayName>
|
||||
<Group>Administrators</Group>
|
||||
<Name>Administrator</Name>
|
||||
</LocalAccount>
|
||||
</LocalAccounts>
|
||||
</UserAccounts>
|
||||
</component>
|
||||
</settings>
|
||||
</unattend>
|
Reference in New Issue
Block a user