Hyperv Debian + UEFI

This commit is contained in:
Greg Hellings
2023-12-30 05:37:32 +00:00
parent 76abdb9132
commit b11669345e
112 changed files with 468 additions and 850 deletions
+12 -7
View File
@@ -5,12 +5,17 @@ iso = {
checksum = "75aa64071060402a594dcf1e14afd669ca0f8bf757b56d4c9c1a31b8f7c8f931"
}
boot_command = [
"<esc><wait>",
"auto <wait>",
"DEBIAN_FRONTEND=text <wait>",
"preseed/url<wait>=http://{{.HTTPIP}}<wait>:{{ .HTTPPort }}/preseed.cfg <wait>",
"console=tty0 <wait>",
"--- <wait>net.ifnames=0 <wait>biosdevnames=0 <wait>",
"<enter>"
"<down>e<wait><down><down><down><end><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"auto ",
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
"ipv6.disable=1 ",
"debian-installer=en_US locale=en_US kbd-chooser/method=us ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
"keyboard-configuration/xkb-keymap=us ",
"debconf/frontend=noninteractive ",
"hostname={{.Name}} ",
"domain=vagrant ",
"<f10>"
]
http_directory = "distros/debian/10/http/"
+6 -5
View File
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
set -ex
apt autoremove -y
# 5 minute way to acquire package lock
apt-get -o DPkg::Lock::Timeout=600 autoremove -y
# Configure sshd to be faster
sed -i -E -e 's,^.*(UseDNS).*$,\1 No,' /etc/ssh/sshd_config
@@ -12,8 +13,8 @@ apt-get clean
virt="$(systemd-detect-virt)"
if [ "${virt}" == "microsoft" ]; then
yum install -y hyperv-daemons
systemctl enable hpervfcopyd
systemctl enable hypervkvpd
systemctl enable hypervvssd
apt-get install -y hyperv-daemons
systemctl enable hyperv-daemons.hv-fcopy-daemon
systemctl enable hyperv-daemons.hv-kvp-daemon
systemctl enable hyperv-daemons.hv-vss-daemon
fi
+21 -23
View File
@@ -11,39 +11,36 @@ d-i passwd/user-password-again password vagrant
d-i time/zone string UTC
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string \
scheme :: \
200 0 200 ext4 \
$primary{ } \
$bootable{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ /boot } . \
200% 0 200% linux-swap \
$primary{ } \
method{ swap } \
format{ } . \
1 0 -1 ext4 \
$primary{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } .
d-i partman-auto/choose_recipe select atomic
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
# Network settings
d-i netcfg/enable boolean true
d-i netcfg/use_autoconfig boolean true
d-i netcfg/hostname string vagrant
d-i netcfg/domain string vagrant
# Settings for package manager
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
d-i mirror/country string manual
d-i mirror/http/hostname string httpredir.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
# Package selection
tasksel tasksel/first multiselect
d-i pkgsel/include string curl openssh-server sudo python3 hyperv-daemons
d-i pkgsel/include string curl openssh-server sudo python3 network-manager
popularity-contest popularity-contest/participate boolean false
d-i grub-installer/bootdev string default
d-i grub-installer/force-efi-extra-removable boolean true
d-i finish-install/reboot_in_progress note
@@ -57,4 +54,5 @@ d-i preseed/late_command string
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \
chmod 440 /target/etc/sudoers.d/vagrant; \
in-target apt-get update; \
in-target apt-get upgrade -y
in-target apt-get upgrade -y; \
in-target bash -c 'if [ "$(systemd-detect-virt)" == "microsoft" ]; then apt-get install -y hyperv-daemons; fi'