Skip to content

Commit fa1f50e

Browse files
Switch Ubuntu to boot from floppy
Choose between floppy & http boot methods based on OS
1 parent 75befb8 commit fa1f50e

File tree

6 files changed

+26
-12
lines changed

6 files changed

+26
-12
lines changed

images/capi/packer/ova/centos-7.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
"os_display_name": "CentOS 7",
77
"guest_os_type": "centos7-64",
88
"vsphere_guest_os_type": "centos7_64Guest",
9-
"iso_url": "https://mirrors.edge.kernel.org/centos/7.8.2003/isos/x86_64/CentOS-7-x86_64-Minimal-2003.iso",
10-
"iso_checksum": "659691c28a0e672558b003d223f83938f254b39875ee7559d1a4a14c79173193",
9+
"iso_url": "https://mirrors.edge.kernel.org/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso",
10+
"iso_checksum": "07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a",
1111
"iso_checksum_type": "sha256",
12+
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
1213
"boot_command_prefix": "<tab> text ks=",
14+
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}",
1315
"boot_command_suffix": "/7/ks.cfg<enter><wait>",
1416
"shutdown_command": "sys-unconfig"
1517
}

images/capi/packer/ova/packer-node.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
"disk_type_id": "{{user `disk_type_id`}}",
8484
"disk_adapter_type": "scsi",
8585
"boot_wait": "{{user `boot_wait`}}",
86-
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
8786
"guest_os_type": "{{user `guest_os_type`}}",
8887
"headless": "{{user `headless`}}",
8988
"iso_url": "{{user `iso_url`}}",
@@ -92,9 +91,11 @@
9291
"ssh_username": "{{user `ssh_username`}}",
9392
"ssh_password": "{{user `ssh_password`}}",
9493
"ssh_timeout": "4h",
94+
"http_directory": "{{ user `http_directory`}}",
95+
"floppy_dirs": "{{ user `floppy_dirs`}}",
9596
"boot_command": [
9697
"{{user `boot_command_prefix`}}",
97-
"http://{{ .HTTPIP }}:{{ .HTTPPort }}",
98+
"{{user `boot_media_path`}}",
9899
"{{user `boot_command_suffix`}}"
99100
],
100101
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c '{{user `shutdown_command`}}'",
@@ -127,7 +128,6 @@
127128
"disk_type_id": "{{user `disk_type_id`}}",
128129
"disk_adapter_type": "scsi",
129130
"boot_wait": "{{user `boot_wait`}}",
130-
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
131131
"guest_os_type": "{{user `guest_os_type`}}",
132132
"headless": "{{user `headless`}}",
133133
"iso_url": "{{user `iso_url`}}",
@@ -136,9 +136,11 @@
136136
"ssh_username": "{{user `ssh_username`}}",
137137
"ssh_password": "{{user `ssh_password`}}",
138138
"ssh_timeout": "4h",
139+
"http_directory": "{{ user `http_directory`}}",
140+
"floppy_dirs": "{{ user `floppy_dirs`}}",
139141
"boot_command": [
140142
"{{user `boot_command_prefix`}}",
141-
"http://{{ .HTTPIP }}:{{ .HTTPPort }}",
143+
"{{user `boot_media_path`}}",
142144
"{{user `boot_command_suffix`}}"
143145
],
144146
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'usermod -L {{user `ssh_username`}} && {{user `shutdown_command`}}'",
@@ -185,7 +187,6 @@
185187
"disk_controller_type": "{{user `disk_controller_type`}}",
186188
"guest_os_type": "{{user `vsphere_guest_os_type`}}",
187189
"boot_wait": "{{user `boot_wait`}}",
188-
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
189190
"iso_urls": "{{user `iso_url`}}",
190191
"iso_checksum": "{{user `iso_checksum_type`}}:{{user `iso_checksum`}}",
191192
"communicator": "ssh",
@@ -199,9 +200,11 @@
199200
"disk_thin_provisioned": "{{user `disk_thin_provisioned`}}"
200201
}
201202
],
203+
"http_directory": "{{ user `http_directory`}}",
204+
"floppy_dirs": "{{ user `floppy_dirs`}}",
202205
"boot_command": [
203206
"{{user `boot_command_prefix`}}",
204-
"http://{{ .HTTPIP }}:{{ .HTTPPort }}",
207+
"{{user `boot_media_path`}}",
205208
"{{user `boot_command_suffix`}}"
206209
],
207210
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c '{{user `shutdown_command`}}'",
@@ -238,7 +241,6 @@
238241
"disk_controller_type": "{{user `disk_controller_type`}}",
239242
"guest_os_type": "{{user `vsphere_guest_os_type`}}",
240243
"boot_wait": "{{user `boot_wait`}}",
241-
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
242244
"iso_urls": "{{user `iso_url`}}",
243245
"iso_checksum": "{{user `iso_checksum_type`}}:{{user `iso_checksum`}}",
244246
"communicator": "ssh",
@@ -251,9 +253,11 @@
251253
"disk_thin_provisioned": "{{user `disk_thin_provisioned`}}"
252254
}
253255
],
256+
"http_directory": "{{ user `http_directory`}}",
257+
"floppy_dirs": "{{ user `floppy_dirs`}}",
254258
"boot_command": [
255259
"{{user `boot_command_prefix`}}",
256-
"http://{{ .HTTPIP }}:{{ .HTTPPort }}",
260+
"{{user `boot_media_path`}}",
257261
"{{user `boot_command_suffix`}}"
258262
],
259263
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'usermod -L {{user `ssh_username`}} && {{user `shutdown_command`}}'",

