2023-01-18 14:09:32 +00:00
|
|
|
source "vsphere-iso" "ubuntu" {
|
2024-06-06 05:56:27 +00:00
|
|
|
vcenter_server = var.hv_fqdn
|
|
|
|
username = var.hv_username
|
|
|
|
password = var.hv_password
|
|
|
|
insecure_connection = "true"
|
2021-06-07 11:19:00 +00:00
|
|
|
|
2024-06-06 05:56:27 +00:00
|
|
|
datacenter = var.hv_datacenter
|
|
|
|
cluster = var.hv_cluster
|
|
|
|
host = var.hv_host
|
|
|
|
folder = var.hv_folder
|
|
|
|
datastore = var.hv_datastore
|
2021-06-07 11:19:00 +00:00
|
|
|
|
2024-06-06 05:56:27 +00:00
|
|
|
guest_os_type = "ubuntu64Guest"
|
2021-06-17 09:21:22 +00:00
|
|
|
|
2024-06-06 05:56:27 +00:00
|
|
|
boot_order = "disk,cdrom"
|
|
|
|
boot_command = [
|
2022-06-22 09:40:25 +00:00
|
|
|
"e<down><down><down><end>",
|
2024-06-06 06:54:05 +00:00
|
|
|
" autoinstall network-config=disabled ds=nocloud;",
|
2022-06-22 09:40:25 +00:00
|
|
|
"<F10>"
|
2021-06-07 11:19:00 +00:00
|
|
|
]
|
2024-06-06 05:56:27 +00:00
|
|
|
boot_wait = "2s"
|
2021-06-17 09:21:22 +00:00
|
|
|
|
2024-06-06 05:56:27 +00:00
|
|
|
communicator = "ssh"
|
|
|
|
ssh_username = "ubuntu"
|
|
|
|
ssh_password = var.ssh_password
|
|
|
|
ssh_timeout = "20m"
|
|
|
|
ssh_handshake_attempts = "100"
|
|
|
|
ssh_pty = true
|
2021-06-17 09:21:22 +00:00
|
|
|
|
2024-06-06 05:56:27 +00:00
|
|
|
CPUs = 4
|
|
|
|
RAM = 8192
|
2021-06-17 09:21:22 +00:00
|
|
|
|
2021-06-07 11:19:00 +00:00
|
|
|
network_adapters {
|
2024-06-06 05:56:27 +00:00
|
|
|
network = var.hv_network
|
|
|
|
network_card = "vmxnet3"
|
2021-06-07 11:19:00 +00:00
|
|
|
}
|
|
|
|
storage {
|
2024-06-06 05:56:27 +00:00
|
|
|
disk_size = 76800
|
|
|
|
disk_thin_provisioned = true
|
2021-06-07 11:19:00 +00:00
|
|
|
}
|
2024-06-06 05:56:27 +00:00
|
|
|
disk_controller_type = ["pvscsi"]
|
|
|
|
usb_controller = ["xhci"]
|
2021-06-07 11:19:00 +00:00
|
|
|
|
2024-06-06 05:56:27 +00:00
|
|
|
set_host_for_datastore_uploads = true
|
|
|
|
cd_files = [
|
2022-06-22 09:40:25 +00:00
|
|
|
"packer/preseed/UbuntuServer22.04/user-data",
|
|
|
|
"packer/preseed/UbuntuServer22.04/meta-data"
|
2021-06-07 11:19:00 +00:00
|
|
|
]
|
2024-06-06 05:56:27 +00:00
|
|
|
cd_label = "cidata"
|
|
|
|
iso_url = local.iso_authenticatedurl
|
|
|
|
iso_checksum = var.iso_checksum
|
2021-06-07 11:19:00 +00:00
|
|
|
|
2024-06-06 05:56:27 +00:00
|
|
|
shutdown_command = "echo '${var.ssh_password}' | sudo -S shutdown -P now"
|
|
|
|
shutdown_timeout = "5m"
|
2021-06-07 11:19:00 +00:00
|
|
|
|
2024-06-06 05:56:27 +00:00
|
|
|
remove_cdrom = true
|
2023-04-05 15:30:24 +00:00
|
|
|
|
2024-06-05 03:09:29 +00:00
|
|
|
export {
|
2024-06-07 02:22:22 +00:00
|
|
|
output_directory = "/data/scratch"
|
2024-06-05 03:09:29 +00:00
|
|
|
}
|
2024-06-10 05:59:19 +00:00
|
|
|
|
|
|
|
destroy = true
|
2021-06-07 11:19:00 +00:00
|
|
|
}
|