From 1b91252b238f86a5e590f4b44aa904d41365f56d Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 15 Jul 2020 11:53:55 +0200 Subject: [PATCH] add alpine esxi example --- examples/hcl/linux/build.alpine.pkr.hcl | 7 ++++++ .../hcl/linux/source.esxi-vmware-iso.pkr.hcl | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/examples/hcl/linux/build.alpine.pkr.hcl b/examples/hcl/linux/build.alpine.pkr.hcl index 8e4d1d846..156a1d159 100644 --- a/examples/hcl/linux/build.alpine.pkr.hcl +++ b/examples/hcl/linux/build.alpine.pkr.hcl @@ -29,6 +29,13 @@ EOF boot_wait = "10s" } + source "source.vmware-iso.esxi-base-alpine-amd64" { + name = "3.12-from-esxi" + iso_url = local.iso_url_alpine_312 + iso_checksum = "file:${local.iso_checksum_url_alpine_312}" + boot_command = local.alpine_312_floppy_boot_command_vsphere + } + provisioner "shell" { inline = ["echo hi"] } diff --git a/examples/hcl/linux/source.esxi-vmware-iso.pkr.hcl b/examples/hcl/linux/source.esxi-vmware-iso.pkr.hcl index 53257272b..eb6393a93 100644 --- a/examples/hcl/linux/source.esxi-vmware-iso.pkr.hcl +++ b/examples/hcl/linux/source.esxi-vmware-iso.pkr.hcl @@ -22,3 +22,28 @@ source "vmware-iso" "esxi-base-ubuntu-amd64" { remote_datastore = var.datastore remote_private_key_file = var.remote_private_key_file_path } + +source "vmware-iso" "esxi-base-alpine-amd64" { + headless = var.headless + boot_wait = "10s" + guest_os_type = "otherLinux64Guest" + floppy_files = local.floppy_files_alpine_vsphere + ssh_port = 22 + ssh_timeout = "10000s" + ssh_username = "root" + ssh_password = var.alpine_password + tools_upload_flavor = "linux" + shutdown_command = "poweroff" + vmx_data = { + "cpuid.coresPerSocket" = "1" + "ethernet0.pciSlotNumber" = "32" + } + vmx_remove_ethernet_interfaces = true + + remote_type = "esx5" + remote_host = var.esxi_host + remote_username = var.esxi_user + remote_password = var.esxi_password + remote_datastore = var.datastore + remote_private_key_file = var.remote_private_key_file_path +}