images/capi/packer/ova/photon-3.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"iso_url": "https://packages.vmware.com/photon/3.0/Rev3/iso/photon-minimal-3.0-a383732.iso",
1010
"iso_checksum": "c2883a42e402a2330d9c39b4d1e071cf9b3b5898",
1111
"iso_checksum_type": "sha1",
12+
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
1213
"boot_command_prefix": "<esc><wait> vmlinuz initrd=initrd.img root/dev/ram0 loglevel=3 photon.media=cdrom ks=",
14+
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}",
1315
"boot_command_suffix": "/3/ks.json<enter><wait>",
1416
"shutdown_command": "shutdown now"
1517
}

images/capi/packer/ova/rhel-7.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"iso_url": "file:///rhel-server-7.7-x86_64-dvd.iso",
1010
"iso_checksum": "88b42e934c24af65e78e09f0993e4dded128d74ec0af30b89b3cdc02ec48f028",
1111
"iso_checksum_type": "sha256",
12+
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
1213
"boot_command_prefix": "<tab><wait><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>quiet text inst.ks=",
14+
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}",
1315
"boot_command_suffix": "/7/ks.cfg<enter><wait>",
1416
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm",
1517
"shutdown_command": "sys-unconfig"

images/capi/packer/ova/ubuntu-1804.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"iso_url": "http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.5-server-amd64.iso",
1010
"iso_checksum": "8c5fc24894394035402f66f3824beb7234b757dd2b5531379cb310cedfdf0996",
1111
"iso_checksum_type": "sha256",
12-
"boot_command_prefix": "<enter><wait><f6><wait><esc><wait><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>/install/vmlinuz auto console-setup/ask_detect=false console-setup/layoutcode=us debconf/frontend=noninteractive debian-installer=en_US fb=false initrd=/install/initrd.gz kbd-chooser/method=us keyboard-configuration/layout=USA keyboard-configuration/variant=USA locale=en_US netcfg/get_domain=local netcfg/get_hostname=localhost grub-installer/bootdev=/dev/sda preseed/url=",
12+
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/",
13+
"boot_command_prefix": "<enter><wait><f6><wait><esc><wait><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>/install/vmlinuz auto console-setup/ask_detect=false console-setup/layoutcode=us debconf/frontend=noninteractive debian-installer=en_US fb=false initrd=/install/initrd.gz kbd-chooser/method=us keyboard-configuration/layout=USA keyboard-configuration/variant=USA locale=en_US netcfg/get_domain=local netcfg/get_hostname=localhost grub-installer/bootdev=/dev/sda preseed/file=",
14+
"boot_media_path": "/media/HTTP",
1315
"boot_command_suffix": "/18.04/preseed.cfg -- <enter>",
1416
"shutdown_command": "shutdown -P now"
1517
}

images/capi/packer/ova/ubuntu-2004.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"iso_url": "http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso",
1010
"iso_checksum": "f11bda2f2caed8f420802b59f382c25160b114ccc665dbac9c5046e7fceaced2",
1111
"iso_checksum_type": "sha256",
12-
"boot_command_prefix": "<esc><wait><esc><wait><enter><wait>/install/vmlinuz auto console-setup/ask_detect=false console-setup/layoutcode=us console-setup/modelcode=pc105 debconf/frontend=noninteractive debian-installer=en_US fb=false initrd=/install/initrd.gz kbd-chooser/method=us keyboard-configuration/layout=USA keyboard-configuration/variant=USA locale=en_US netcfg/get_domain=local netcfg/get_hostname=localhost grub-installer/bootdev=/dev/sda preseed/url=",
12+
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/",
13+
"boot_command_prefix": "<esc><wait><esc><wait><enter><wait>/install/vmlinuz auto console-setup/ask_detect=false console-setup/layoutcode=us console-setup/modelcode=pc105 debconf/frontend=noninteractive debian-installer=en_US fb=false initrd=/install/initrd.gz kbd-chooser/method=us keyboard-configuration/layout=USA keyboard-configuration/variant=USA locale=en_US netcfg/get_domain=local netcfg/get_hostname=localhost grub-installer/bootdev=/dev/sda preseed/file=",
14+
"boot_media_path": "/media/HTTP",
1315
"boot_command_suffix": "/20.04/preseed.cfg -- <wait><enter><wait>",
1416
"shutdown_command": "shutdown -P now"
1517
}

0 commit comments

Comments
 (0)