Skip to content

Commit

Permalink
updated to boot iso's
Browse files Browse the repository at this point in the history
Signed-off-by: Corey Hemminger <[email protected]>
  • Loading branch information
Stromweld committed Feb 10, 2025
1 parent 03e60b1 commit 155eddc
Show file tree
Hide file tree
Showing 51 changed files with 833 additions and 161 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pkr-bld-amazonlinux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
fail-fast: false
matrix:
os:
- amazonlinux-2
- amazonlinux-2023
steps:
- name: Install Vagrant and VirtualBox
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkr-bld-hyperv-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- almalinux-8
- almalinux-9
- centos-stream-9
- centos-stream-10
- debian-11
- debian-12
- fedora-40
Expand All @@ -27,7 +28,6 @@ jobs:
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
provider:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkr-bld-parallels-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- almalinux-8
- almalinux-9
- centos-stream-9
- centos-stream-10
- debian-11
- debian-12
- fedora-40
Expand All @@ -27,7 +28,6 @@ jobs:
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
provider:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkr-bld-parallels-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- almalinux-8
- almalinux-9
- centos-stream-9
- centos-stream-10
- debian-11
- debian-12
- fedora-40
Expand All @@ -27,7 +28,6 @@ jobs:
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
provider:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkr-bld-qemu-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- almalinux-8
- almalinux-9
- centos-stream-9
- centos-stream-10
- debian-11
- debian-12
- fedora-40
Expand All @@ -27,7 +28,6 @@ jobs:
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
provider:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkr-bld-qemu-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- almalinux-8
- almalinux-9
- centos-stream-9
- centos-stream-10
- debian-11
- debian-12
- fedora-40
Expand All @@ -27,7 +28,6 @@ jobs:
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
provider:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkr-bld-virtualbox-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- almalinux-8
- almalinux-9
- centos-stream-9
- centos-stream-10
- debian-11
- debian-12
- fedora-40
Expand All @@ -27,7 +28,6 @@ jobs:
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
provider:
Expand All @@ -40,7 +40,7 @@ jobs:
brew tap hashicorp/tap
brew update
brew install --cask hashicorp/tap/hashicorp-vagrant
brew install --cask virtualbox@beta
brew install --cask virtualbox
- name: Install Chef
uses: actionshub/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkr-bld-virtualbox-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- almalinux-8
- almalinux-9
- centos-stream-9
- centos-stream-10
- debian-11
- debian-12
- fedora-40
Expand All @@ -27,7 +28,6 @@ jobs:
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
provider:
Expand All @@ -42,7 +42,7 @@ jobs:
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt-get update
sudo apt-get install -y software-properties-common vagrant virtualbox-7.0
sudo apt-get install -y software-properties-common vagrant virtualbox-7.1
- name: Install Chef
uses: actionshub/[email protected]
with:
Expand Down
35 changes: 26 additions & 9 deletions .github/workflows/pkr-bld-vmware-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- almalinux-8
- almalinux-9
- centos-stream-9
- centos-stream-10
- debian-11
- debian-12
- fedora-40
Expand All @@ -27,7 +28,6 @@ jobs:
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
provider:
Expand All @@ -50,13 +50,24 @@ jobs:
NAT_MAC_CONF="/Library/Preferences/VMware Fusion/vmnet8/nat.mac"
DHCPD_CONFIG='
# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8.
#
# This file was automatically generated by the VMware configuration program.
# See Instructions below if you want to modify it.
#
# We set domain-name-servers to make some DHCP clients happy
# (dhclient as configured in SuSE, TurboLinux, etc.).
# We also supply a domain name to make pump (Red Hat 6.x) happy.
#
###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" #####
# Modification Instructions: This section of the configuration file contains
# information generated by the configuration program. Do not modify this
# section.
# You are free to modify everything else. Also, this section must start
# on a new line
# This file will get backed up with a different name in the same directory
# if this section is edited and you try to configure DHCP again.
# Written at: 05/20/2024 11:50:44
# Written at: 01/13/2025 14:31:48
allow unknown-clients;
default-lease-time 1800; # default is 30 minutes
max-lease-time 7200; # default is 2 hours
Expand All @@ -82,6 +93,7 @@ jobs:
'
NAT_CONFIG="
# VMware NAT configuration file
# Manual editing of this file is not recommended. Using UI is preferred.
[host]
# Use MacOS network virtualization API
useMacosVmnetVirtApi = 1
Expand All @@ -92,13 +104,16 @@ jobs:
device = vmnet8
# Allow PORT/EPRT FTP commands (they need incoming TCP stream ...)
activeFTP = 1
# Allows the source to have any OUI. Turn this on if you change the OUI in the MAC address of your virtual machines.
# Allows the source to have any OUI. Turn this on if you change the OUI
# in the MAC address of your virtual machines.
allowAnyOUI = 1
# VMnet host IP address
hostIp = 172.16.38.1
# Controls if (TCP) connections should be reset when the adapter they are bound to goes down
# Controls if (TCP) connections should be reset when the adapter they are
# bound to goes down
resetConnectionOnLinkDown = 1
# Controls if (TCP) connection should be reset when guest packet's destination is NAT's IP address
# Controls if (TCP) connection should be reset when guest packet's destination
# is NAT's IP address
resetConnectionOnDestLocalHost = 1
# Controls if enable nat ipv6
natIp6Enable = 0
Expand All @@ -108,7 +123,9 @@ jobs:
# Value of timeout in TCP TIME_WAIT state, in seconds
timeWaitTimeout = 30
[udp]
# Timeout in seconds. Dynamically-created UDP mappings will purged if idle for this duration of time 0 = no timeout, default = 60; real value might be up to 100% longer
# Timeout in seconds. Dynamically-created UDP mappings will purged if
# idle for this duration of time 0 = no timeout, default = 60; real
# value might be up to 100% longer
timeout = 60
[netbios]
# Timeout for NBNS queries.
Expand All @@ -130,13 +147,13 @@ jobs:
NETWORKING_CONFIG="
VERSION=1,0
answer VNET_1_DHCP yes
answer VNET_1_DHCP_CFG_HASH 97D56988968565698E051056ADEDEEACF00F5981
answer VNET_1_DHCP_CFG_HASH 5F120565E3B0B0AC342F79EC042F0F4799B6D26A
answer VNET_1_HOSTONLY_NETMASK 255.255.255.0
answer VNET_1_HOSTONLY_SUBNET 172.16.252.0
answer VNET_1_HOSTONLY_UUID 74A7B7F5-AB8E-41CF-9E0F-595F9C9FA1C5
answer VNET_1_VIRTUAL_ADAPTER yes
answer VNET_8_DHCP yes
answer VNET_8_DHCP_CFG_HASH 2040265D0F7053A921FB3F6EDE944490D9E687D6
answer VNET_8_DHCP_CFG_HASH 927D275B6D70F56E200F5FF00ABA5D2EB7DF2F82
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_8_HOSTONLY_SUBNET 172.16.38.0
answer VNET_8_HOSTONLY_UUID 3CBAC6B3-6A71-4182-8BC6-849058A947B8
Expand Down
35 changes: 26 additions & 9 deletions .github/workflows/pkr-bld-vmware-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- almalinux-8
- almalinux-9
- centos-stream-9
- centos-stream-10
- debian-11
- debian-12
- fedora-40
Expand All @@ -27,7 +28,6 @@ jobs:
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
provider:
Expand All @@ -50,13 +50,24 @@ jobs:
NAT_MAC_CONF="/Library/Preferences/VMware Fusion/vmnet8/nat.mac"
DHCPD_CONFIG='
# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8.
#
# This file was automatically generated by the VMware configuration program.
# See Instructions below if you want to modify it.
#
# We set domain-name-servers to make some DHCP clients happy
# (dhclient as configured in SuSE, TurboLinux, etc.).
# We also supply a domain name to make pump (Red Hat 6.x) happy.
#
###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" #####
# Modification Instructions: This section of the configuration file contains
# information generated by the configuration program. Do not modify this
# section.
# You are free to modify everything else. Also, this section must start
# on a new line
# This file will get backed up with a different name in the same directory
# if this section is edited and you try to configure DHCP again.
# Written at: 05/20/2024 11:50:44
# Written at: 01/13/2025 14:31:48
allow unknown-clients;
default-lease-time 1800; # default is 30 minutes
max-lease-time 7200; # default is 2 hours
Expand All @@ -82,6 +93,7 @@ jobs:
'
NAT_CONFIG="
# VMware NAT configuration file
# Manual editing of this file is not recommended. Using UI is preferred.
[host]
# Use MacOS network virtualization API
useMacosVmnetVirtApi = 1
Expand All @@ -92,13 +104,16 @@ jobs:
device = vmnet8
# Allow PORT/EPRT FTP commands (they need incoming TCP stream ...)
activeFTP = 1
# Allows the source to have any OUI. Turn this on if you change the OUI in the MAC address of your virtual machines.
# Allows the source to have any OUI. Turn this on if you change the OUI
# in the MAC address of your virtual machines.
allowAnyOUI = 1
# VMnet host IP address
hostIp = 172.16.38.1
# Controls if (TCP) connections should be reset when the adapter they are bound to goes down
# Controls if (TCP) connections should be reset when the adapter they are
# bound to goes down
resetConnectionOnLinkDown = 1
# Controls if (TCP) connection should be reset when guest packet's destination is NAT's IP address
# Controls if (TCP) connection should be reset when guest packet's destination
# is NAT's IP address
resetConnectionOnDestLocalHost = 1
# Controls if enable nat ipv6
natIp6Enable = 0
Expand All @@ -108,7 +123,9 @@ jobs:
# Value of timeout in TCP TIME_WAIT state, in seconds
timeWaitTimeout = 30
[udp]
# Timeout in seconds. Dynamically-created UDP mappings will purged if idle for this duration of time 0 = no timeout, default = 60; real value might be up to 100% longer
# Timeout in seconds. Dynamically-created UDP mappings will purged if
# idle for this duration of time 0 = no timeout, default = 60; real
# value might be up to 100% longer
timeout = 60
[netbios]
# Timeout for NBNS queries.
Expand All @@ -130,13 +147,13 @@ jobs:
NETWORKING_CONFIG="
VERSION=1,0
answer VNET_1_DHCP yes
answer VNET_1_DHCP_CFG_HASH 97D56988968565698E051056ADEDEEACF00F5981
answer VNET_1_DHCP_CFG_HASH 5F120565E3B0B0AC342F79EC042F0F4799B6D26A
answer VNET_1_HOSTONLY_NETMASK 255.255.255.0
answer VNET_1_HOSTONLY_SUBNET 172.16.252.0
answer VNET_1_HOSTONLY_UUID 74A7B7F5-AB8E-41CF-9E0F-595F9C9FA1C5
answer VNET_1_VIRTUAL_ADAPTER yes
answer VNET_8_DHCP yes
answer VNET_8_DHCP_CFG_HASH 2040265D0F7053A921FB3F6EDE944490D9E687D6
answer VNET_8_DHCP_CFG_HASH 927D275B6D70F56E200F5FF00ABA5D2EB7DF2F82
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_8_HOSTONLY_SUBNET 172.16.38.0
answer VNET_8_HOSTONLY_UUID 3CBAC6B3-6A71-4182-8BC6-849058A947B8
Expand Down
23 changes: 13 additions & 10 deletions amazonlinux-2023-aarch64-virtualbox-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,30 @@ sleep 5

