Files
vms/distros/centos/7/disc/ks.cfg
T
Greg HellingsandGitHub ebbc8a7371 Hyperv (#14)
* Do not commit the .venv file

* Fix packer formatting issues

* I am, once again, asking to fix the cache path

* Fix URI generation for tests

* Prevent prompting during Hyper-V tests

* Add more waits to hopefully build on GHA

* Hyper-V ISO expansion

Expand coverage of Hyper-V ISO to all distros except Debian
Simplify a few steps in the update/upgrade process for VMs
Edit the test script for Windows support

* Fix plugin cache path on Mac

* Point to the correct mirror URL
2023-12-07 12:15:48 -06:00

75 lines
1.5 KiB
INI

install
text
reboot
network --bootproto=dhcp --activate
url --url=http://mirror.centos.org/centos/7/os/x86_64/
repo --name=updates --baseurl=http://mirror.centos.org/centos/7/updates/x86_64/
lang en_US.UTF-8
keyboard us
timezone --utc Etc/UTC
rootpw --plaintext vagrant
user --name=vagrant --groups=vagrant --password=vagrant --plaintext
zerombr
clearpart --all --initlabel
autopart --type=plain
bootloader --timeout=1
%packages
@core
which
libselinux-python
# mandatory packages in the @core group
-btrfs-progs
-iprutils
-kexec-tools
-plymouth
# default packages in the @core group
-*-firmware
-dracut-config-rescue
-kernel-tools
-libsysfs
-microcode_ctl
-NetworkManager*
-postfix
-rdma
%end
%pre
# In Hyper-V this needs a re-do for some reason
virt="$(systemd-detect-virt)"
if [ "${virt}" == "microsoft" ]; then
nmcli c down eth0
nmcli c up eth0
fi
%end
%post --erroronfail
yum -y update
cat <<EOF > /etc/sudoers.d/vagrant
Defaults:vagrant !requiretty
vagrant ALL=(ALL) NOPASSWD: ALL
EOF
chmod 440 /etc/sudoers.d/vagrant
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
EOF
sed -i -E -e 's/^.*UseDNS.*$/UseDNS no/'
echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/sshd_config
virt="$(systemd-detect-virt)"
if [ "${virt}" == "microsoft" ]; then
yum install -y hyperv-daemons
systemctl enable hpervfcopyd
systemctl enable hypervkvpd
systemctl enable hypervvssd
fi
%end