2023-01-18 14:09:32 +00:00
|
|
|
source "vsphere-iso" "ubuntu" {
|
2021-06-07 11:19:00 +00:00
|
|
|
vcenter_server = var.vcenter_server
|
|
|
|
username = var.vsphere_username
|
|
|
|
password = var.vsphere_password
|
|
|
|
insecure_connection = "true"
|
|
|
|
|
|
|
|
datacenter = var.vsphere_datacenter
|
2022-04-25 07:21:05 +00:00
|
|
|
cluster = var.vsphere_cluster
|
2021-06-07 11:19:00 +00:00
|
|
|
host = var.vsphere_host
|
|
|
|
folder = var.vsphere_folder
|
|
|
|
datastore = var.vsphere_datastore
|
|
|
|
|
|
|
|
guest_os_type = "ubuntu64Guest"
|
2021-06-17 09:21:22 +00:00
|
|
|
|
2021-06-07 11:19:00 +00:00
|
|
|
boot_order = "disk,cdrom"
|
|
|
|
boot_command = [
|
2022-06-22 09:40:25 +00:00
|
|
|
"e<down><down><down><end>",
|
|
|
|
" autoinstall ds=nocloud;",
|
|
|
|
"<F10>"
|
2021-06-07 11:19:00 +00:00
|
|
|
]
|
|
|
|
boot_wait = "2s"
|
2021-06-17 09:21:22 +00:00
|
|
|
|
2021-06-07 11:19:00 +00:00
|
|
|
communicator = "ssh"
|
2021-06-07 12:54:22 +00:00
|
|
|
ssh_username = "ubuntu"
|
2021-06-08 07:24:39 +00:00
|
|
|
ssh_password = var.ssh_password
|
2021-06-07 12:54:22 +00:00
|
|
|
ssh_timeout = "20m"
|
|
|
|
ssh_handshake_attempts = "100"
|
|
|
|
ssh_pty = true
|
2021-06-17 09:21:22 +00:00
|
|
|
|
2022-12-23 20:49:15 +00:00
|
|
|
CPUs = 4
|
2022-08-09 13:56:50 +00:00
|
|
|
RAM = 8192
|
2021-06-17 09:21:22 +00:00
|
|
|
|
2021-06-07 11:19:00 +00:00
|
|
|
network_adapters {
|
|
|
|
network = var.vsphere_network
|
|
|
|
network_card = "vmxnet3"
|
|
|
|
}
|
|
|
|
storage {
|
2022-08-09 12:56:30 +00:00
|
|
|
disk_size = 76800
|
2021-06-07 11:19:00 +00:00
|
|
|
disk_thin_provisioned = true
|
|
|
|
}
|
|
|
|
disk_controller_type = ["pvscsi"]
|
|
|
|
usb_controller = ["xhci"]
|
|
|
|
|
|
|
|
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
|
|
|
]
|
|
|
|
cd_label = "cidata"
|
2021-06-10 09:53:51 +00:00
|
|
|
iso_url = local.iso_authenticatedurl
|
2021-06-10 09:39:42 +00:00
|
|
|
iso_checksum = var.iso_checksum
|
2021-06-07 11:19:00 +00:00
|
|
|
|
|
|
|
shutdown_command = "echo '${var.ssh_password}' | sudo -S shutdown -P now"
|
|
|
|
shutdown_timeout = "5m"
|
|
|
|
|
|
|
|
remove_cdrom = true
|
|
|
|
}
|