echo "Creating the VM"
# from https://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html
VBoxManage createvm --name $VM --ostype "Fedora_64" --register
VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --type hdd --medium "$AMZDIR"/amazon2023_arm64.vdi
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --type dvddrive --medium "$AMZDIR"/seed.iso
VBoxManage modifyvm $VM --chipset ich9
VBoxManage createvm --name $VM --ostype "Fedora_arm64" --register
VBoxManage storagectl $VM --name "VirtioSCSI" --add virtio-scsi --controller VirtIO
VBoxManage storageattach $VM --storagectl "VirtioSCSI" --port 0 --type hdd --medium "$AMZDIR"/amazon2023_arm64.vdi
VBoxManage storageattach $VM --storagectl "VirtioSCSI" --port 1 --type dvddrive --medium "$AMZDIR"/seed.iso
VBoxManage modifyvm $VM --chipset armv8virtual
VBoxManage modifyvm $VM --firmware efi
VBoxManage modifyvm $VM --memory 2048
VBoxManage modifyvm $VM --memory 4096
VBoxManage modifyvm $VM --cpus 2
VBoxManage modifyvm $VM --nat-localhostreachable1 on
VBoxManage modifyvm $VM --vram 33
VBoxManage modifyvm $VM --graphicscontroller vmsvga
VBoxManage modifyvm $VM --vrde off
VBoxManage modifyvm $VM --audio-driver none
VBoxManage modifyvm $VM --vrde on
VBoxManage modifyvm $VM --audio-enabled off
VBoxManage modifyvm $VM --ioapic on
VBoxManage modifyvm $VM --usb-xhci on
VBoxManage modifyvm $VM --mouse usb
VBoxManage modifyvm $VM --keyboard usb
sleep 5

