Begin adding VMWare
This commit is contained in:
committed by
greg-compass
parent
15044c8fb9
commit
a56b40249b
@@ -3,6 +3,7 @@
|
||||
set -ex
|
||||
|
||||
port="${1}" # HTTP port that packer is running on
|
||||
host="${2}"
|
||||
|
||||
loadkeys en # Probably not necessary in a script, but here we are
|
||||
|
||||
@@ -40,7 +41,7 @@ pacstrap -K /mnt base linux nano sudo networkmanager openssh grub python3
|
||||
genfstab -L /mnt >> /mnt/etc/fstab
|
||||
|
||||
# Run stuff in the chroot
|
||||
curl -o /mnt/in-chroot.sh http://10.0.2.2:"${port}"/in-chroot.sh
|
||||
curl -o /mnt/in-chroot.sh "http://${host}:${port}/in-chroot.sh"
|
||||
arch-chroot /mnt /usr/bin/bash /in-chroot.sh "${disk}"
|
||||
rm /mnt/in-chroot.sh
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ boot_command = [
|
||||
"<wait60>", # Wait for system to come up?
|
||||
"curl -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/install.sh<enter>",
|
||||
"<wait5>",
|
||||
"/usr/bin/bash /tmp/install.sh {{ .HTTPPort }}<enter>"
|
||||
"/usr/bin/bash /tmp/install.sh {{ .HTTPPort }} {{ .HTTPIP }}<enter>"
|
||||
]
|
||||
http_directory = "distros/archlinux/rolling/http/"
|
||||
boot_wait = "10s"
|
||||
|
||||
@@ -3,3 +3,5 @@ rolling:
|
||||
provider: qemu
|
||||
- arch: x86_64
|
||||
provider: virtualbox-iso
|
||||
- arch: x86_64
|
||||
provider: vmware-iso
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
8:
|
||||
8: &supp
|
||||
- arch: x86_64
|
||||
provider: qemu
|
||||
- arch: x86_64
|
||||
provider: virtualbox-iso
|
||||
9:
|
||||
- arch: x86_64
|
||||
provider: qemu
|
||||
- arch: x86_64
|
||||
provider: virtualbox-iso
|
||||
provider: vmware-iso
|
||||
9: *supp
|
||||
|
||||
@@ -3,3 +3,5 @@
|
||||
provider: qemu
|
||||
- arch: x86_64
|
||||
provider: virtualbox-iso
|
||||
- arch: x86_64
|
||||
provider: vmware-iso
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
provider: qemu
|
||||
- arch: x86_64
|
||||
provider: virtualbox-iso
|
||||
- arch: x86_64
|
||||
provider: vmware-iso
|
||||
11: *supp
|
||||
12: *supp
|
||||
#9: *supp # EOL
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
provider: qemu
|
||||
- arch: x86_64
|
||||
provider: virtualbox-iso
|
||||
- arch: x86_64
|
||||
provider: vmware-iso
|
||||
38: *supp
|
||||
rawhide: []
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
set -ex
|
||||
|
||||
port="${1}" # HTTP port that packer is running on
|
||||
host="${2}"
|
||||
|
||||
if [ -e /dev/vda ]; then
|
||||
disk="/dev/vda"
|
||||
@@ -34,13 +35,13 @@ mount "${disk}1" /mnt
|
||||
|
||||
# Bootstrap system
|
||||
nixos-generate-config --root /mnt
|
||||
curl -o /mnt/etc/nixos/configuration.nix http://10.0.2.2:"${port}"/configuration.nix
|
||||
curl -o /mnt/etc/nixos/configuration.nix "http://${host}:${port}/configuration.nix"
|
||||
sed -i -E -e "s,@BOOT_DEVICE@,${disk}," /mnt/etc/nixos/configuration.nix
|
||||
sed -i -E -e 's,(.*device = "/dev/disk/).*(".*),\1by-label/root\2,' /mnt/etc/nixos/hardware-configuration.nix
|
||||
nixos-install --no-root-password
|
||||
|
||||
# Run stuff in the chroot
|
||||
curl -o /mnt/root/in-chroot.sh http://10.0.2.2:"${port}"/in-chroot.sh
|
||||
curl -o /mnt/root/in-chroot.sh "http://${host}:${port}/in-chroot.sh"
|
||||
nixos-enter --root /mnt -c 'bash /root/in-chroot.sh'
|
||||
rm /mnt/root/in-chroot.sh
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@ distro = "nixos"
|
||||
version = "23.05"
|
||||
iso = {
|
||||
url = "https://channels.nixos.org/nixos-23.05/latest-nixos-minimal-x86_64-linux.iso"
|
||||
checksum = "f5df994324bc474e834200c8d641ba32492474112e95b63df3153a906ad0bca8"
|
||||
checksum = "e2a0bc2be3b6638692393a19435838d464149914dbd942010e31a3c8c84c82d5"
|
||||
}
|
||||
boot_command = [
|
||||
"<tab><wait> net.ifnames=0<wait> <wait>bi<wait>osdevnames=0<enter>",
|
||||
"<wait60>", # Wait for system to come up?
|
||||
"curl -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/install.sh<enter>",
|
||||
"<wait>",
|
||||
"sudo bash /tmp/install.sh {{ .HTTPPort }}<enter>"
|
||||
"sudo bash /tmp/install.sh {{ .HTTPPort }} {{ .HTTPIP }}<enter>"
|
||||
]
|
||||
http_directory = "distros/nixos/23.05/http/"
|
||||
boot_wait = "5s"
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
provider: qemu
|
||||
- arch: x86_64
|
||||
provider: virtualbox-iso
|
||||
- arch: x86_64
|
||||
provider: vmware-iso
|
||||
22.04: *supp
|
||||
#18.04: *supp # EOL
|
||||
|
||||
Reference in New Issue
Block a user