diff --git a/.web-docs/components/builder/vsphere-clone/README.md b/.web-docs/components/builder/vsphere-clone/README.md index f3a7019ca..e12774e93 100644 --- a/.web-docs/components/builder/vsphere-clone/README.md +++ b/.web-docs/components/builder/vsphere-clone/README.md @@ -1400,14 +1400,14 @@ Only use the `host` option. Optionally specify a `resource_pool`: **JSON** ```json -"host": "esxi-1.vsphere65.test", +"host": "esxi-01.example.com", "resource_pool": "pool1", ``` **HCL2** ```hcl -host = "esxi-1.vsphere65.test" +host = "esxi-01.example.com" resource_pool = "pool1" ``` @@ -1420,14 +1420,14 @@ Use the `cluster` and `host`parameters: ```json "cluster": "cluster1", -"host": "esxi-2.vsphere65.test", +"host": "esxi-02.example.com", ``` **HCL2** ```hcl cluster = "cluster1" -host = "esxi-2.vsphere65.test" +host = "esxi-02.example.com" ``` diff --git a/.web-docs/components/builder/vsphere-iso/README.md b/.web-docs/components/builder/vsphere-iso/README.md index 34652e7c2..eaa4bc0f3 100644 --- a/.web-docs/components/builder/vsphere-iso/README.md +++ b/.web-docs/components/builder/vsphere-iso/README.md @@ -1415,14 +1415,14 @@ Only use the `host` option. Optionally specify a `resource_pool`: **JSON** ```json -"host": "esxi-1.vsphere65.test", +"host": "esxi-01.example.com", "resource_pool": "pool1", ``` **HCL2** ```hcl -host = ""esxi-1.vsphere65.test"" +host = ""esxi-01.example.com"" resource_pool = "pool1" ``` @@ -1435,14 +1435,14 @@ Use the `cluster` and `host`parameters: ```json "cluster": "cluster1", -"host": "esxi-2.vsphere65.test", +"host": "esxi-02.example.com", ``` **HCL2** ```hcl cluster = "cluster1" -host = "esxi-2.vsphere65.test" +host = "esxi-02.example.com" ``` @@ -1467,7 +1467,7 @@ resource_pool = "pool1" ## Required vSphere Privileges -It is recommended to create a custom vSphere role with the required privileges to integrate Packer with vSphere. Accounts or groups can be added to the role to ensure that Packer has **_the least privileged_** access to the infrastructure. For example, a named service account (_e.g._ svc-packer-vsphere@example.com). +It is recommended to create a custom vSphere role with the required privileges to integrate Packer with vSphere. Accounts or groups can be added to the role to ensure that Packer has **_the least privileged_** access to the infrastructure. For example, a named service account (_e.g._ svc-packer-vsphere@example.com). Clone the default **Read-Only** vSphere role and add the following privileges, which are based on the capabilities of the `vsphere-iso` plugin: diff --git a/builder/vsphere/common/testing/utility.go b/builder/vsphere/common/testing/utility.go index f743a5c43..fef79296f 100644 --- a/builder/vsphere/common/testing/utility.go +++ b/builder/vsphere/common/testing/utility.go @@ -45,7 +45,7 @@ func TestConn() (driver.Driver, error) { } d, err := driver.NewDriver(&driver.ConnectConfig{ - VCenterServer: "vcenter.vsphere65.test", + VCenterServer: "vcenter.example.com", Username: username, Password: password, InsecureConnection: true, diff --git a/builder/vsphere/driver/datastore_acc_test.go b/builder/vsphere/driver/datastore_acc_test.go index a189903fb..a6a95f92f 100644 --- a/builder/vsphere/driver/datastore_acc_test.go +++ b/builder/vsphere/driver/datastore_acc_test.go @@ -29,7 +29,7 @@ func TestDatastoreAcc(t *testing.T) { func TestFileUpload(t *testing.T) { t.Skip("Acceptance tests not configured yet.") dsName := "datastore1" - hostName := "esxi-1.vsphere65.test" + hostName := "esxi-01.example.com" fileName := fmt.Sprintf("test-%v", time.Now().Unix()) tmpFile, err := os.CreateTemp("", fileName) diff --git a/builder/vsphere/driver/driver_test.go b/builder/vsphere/driver/driver_test.go index fa39a267a..ffac08586 100644 --- a/builder/vsphere/driver/driver_test.go +++ b/builder/vsphere/driver/driver_test.go @@ -24,7 +24,7 @@ import ( ) // Defines whether acceptance tests should be run -const TestHostName = "esxi-1.vsphere65.test" +const TestHostName = "esxi-01.example.com" func newTestDriver(t *testing.T) Driver { username := os.Getenv("VSPHERE_USERNAME") @@ -37,7 +37,7 @@ func newTestDriver(t *testing.T) Driver { } d, err := NewDriver(&ConnectConfig{ - VCenterServer: "vcenter.vsphere65.test", + VCenterServer: "vcenter.example.com", Username: username, Password: password, InsecureConnection: true, diff --git a/builder/vsphere/driver/resource_pool_acc_test.go b/builder/vsphere/driver/resource_pool_acc_test.go index d2372838a..bc87933a4 100644 --- a/builder/vsphere/driver/resource_pool_acc_test.go +++ b/builder/vsphere/driver/resource_pool_acc_test.go @@ -8,7 +8,7 @@ import "testing" func TestResourcePoolAcc(t *testing.T) { t.Skip("Acceptance tests not configured yet.") d := newTestDriver(t) - p, err := d.FindResourcePool("", "esxi-1.vsphere65.test", "pool1/pool2") + p, err := d.FindResourcePool("", "esxi-01.example.com", "pool1/pool2") if err != nil { t.Fatalf("Cannot find the default resource pool '%v': %v", "pool1/pool2", err) } diff --git a/builder/vsphere/examples/alpine/alpine-3.8.json b/builder/vsphere/examples/alpine/alpine-3.8.json index f16895dcc..88f566e4b 100644 --- a/builder/vsphere/examples/alpine/alpine-3.8.json +++ b/builder/vsphere/examples/alpine/alpine-3.8.json @@ -29,7 +29,7 @@ "{{template_dir}}/setup.sh" ], "guest_os_type": "other3xLinux64Guest", - "host": "esxi-1.vsphere65.test", + "host": "esxi-01.example.com", "insecure_connection": true, "iso_paths": [ "[datastore1] ISO/alpine-standard-3.8.2-x86_64.iso" @@ -49,7 +49,7 @@ } ], "username": "root", - "vcenter_server": "vcenter.vsphere65.test", + "vcenter_server": "vcenter.example.com", "vm_name": "alpine-{{timestamp}}" } ], @@ -61,4 +61,4 @@ "type": "shell" } ] -} \ No newline at end of file +} diff --git a/builder/vsphere/examples/alpine/alpine-3.8.pkr.hcl b/builder/vsphere/examples/alpine/alpine-3.8.pkr.hcl index 19b3b4d36..c9d8e61c1 100644 --- a/builder/vsphere/examples/alpine/alpine-3.8.pkr.hcl +++ b/builder/vsphere/examples/alpine/alpine-3.8.pkr.hcl @@ -17,7 +17,7 @@ source "vsphere-iso" "autogenerated_1" { disk_controller_type = ["pvscsi"] floppy_files = ["${path.root}/answerfile", "${path.root}/setup.sh"] guest_os_type = "other3xLinux64Guest" - host = "esxi-1.vsphere65.test" + host = "esxi-01.example.com" insecure_connection = true iso_paths = ["[datastore1] ISO/alpine-standard-3.8.2-x86_64.iso"] network_adapters { @@ -31,7 +31,7 @@ source "vsphere-iso" "autogenerated_1" { disk_thin_provisioned = true } username = "root" - vcenter_server = "vcenter.vsphere65.test" + vcenter_server = "vcenter.example.com" vm_name = "alpine-${local.timestamp}" } diff --git a/builder/vsphere/examples/clone/alpine.json b/builder/vsphere/examples/clone/alpine.json index 8e62d2726..885183db8 100644 --- a/builder/vsphere/examples/clone/alpine.json +++ b/builder/vsphere/examples/clone/alpine.json @@ -3,14 +3,14 @@ { "type": "vsphere-clone", - "vcenter_server": "vcenter.vsphere65.test", + "vcenter_server": "vcenter.example.com", "username": "root", "password": "jetbrains", "insecure_connection": "true", "template": "alpine", "vm_name": "alpine-clone-{{timestamp}}", - "host": "esxi-1.vsphere65.test", + "host": "esxi-01.example.com", "communicator": "none" } diff --git a/builder/vsphere/examples/clone/alpine.pkr.hcl b/builder/vsphere/examples/clone/alpine.pkr.hcl index dd72f7cbb..4df5415d6 100644 --- a/builder/vsphere/examples/clone/alpine.pkr.hcl +++ b/builder/vsphere/examples/clone/alpine.pkr.hcl @@ -10,12 +10,12 @@ locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } # https://www.packer.io/docs/templates/hcl_templates/blocks/source source "vsphere-clone" "example_clone" { communicator = "none" - host = "esxi-1.vsphere65.test" + host = "esxi-01.example.com" insecure_connection = "true" password = "jetbrains" template = "alpine" username = "root" - vcenter_server = "vcenter.vsphere65.test" + vcenter_server = "vcenter.example.com" vm_name = "alpine-clone-${local.timestamp}" } diff --git a/builder/vsphere/examples/driver/main.go b/builder/vsphere/examples/driver/main.go index 0955acb9a..46d65d384 100644 --- a/builder/vsphere/examples/driver/main.go +++ b/builder/vsphere/examples/driver/main.go @@ -11,7 +11,7 @@ import ( func main() { d, err := driver.NewDriver(&driver.ConnectConfig{ - VCenterServer: "vcenter.vsphere65.test", + VCenterServer: "vcenter.example.com", Username: "root", Password: "jetbrains", InsecureConnection: true, @@ -20,7 +20,7 @@ func main() { panic(err) } - ds, err := d.FindDatastore("", "esxi-1.vsphere65.test") + ds, err := d.FindDatastore("", "esxi-01.example.com") if err != nil { panic(err) } diff --git a/builder/vsphere/examples/macos/macos-10.13.json b/builder/vsphere/examples/macos/macos-10.13.json index 22a02374d..20c5cf63f 100644 --- a/builder/vsphere/examples/macos/macos-10.13.json +++ b/builder/vsphere/examples/macos/macos-10.13.json @@ -16,7 +16,7 @@ "smc.present": "TRUE" }, "guest_os_type": "darwin16_64Guest", - "host": "esxi-mac.vsphere65.test", + "host": "esxi-mac.vsphere65esxi-02.example.com", "insecure_connection": "true", "iso_checksum": "file:///{{template_dir}}/setup/out/sha256sums", "iso_paths": [ @@ -42,8 +42,8 @@ ], "usb_controller": true, "username": "root", - "vcenter_server": "vcenter.vsphere65.test", + "vcenter_server": "vcenter.example.com", "vm_name": "macos-packer" } ] -} \ No newline at end of file +} diff --git a/builder/vsphere/examples/macos/macos-10.13.pkr.hcl b/builder/vsphere/examples/macos/macos-10.13.pkr.hcl index b2637c0d8..951b43c60 100644 --- a/builder/vsphere/examples/macos/macos-10.13.pkr.hcl +++ b/builder/vsphere/examples/macos/macos-10.13.pkr.hcl @@ -33,7 +33,7 @@ source "vsphere-iso" "example_osx" { } usb_controller = ["usb"] username = "root" - vcenter_server = "vcenter.vsphere65.test" + vcenter_server = "vcenter.example.com" vm_name = "macos-packer" } diff --git a/builder/vsphere/examples/ubuntu/ubuntu-16.04.json b/builder/vsphere/examples/ubuntu/ubuntu-16.04.json index f5c87b2c5..5abd2fab4 100644 --- a/builder/vsphere/examples/ubuntu/ubuntu-16.04.json +++ b/builder/vsphere/examples/ubuntu/ubuntu-16.04.json @@ -28,7 +28,7 @@ "{{template_dir}}/preseed.cfg" ], "guest_os_type": "ubuntu64Guest", - "host": "esxi-1.vsphere65.test", + "host": "esxi-01.example.com", "insecure_connection": true, "iso_paths": [ "[datastore1] ISO/ubuntu-16.04.3-server-amd64.iso" @@ -48,7 +48,7 @@ } ], "username": "root", - "vcenter_server": "vcenter.vsphere65.test", + "vcenter_server": "vcenter.example.com", "vm_name": "example-ubuntu" } ], @@ -60,4 +60,4 @@ "type": "shell" } ] -} \ No newline at end of file +} diff --git a/builder/vsphere/examples/ubuntu/ubuntu-16.04.pkr.hcl b/builder/vsphere/examples/ubuntu/ubuntu-16.04.pkr.hcl index fea3c68b5..e39dc3397 100644 --- a/builder/vsphere/examples/ubuntu/ubuntu-16.04.pkr.hcl +++ b/builder/vsphere/examples/ubuntu/ubuntu-16.04.pkr.hcl @@ -25,7 +25,7 @@ source "vsphere-iso" "example" { disk_controller_type = ["pvscsi"] floppy_files = ["${path.root}/preseed.cfg"] guest_os_type = "ubuntu64Guest" - host = "esxi-1.vsphere65.test" + host = "esxi-01.example.com" insecure_connection = true iso_paths = ["[datastore1] ISO/ubuntu-16.04.3-server-amd64.iso"] network_adapters { @@ -39,7 +39,7 @@ source "vsphere-iso" "example" { disk_thin_provisioned = true } username = "root" - vcenter_server = "vcenter.vsphere65.test" + vcenter_server = "vcenter.example.com" vm_name = "example-ubuntu" } diff --git a/builder/vsphere/examples/windows/windows-10.json b/builder/vsphere/examples/windows/windows-10.json index e9df38503..482382196 100644 --- a/builder/vsphere/examples/windows/windows-10.json +++ b/builder/vsphere/examples/windows/windows-10.json @@ -12,7 +12,7 @@ ], "floppy_img_path": "[datastore1] ISO/VMware Tools/10.2.0/pvscsi-Windows8.flp", "guest_os_type": "windows9_64Guest", - "host": "esxi-1.vsphere65.test", + "host": "esxi-01.example.com", "insecure_connection": "true", "iso_paths": [ "[datastore1] ISO/en_windows_10_multi-edition_vl_version_1709_updated_dec_2017_x64_dvd_100406172.iso", @@ -31,7 +31,7 @@ } ], "username": "root", - "vcenter_server": "vcenter.vsphere65.test", + "vcenter_server": "vcenter.example.com", "vm_name": "example-windows", "winrm_password": "jetbrains", "winrm_username": "jetbrains" @@ -45,4 +45,4 @@ "type": "windows-shell" } ] -} \ No newline at end of file +} diff --git a/builder/vsphere/examples/windows/windows-10.pkr.hcl b/builder/vsphere/examples/windows/windows-10.pkr.hcl index 6b164fe00..c56f427ea 100644 --- a/builder/vsphere/examples/windows/windows-10.pkr.hcl +++ b/builder/vsphere/examples/windows/windows-10.pkr.hcl @@ -14,7 +14,7 @@ source "vsphere-iso" "example_windows" { floppy_files = ["${path.root}/setup/"] floppy_img_path = "[datastore1] ISO/VMware Tools/10.2.0/pvscsi-Windows8.flp" guest_os_type = "windows9_64Guest" - host = "esxi-1.vsphere65.test" + host = "esxi-01.example.com" insecure_connection = "true" iso_paths = ["[datastore1] ISO/en_windows_10_multi-edition_vl_version_1709_updated_dec_2017_x64_dvd_100406172.iso", "[datastore1] ISO/VMware Tools/10.2.0/windows.iso"] network_adapters { @@ -26,7 +26,7 @@ source "vsphere-iso" "example_windows" { disk_thin_provisioned = true } username = "root" - vcenter_server = "vcenter.vsphere65.test" + vcenter_server = "vcenter.example.com" vm_name = "example-windows" winrm_password = "jetbrains" winrm_username = "jetbrains" diff --git a/builder/vsphere/iso/builder_acc_test.go b/builder/vsphere/iso/builder_acc_test.go index 2d1285b2d..3cc67392f 100644 --- a/builder/vsphere/iso/builder_acc_test.go +++ b/builder/vsphere/iso/builder_acc_test.go @@ -50,12 +50,12 @@ func defaultConfig() map[string]interface{} { vcenter := os.Getenv("VSPHERE_VCENTER_SERVER") if vcenter == "" { - vcenter = "vcenter.vsphere65.test" + vcenter = "vcenter.example.com" } host := os.Getenv("VSPHERE_HOST") if host == "" { - host = "esxi-1.vsphere65.test" + host = "esxi-01.example.com" } config := map[string]interface{}{ @@ -554,13 +554,13 @@ func fullConfig() map[string]interface{} { } config := map[string]interface{}{ - "vcenter_server": "vcenter.vsphere65.test", + "vcenter_server": "vcenter.example.com", "username": username, "password": password, "insecure_connection": true, "vm_name": commonT.NewVMName(), - "host": "esxi-1.vsphere65.test", + "host": "esxi-01.example.com", "RAM": 512, "disk_controller_type": []string{ @@ -695,7 +695,7 @@ func checkBootOrder(name string) error { func TestISOBuilderAcc_cluster(t *testing.T) { config := defaultConfig() config["cluster"] = "cluster1" - config["host"] = "esxi-2.vsphere65.test" + config["host"] = "esxi-02.example.com" testCase := &acctest.PluginTestCase{ Name: "vsphere-iso_bootOrder_test", Template: commonT.RenderConfig("vsphere-iso", config), diff --git a/docs/builders/vsphere-clone.mdx b/docs/builders/vsphere-clone.mdx index ea3de5bc4..7bf696eed 100644 --- a/docs/builders/vsphere-clone.mdx +++ b/docs/builders/vsphere-clone.mdx @@ -298,14 +298,14 @@ Only use the `host` option. Optionally specify a `resource_pool`: **JSON** ```json -"host": "esxi-1.vsphere65.test", +"host": "esxi-01.example.com", "resource_pool": "pool1", ``` **HCL2** ```hcl -host = "esxi-1.vsphere65.test" +host = "esxi-01.example.com" resource_pool = "pool1" ``` @@ -318,14 +318,14 @@ Use the `cluster` and `host`parameters: ```json "cluster": "cluster1", -"host": "esxi-2.vsphere65.test", +"host": "esxi-02.example.com", ``` **HCL2** ```hcl cluster = "cluster1" -host = "esxi-2.vsphere65.test" +host = "esxi-02.example.com" ``` diff --git a/docs/builders/vsphere-iso.mdx b/docs/builders/vsphere-iso.mdx index b363f9e27..8c15f90ef 100644 --- a/docs/builders/vsphere-iso.mdx +++ b/docs/builders/vsphere-iso.mdx @@ -287,14 +287,14 @@ Only use the `host` option. Optionally specify a `resource_pool`: **JSON** ```json -"host": "esxi-1.vsphere65.test", +"host": "esxi-01.example.com", "resource_pool": "pool1", ``` **HCL2** ```hcl -host = ""esxi-1.vsphere65.test"" +host = ""esxi-01.example.com"" resource_pool = "pool1" ``` @@ -307,14 +307,14 @@ Use the `cluster` and `host`parameters: ```json "cluster": "cluster1", -"host": "esxi-2.vsphere65.test", +"host": "esxi-02.example.com", ``` **HCL2** ```hcl cluster = "cluster1" -host = "esxi-2.vsphere65.test" +host = "esxi-02.example.com" ``` @@ -339,7 +339,7 @@ resource_pool = "pool1" ## Required vSphere Privileges -It is recommended to create a custom vSphere role with the required privileges to integrate Packer with vSphere. Accounts or groups can be added to the role to ensure that Packer has **_the least privileged_** access to the infrastructure. For example, a named service account (_e.g._ svc-packer-vsphere@example.com). +It is recommended to create a custom vSphere role with the required privileges to integrate Packer with vSphere. Accounts or groups can be added to the role to ensure that Packer has **_the least privileged_** access to the infrastructure. For example, a named service account (_e.g._ svc-packer-vsphere@example.com). Clone the default **Read-Only** vSphere role and add the following privileges, which are based on the capabilities of the `vsphere-iso` plugin: