Hyperv Debian + UEFI
This commit is contained in:
@@ -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/"
|
||||
|
||||
@@ -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
|
||||
@@ -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'
|
||||
@@ -5,12 +5,17 @@ iso = {
|
||||
checksum = "d7a74813a734083df30c8d35784926deaa36bc41e5c0766388e9f591ab056b72"
|
||||
}
|
||||
boot_command = [
|
||||
"<esc><wait>",
|
||||
"auto <wait>",
|
||||
"DEBIAN<wait>_FRONTEND<wait>=text <wait>",
|
||||
"preseed<wait>/url<wait>=http://{{.HTTPIP}}<wait>:{{ .HTTPPort }}<wait>/preseed<wait>.cfg <wait>",
|
||||
"console<wait>=tty0 <wait>",
|
||||
"--- <wait>net<wait>.ifnames<wait>=0 <wait>bios<wait>dev<wait>names=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/11/http/"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
apt autoremove -y
|
||||
# 5 minute wait for the lock timeout
|
||||
apt-get -o DPkg::Lock::Timeout=600 autoremove -y
|
||||
|
||||
# Configure sshd to be faster
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
@@ -14,8 +15,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 hv-fcopy-daemon
|
||||
systemctl enable hv-kvp-daemon
|
||||
systemctl enable hv-vss-daemon
|
||||
fi
|
||||
@@ -11,39 +11,30 @@ 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
|
||||
|
||||
# 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
|
||||
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
|
||||
|
||||
@@ -58,9 +49,4 @@ d-i preseed/late_command string
|
||||
chmod 440 /target/etc/sudoers.d/vagrant; \
|
||||
sed -i -e 's/ens3/ens5/g' /target/etc/network/interfaces; \
|
||||
in-target apt-get update; \
|
||||
in-target apt-get upgrade -y
|
||||
|
||||
#echo '[Match]' >> /target/etc/systemd/network/dhcp.network; \
|
||||
#echo 'Name=en*' >> /target/etc/systemd/network/dhcp.network; \
|
||||
#echo '[Network]' >> /target/etc/systemd/network/dhcp.network; \
|
||||
#echo 'DHCP=yes' >> /target/etc/systemd/network/dhcp.network; \
|
||||
in-target apt-get upgrade -y
|
||||
@@ -5,12 +5,17 @@ iso = {
|
||||
checksum = "64d727dd5785ae5fcfd3ae8ffbede5f40cca96f1580aaa2820e8b99dae989d94"
|
||||
}
|
||||
boot_command = [
|
||||
"<esc><wait>",
|
||||
"auto ",
|
||||
"DEBIAN_FRONTEND=text ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
|
||||
"console=tty0 ",
|
||||
"--- net.ifnames=0 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/12/http/"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
apt autoremove -y
|
||||
# 5 minute timeout for the package lock to arrive
|
||||
apt-get -o DPkg::Lock::Timeout=600 autoremove -y
|
||||
|
||||
# Configure sshd to be faster
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
@@ -14,8 +15,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 hv-fcopy-daemon
|
||||
systemctl enable hv-kvp-daemon
|
||||
systemctl enable hv-vss-daemon
|
||||
fi
|
||||
@@ -1,5 +1,3 @@
|
||||
d-i auto-install/enable boolean true
|
||||
d-i apt-setup/disable-cdrom-entries boolean true
|
||||
d-i debian-installer/locale string en_US
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
|
||||
@@ -15,14 +13,12 @@ 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 \
|
||||
512 50 512 fat32 \
|
||||
$primary{ } \
|
||||
$bootable{ } \
|
||||
method{ format } \
|
||||
method{ efi } \
|
||||
format{ } \
|
||||
use_filesystem{ } \
|
||||
filesystem{ ext4 } \
|
||||
mountpoint{ /boot } . \
|
||||
mountpoint{ /boot/efi } . \
|
||||
200% 0 200% linux-swap \
|
||||
$primary{ } \
|
||||
method{ swap } \
|
||||
@@ -39,13 +35,24 @@ d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
# 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
|
||||
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
|
||||
|
||||
@@ -55,8 +62,9 @@ d-i preseed/early_command string
|
||||
-e "/in-target/i echo 'discover=d' >> /target/etc/discover-pkginstall.conf" \
|
||||
/usr/lib/pre-pkgsel.d/20install-hwpackages
|
||||
d-i preseed/late_command string \
|
||||
echo 'Defaults:vagrant !nrequiretty' > /target/etc/sudoers.d/vagrant; \
|
||||
echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \
|
||||
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \
|
||||
chmod 440 /target/etc/sudoers.d/vagrant; \
|
||||
sed -i -e 's/ens3/ens5/g' /target/etc/network/interfaces; \
|
||||
in-target apt-get update; \
|
||||
in-target apt-get upgrade -y
|
||||
in-target apt-get upgrade -y
|
||||
@@ -5,6 +5,13 @@
|
||||
provider: virtualbox-iso
|
||||
- arch: amd64
|
||||
provider: vmware-iso
|
||||
- arch: amd64
|
||||
provider: hyperv-iso
|
||||
11: *supp
|
||||
12: *supp
|
||||
#9: *supp # EOL
|
||||
12:
|
||||
- arch: amd64
|
||||
provider: qemu
|
||||
- arch: amd64
|
||||
provider: vmware-iso
|
||||
- arch: amd64
|
||||
provider: hyperv-iso
|
||||
Reference in New Issue
Block a user