echo "Sleeping for 120 seconds to let the system boot and cloud-init to run"
echo "Starting $VM then sleeping for 120 seconds to let the system boot and cloud-init to run"
VBoxManage startvm $VM --type headless
sleep 120
VBoxManage controlvm $VM poweroff --type headless
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --type dvddrive --medium none
VBoxManage storageattach $VM --storagectl "VirtioSCSI" --port 1 --type dvddrive --medium none
sleep 5

echo "Exporting the VM to an OVF file"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ os_arch = "aarch64"
vbox_source_path = "https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240312.0/vmware/al2023-vmware_esx-2023.3.20240312.0-kernel-6.1-x86_64.xfs.gpt.ova"
vbox_checksum = "file:https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240312.0/vmware/SHA256SUMS"
parallels_guest_os_type = "fedora-core"
vbox_guest_os_type = "Fedora_64"
vbox_guest_os_type = "Fedora_arm64"
vmware_guest_os_type = "arm-fedora-64"
sources_enabled = [
"source.virtualbox-ovf.vm"
Expand Down
6 changes: 3 additions & 3 deletions os_pkrvars/centos/centos-stream-10-aarch64.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
os_name = "centos-stream"
os_version = "10"
os_arch = "aarch64"
iso_url = "https://mirror.stream.centos.org/10-stream/BaseOS/aarch64/iso/CentOS-Stream-10-latest-aarch64-dvd1.iso"
iso_checksum = "file:https://mirror.stream.centos.org/10-stream/BaseOS/aarch64/iso/CentOS-Stream-10-latest-aarch64-dvd1.iso.SHA256SUM"
iso_url = "https://mirror.stream.centos.org/10-stream/BaseOS/aarch64/iso/CentOS-Stream-10-latest-aarch64-boot.iso"
iso_checksum = "file:https://mirror.stream.centos.org/10-stream/BaseOS/aarch64/iso/CentOS-Stream-10-latest-aarch64-boot.iso.SHA256SUM"
parallels_guest_os_type = "centos"
vbox_guest_os_type = "RedHat_64"
vmware_guest_os_type = "arm-rhel9-64"
boot_command = ["<wait><up>e<wait><down><down><end><wait> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/10ks.cfg <leftCtrlOn>x<leftCtrlOff>"]
boot_command = ["<wait><up>e<wait><down><down><end><wait> inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/10ks.cfg inst.repo=https://mirror.stream.centos.org/10-stream/BaseOS/aarch64/os/ <leftCtrlOn>x<leftCtrlOff>"]
Loading

0 comments on commit 155eddc

Please sign in to comment.