Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Terraform clone virtual machine template in VMware vSphere vCenter Dynamic Content Part 2

This is improvised Terraform configuration scripts to clone Windows and Linux Template from VMware vCenter server. I have made few improvements in the configuration adding dynamic content block in the modules for network and disks. Another change is use variables, New VM information from csv file to simply things.

Download this Terraform_VM_Template_clone script here or this is also available on github.com. To deploy this script you need to add information in Clone_Configure_VMs_Dev.ps1 and execute it.

I have here multiple csv files to use them in different workspaces use command as in below example. 

terraform apply -var="filename=dev_vms.csv" --auto-approve

Note: To add Windows server into domain, You will need to make few changes and prepare VMware Virtual Machine as follows.

  1. Install and Update patches on Windows server.
  2. Install and Upgrade VMware tools.
  3. Create a new user localadmin in windows vm template and make it part of Administrators group and you must login with the account to create a profile.
  4. Follow this article to configure Powershell WinRM POWERSHELL PS REMOTING BETWEEN STANDALONE WORKGROUP COMPUTERS
  5. Open required ports 5985 and 5986 in firewall.

Below is the configuration content in my main module information to clone VM from template. For disks and ethernet adapter I added dynamic blocks, so they will be cloned and deployed according to the disk and network adapter count. 

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
data "vsphere_datacenter" "datacenter" {
  name = var.datacenter
}

data "vsphere_compute_cluster" "cluster" {
  name          = var.cluster
  datacenter_id = data.vsphere_datacenter.datacenter.id
}

data "vsphere_network" "network" {
  name          = var.network
  datacenter_id = data.vsphere_datacenter.datacenter.id
}

data "vsphere_datastore" "datastore" {
  name          = var.datastore
  datacenter_id = data.vsphere_datacenter.datacenter.id
}

data "vsphere_virtual_machine" "template" {
  name          = var.template
  datacenter_id = data.vsphere_datacenter.datacenter.id
}

locals {
  all_disks              = data.vsphere_virtual_machine.template.disks
  all_network_interfaces = data.vsphere_virtual_machine.template.network_interfaces
  vm_ipconfig            = var.ipv4_information.ipv4_address != "no" ? [1] : []
}

resource "vsphere_virtual_machine" "linuxvm" {
  count            = var.os == "linux" ? 1 : 0
  name             = var.vmname
  resource_pool_id = data.vsphere_compute_cluster.cluster.resource_pool_id
  datastore_id     = data.vsphere_datastore.datastore.id
  num_cpus         = var.cpu
  memory           = var.memory
  guest_id         = data.vsphere_virtual_machine.template.guest_id
  scsi_type        = data.vsphere_virtual_machine.template.scsi_type
  firmware         = data.vsphere_virtual_machine.template.firmware
  folder           = var.folder
  network_interface {
    network_id   = data.vsphere_network.network.id
    adapter_type = data.vsphere_virtual_machine.template.network_interface_types[0]
  }

  dynamic "disk" {
    for_each = local.all_disks
    content {
      label            = data.vsphere_virtual_machine.template.disks[disk.key].label #"${var.vmname}-${disk.key}"
      size             = data.vsphere_virtual_machine.template.disks[disk.key].size  # max(disk.value.size, var.hdd0)
      thin_provisioned = data.vsphere_virtual_machine.template.disks[disk.key].thin_provisioned
      unit_number      = data.vsphere_virtual_machine.template.disks[disk.key].unit_number
      #index      = disk.key # This will give you the index of the disk
    }
  }

  disk {
    label            = "${var.vmname}-${sum([length(local.all_disks), 1])}"
    unit_number      = sum([length(local.all_disks), 1])
    size             = var.hdd1 # max(data.vsphere_virtual_machine.template.disks.0.size, var.hdd0)
    thin_provisioned = data.vsphere_virtual_machine.template.disks.0.thin_provisioned
  }

  clone {
    template_uuid = data.vsphere_virtual_machine.template.id
    customize {
      linux_options {
        host_name = var.vmname
        domain    = var.domain
      }
      dynamic "network_interface" {
        for_each = local.vm_ipconfig
        content {
          ipv4_address    = var.ipv4_information.ipv4_address
          ipv4_netmask    = var.ipv4_information.ipv4_netmask
          dns_server_list = toset(var.dns_server_list)
        }
      }
      ipv4_gateway = var.ipv4_gateway
    }
  }
  # provisioner "local-exec" {
  #   command = "mkdir /tmp/temp1"
  #   interpreter = ["/bin/bash", "-c"]
  # }
}

resource "vsphere_virtual_machine" "windowsvm" {
  count            = var.os == "windows" ? 1 : 0
  name             = var.vmname
  resource_pool_id = data.vsphere_compute_cluster.cluster.resource_pool_id
  datastore_id     = data.vsphere_datastore.datastore.id
  num_cpus         = var.cpu
  memory           = var.memory
  guest_id         = data.vsphere_virtual_machine.template.guest_id
  scsi_type        = data.vsphere_virtual_machine.template.scsi_type
  firmware         = data.vsphere_virtual_machine.template.firmware
  folder           = var.folder

  dynamic "network_interface" {
    for_each = local.all_network_interfaces
    content {
      network_id   = data.vsphere_network.network.id
      adapter_type = data.vsphere_virtual_machine.template.network_interface_types["${network_interface.key}"] #"vmxnet3"
      #index        = network_interface.key # This will give you the index of the network_interface
    }
  }

  dynamic "disk" {
    for_each = local.all_disks
    content {
      label            = data.vsphere_virtual_machine.template.disks[disk.key].label #"${var.vmname}-${disk.key}"
      size             = data.vsphere_virtual_machine.template.disks[disk.key].size  # max(disk.value.size, var.hdd0)
      thin_provisioned = data.vsphere_virtual_machine.template.disks[disk.key].thin_provisioned
      unit_number      = data.vsphere_virtual_machine.template.disks[disk.key].unit_number
      #unit_number      = disk.key # This will give you the index of the disk
    }
  }

  disk {
    label            = "${var.vmname}-${sum([length(local.all_disks), 1])}"
    unit_number      = sum([length(local.all_disks), 1])
    size             = var.hdd1 # max(data.vsphere_virtual_machine.template.disks.0.size, var.hdd0)
    thin_provisioned = data.vsphere_virtual_machine.template.disks.0.thin_provisioned
  }

  clone {
    template_uuid = data.vsphere_virtual_machine.template.id
    customize {
      windows_options {
        computer_name = var.vmname
        workgroup     = "workgroup" #var.domain
        # join_domain           = "vcloud-lab.com"
        # domain_admin_user     = "[email protected]"
        # domain_admin_password = "Computer@123"
        # admin_password        = "Computer@123"
      }
      dynamic "network_interface" {
        for_each = local.vm_ipconfig
        content {
          ipv4_address    = var.ipv4_information.ipv4_address
          ipv4_netmask    = var.ipv4_information.ipv4_netmask
          dns_server_list = toset(var.dns_server_list)
        }
      }
      ipv4_gateway = var.ipv4_gateway
    }
  }

  provisioner "local-exec" {
    command     = <<EOT
      Write-Host "Test Message1"
      Write-Host "Test Message2"
    EOT
    interpreter = ["PowerShell", "-Command"] #default ["cmd" "/C"]
  }
}

This is a variables.tf, all the information will come from module input - main.tf.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
variable "datacenter" {
  description = "Virtual Datacenter name where VM will be placed"
  type        = string

}

variable "cluster" {
  description = "Provide cluster in vCenter Server"
  type        = string
}

variable "folder" {
  description = "Provide folder in vCenter Server"
  type        = string
}

variable "network" {
  description = "IP or DNS name to connect to vCenter server"
  type        = string
  #default     = "VM Network"
}

variable "datastore" {
  description = "IP or DNS name to connect to vCenter server"
  type        = string
  #default     = "StarLord_Datastore01"
}

variable "template" {
  description = "Template name inside content library"
  type        = string
  #default     = "Wakanda_Ubuntu_01"
}

variable "os" {
  description = "Operating system of new VM"
  type        = string

}

variable "vmname" {
  description = "Provide New virtual machine name"
  type        = string
  #default     = "demo"
}

variable "cpu" {
  description = "Provide New virtual machine cpu count"
  type        = string
  #default     = "1"
}

variable "memory" {
  description = "Provide New virtual machine memory"
  type        = string
  #default     = "1024"
}

variable "hdd1" {
  description = "Provide New hdd0 size"
  type        = string
  #default     = "100"
}

variable "domain" {
  description = "Provide New virtual machine domain"
  type        = string
  #default     = "vcloud-lab.com"
}

variable "ipv4_information" {
  description = "Provide IPV4 address releated information"
  type = object({
    ipv4_address = string
    ipv4_netmask = number
  }) #optional(object({
  default = {
    ipv4_address = "no"
    ipv4_netmask = 0
  }
}

variable "dns_server_list" {
  description = "Provide New virtual machine ipv4 dns server list"
  type        = set(string)
  #default     = "192.168.34.1"
}

variable "ipv4_gateway" {
  description = "Provide New virtual machine ipv4 gateway"
  type        = string
  #default     = "192.168.34.1"
}

Below is the module structure of terraform file. New VM data information I have fed into csv file.

locals {
  csv_data   = file("${path.module}/${var.filename}")
  vminfo     = csvdecode(local.csv_data)
  vminfo_map = { for vm in local.vminfo : vm.vmname => vm } #covert CSV data to map
}

module "virtual_machine" {
  source     = "./modules/vsphere_vm"
  for_each   = local.vminfo_map
  datacenter = each.value.datacenter #"Asgard"               #"Nutanix-DC"
  cluster    = each.value.cluster    #"BiFrost"              #"Nutanix-Mahape"
  network    = each.value.network    #"VM Network"           #"172.17.205-VLAN-107"
  datastore  = each.value.datastore  #"StarLord_Datastore01" #"NTNX-MHP-Datastore"
  folder     = each.value.folder     #"TempVMs"
  # If using VM Make sure Template is in same datacenter and cluster as mentioned
  template = each.value.os == "linux" ? "Wakanda_Ubuntu_02_multi_disk" : "Wakanda_Windows_01" #"CentOS_Image_Template" : "Windows2019-LnA-Template" #["", ""] ""
  os       = each.value.os
  vmname   = each.value.vmname
  cpu      = each.value.cpu
  memory   = each.value.memory
  hdd1     = each.value.hdd1
  domain   = "vcloud-lab.com"
  ipv4_information = {
    ipv4_address = each.value.ipv4_address
    ipv4_netmask = each.value.ipv4_netmask
  }
  ipv4_gateway    = each.value.ipv4_gateway
  dns_server_list = [each.value.dns1, each.value.dns2]
}

This is the screenshot of deployed Virtual Machines.

vmware vsphere virtual machine vcenter esxi template clone create hashicorp terraform tf main.tf variable.tf ouput module domain join.png

This is the result and output of the example.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
.\Clone_Configure_VMs_Dev.ps1
Clone systems
module.virtual_machine["dev-os-win1"].data.vsphere_datacenter.datacenter: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_datacenter.datacenter: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
module.virtual_machine["dev-os-win1"].data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
module.virtual_machine["dev-os-win1"].data.vsphere_compute_cluster.cluster: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_compute_cluster.cluster: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_datastore.datastore: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_virtual_machine.template: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_network.network: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_network.network: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_virtual_machine.template: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_datastore.datastore: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-3006]
module.virtual_machine["dev-os-lin1"].data.vsphere_network.network: Read complete after 0s [id=network-3007]
module.virtual_machine["dev-os-lin1"].data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-3006]
module.virtual_machine["dev-os-win1"].data.vsphere_network.network: Read complete after 0s [id=network-3007]
module.virtual_machine["dev-os-lin1"].data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c9]
module.virtual_machine["dev-os-win1"].data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c9]
module.virtual_machine["dev-os-win1"].data.vsphere_virtual_machine.template: Read complete after 0s [id=4202acf4-0d67-4bd5-3e78-112faf9b433a]
module.virtual_machine["dev-os-lin1"].data.vsphere_virtual_machine.template: Read complete after 0s [id=421c995f-8ed4-53b6-840c-3f0322469935]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0] will be created
  + resource "vsphere_virtual_machine" "linuxvm" {
      + annotation                              = (known after apply)
      + boot_retry_delay                        = 10000
      + change_version                          = (known after apply)
      + cpu_limit                               = -1
      + cpu_share_count                         = (known after apply)
      + cpu_share_level                         = "normal"
      + datastore_id                            = "datastore-3006"
      + default_ip_address                      = (known after apply)
      + ept_rvi_mode                            = "automatic"
      + extra_config_reboot_required            = true
      + firmware                                = "bios"
      + folder                                  = "TempVMs"
      + force_power_off                         = true
      + guest_id                                = "ubuntu64Guest"
      + guest_ip_addresses                      = (known after apply)
      + hardware_version                        = (known after apply)
      + host_system_id                          = (known after apply)
      + hv_mode                                 = "hvAuto"
      + id                                      = (known after apply)
      + ide_controller_count                    = 2
      + imported                                = (known after apply)
      + latency_sensitivity                     = "normal"
      + memory                                  = 2048
      + memory_limit                            = -1
      + memory_share_count                      = (known after apply)
      + memory_share_level                      = "normal"
      + migrate_wait_timeout                    = 30
      + moid                                    = (known after apply)
      + name                                    = "dev-os-lin1"
      + num_cores_per_socket                    = 1
      + num_cpus                                = 2
      + power_state                             = (known after apply)
      + poweron_timeout                         = 300
      + reboot_required                         = (known after apply)
      + resource_pool_id                        = "resgroup-10"
      + run_tools_scripts_after_power_on        = true
      + run_tools_scripts_after_resume          = true
      + run_tools_scripts_before_guest_shutdown = true
      + run_tools_scripts_before_guest_standby  = true
      + sata_controller_count                   = 0
      + scsi_bus_sharing                        = "noSharing"
      + scsi_controller_count                   = 1
      + scsi_type                               = "lsilogic"
      + shutdown_wait_timeout                   = 3
      + storage_policy_id                       = (known after apply)
      + swap_placement_policy                   = "inherit"
      + tools_upgrade_policy                    = "manual"
      + uuid                                    = (known after apply)
      + vapp_transport                          = (known after apply)
      + vmware_tools_status                     = (known after apply)
      + vmx_path                                = (known after apply)
      + wait_for_guest_ip_timeout               = 0
      + wait_for_guest_net_routable             = true
      + wait_for_guest_net_timeout              = 5

      + clone {
          + template_uuid = "421c995f-8ed4-53b6-840c-3f0322469935"
          + timeout       = 30

          + customize {
              + ipv4_gateway = "192.168.34.1"
              + timeout      = 10

              + linux_options {
                  + domain       = "vcloud-lab.com"
                  + host_name    = "dev-os-lin1"
                  + hw_clock_utc = true
                }

              + network_interface {
                  + dns_server_list = [
                      + "192.168.34.11",
                      + "192.168.34.12",
                    ]
                  + ipv4_address    = "192.168.34.80"
                  + ipv4_netmask    = 24
                }
            }
        }

      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "Hard disk 1"
          + path              = (known after apply)
          + size              = 100
          + storage_policy_id = (known after apply)
          + thin_provisioned  = true
          + unit_number       = 0
          + uuid              = (known after apply)
          + write_through     = false
        }
      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "Hard disk 2"
          + path              = (known after apply)
          + size              = 16
          + storage_policy_id = (known after apply)
          + thin_provisioned  = true
          + unit_number       = 1
          + uuid              = (known after apply)
          + write_through     = false
        }
      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "Hard disk 3"
          + path              = (known after apply)
          + size              = 25
          + storage_policy_id = (known after apply)
          + thin_provisioned  = true
          + unit_number       = 2
          + uuid              = (known after apply)
          + write_through     = false
        }
      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "dev-os-lin1-4"
          + path              = (known after apply)
          + size              = 100
          + storage_policy_id = (known after apply)
          + thin_provisioned  = true
          + unit_number       = 4
          + uuid              = (known after apply)
          + write_through     = false
        }

      + network_interface {
          + adapter_type          = "e1000"
          + bandwidth_limit       = -1
          + bandwidth_reservation = 0
          + bandwidth_share_count = (known after apply)
          + bandwidth_share_level = "normal"
          + device_address        = (known after apply)
          + key                   = (known after apply)
          + mac_address           = (known after apply)
          + network_id            = "network-3007"
        }
    }

  # module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0] will be created
  + resource "vsphere_virtual_machine" "windowsvm" {
      + annotation                              = (known after apply)
      + boot_retry_delay                        = 10000
      + change_version                          = (known after apply)
      + cpu_limit                               = -1
      + cpu_share_count                         = (known after apply)
      + cpu_share_level                         = "normal"
      + datastore_id                            = "datastore-3006"
      + default_ip_address                      = (known after apply)
      + ept_rvi_mode                            = "automatic"
      + extra_config_reboot_required            = true
      + firmware                                = "efi"
      + folder                                  = "TempVMs"
      + force_power_off                         = true
      + guest_id                                = "windows2019srv_64Guest"
      + guest_ip_addresses                      = (known after apply)
      + hardware_version                        = (known after apply)
      + host_system_id                          = (known after apply)
      + hv_mode                                 = "hvAuto"
      + id                                      = (known after apply)
      + ide_controller_count                    = 2
      + imported                                = (known after apply)
      + latency_sensitivity                     = "normal"
      + memory                                  = 2048
      + memory_limit                            = -1
      + memory_share_count                      = (known after apply)
      + memory_share_level                      = "normal"
      + migrate_wait_timeout                    = 30
      + moid                                    = (known after apply)
      + name                                    = "dev-os-win1"
      + num_cores_per_socket                    = 1
      + num_cpus                                = 2
      + power_state                             = (known after apply)
      + poweron_timeout                         = 300
      + reboot_required                         = (known after apply)
      + resource_pool_id                        = "resgroup-10"
      + run_tools_scripts_after_power_on        = true
      + run_tools_scripts_after_resume          = true
      + run_tools_scripts_before_guest_shutdown = true
      + run_tools_scripts_before_guest_standby  = true
      + sata_controller_count                   = 0
      + scsi_bus_sharing                        = "noSharing"
      + scsi_controller_count                   = 1
      + scsi_type                               = "lsilogic-sas"
      + shutdown_wait_timeout                   = 3
      + storage_policy_id                       = (known after apply)
      + swap_placement_policy                   = "inherit"
      + tools_upgrade_policy                    = "manual"
      + uuid                                    = (known after apply)
      + vapp_transport                          = (known after apply)
      + vmware_tools_status                     = (known after apply)
      + vmx_path                                = (known after apply)
      + wait_for_guest_ip_timeout               = 0
      + wait_for_guest_net_routable             = true
      + wait_for_guest_net_timeout              = 5

      + clone {
          + template_uuid = "4202acf4-0d67-4bd5-3e78-112faf9b433a"
          + timeout       = 30

          + customize {
              + ipv4_gateway = "192.168.34.1"
              + timeout      = 10

              + network_interface {
                  + dns_server_list = [
                      + "192.168.34.11",
                      + "192.168.34.12",
                    ]
                  + ipv4_address    = "192.168.34.81"
                  + ipv4_netmask    = 24
                }

              + windows_options {
                  + auto_logon_count  = 1
                  + computer_name     = "dev-os-win1"
                  + full_name         = "Administrator"
                  + organization_name = "Managed by Terraform"
                  + time_zone         = 85
                  + workgroup         = "workgroup"
                }
            }
        }

      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "Hard disk 1"
          + path              = (known after apply)
          + size              = 90
          + storage_policy_id = (known after apply)
          + thin_provisioned  = false
          + unit_number       = 0
          + uuid              = (known after apply)
          + write_through     = false
        }
      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "dev-os-win1-2"
          + path              = (known after apply)
          + size              = 120
          + storage_policy_id = (known after apply)
          + thin_provisioned  = false
          + unit_number       = 2
          + uuid              = (known after apply)
          + write_through     = false
        }

      + network_interface {
          + adapter_type          = "e1000e"
          + bandwidth_limit       = -1
          + bandwidth_reservation = 0
          + bandwidth_share_count = (known after apply)
          + bandwidth_share_level = "normal"
          + device_address        = (known after apply)
          + key                   = (known after apply)
          + mac_address           = (known after apply)
          + network_id            = "network-3007"
        }
    }

Plan: 2 to add, 0 to change, 0 to destroy.

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 

Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now. 
module.virtual_machine["dev-os-win1"].data.vsphere_datacenter.datacenter: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_datacenter.datacenter: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
module.virtual_machine["dev-os-lin1"].data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
module.virtual_machine["dev-os-lin1"].data.vsphere_compute_cluster.cluster: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_virtual_machine.template: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_compute_cluster.cluster: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_virtual_machine.template: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_datastore.datastore: Reading...
module.virtual_machine["dev-os-lin1"].data.vsphere_network.network: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_network.network: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_datastore.datastore: Reading...
module.virtual_machine["dev-os-win1"].data.vsphere_network.network: Read complete after 0s [id=network-3007]
module.virtual_machine["dev-os-win1"].data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c9]
module.virtual_machine["dev-os-lin1"].data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c9]
module.virtual_machine["dev-os-lin1"].data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-3006]
module.virtual_machine["dev-os-win1"].data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-3006]
module.virtual_machine["dev-os-lin1"].data.vsphere_network.network: Read complete after 0s [id=network-3007]
module.virtual_machine["dev-os-win1"].data.vsphere_virtual_machine.template: Read complete after 0s [id=4202acf4-0d67-4bd5-3e78-112faf9b433a]
module.virtual_machine["dev-os-lin1"].data.vsphere_virtual_machine.template: Read complete after 0s [id=421c995f-8ed4-53b6-840c-3f0322469935]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0] will be created
  + resource "vsphere_virtual_machine" "linuxvm" {
      + annotation                              = (known after apply)
      + boot_retry_delay                        = 10000
      + change_version                          = (known after apply)
      + cpu_limit                               = -1
      + cpu_share_count                         = (known after apply)
      + cpu_share_level                         = "normal"
      + datastore_id                            = "datastore-3006"
      + default_ip_address                      = (known after apply)
      + ept_rvi_mode                            = "automatic"
      + extra_config_reboot_required            = true
      + firmware                                = "bios"
      + folder                                  = "TempVMs"
      + force_power_off                         = true
      + guest_id                                = "ubuntu64Guest"
      + guest_ip_addresses                      = (known after apply)
      + hardware_version                        = (known after apply)
      + host_system_id                          = (known after apply)
      + hv_mode                                 = "hvAuto"
      + id                                      = (known after apply)
      + ide_controller_count                    = 2
      + imported                                = (known after apply)
      + latency_sensitivity                     = "normal"
      + memory                                  = 2048
      + memory_limit                            = -1
      + memory_share_count                      = (known after apply)
      + memory_share_level                      = "normal"
      + migrate_wait_timeout                    = 30
      + moid                                    = (known after apply)
      + name                                    = "dev-os-lin1"
      + num_cores_per_socket                    = 1
      + num_cpus                                = 2
      + power_state                             = (known after apply)
      + poweron_timeout                         = 300
      + reboot_required                         = (known after apply)
      + resource_pool_id                        = "resgroup-10"
      + run_tools_scripts_after_power_on        = true
      + run_tools_scripts_after_resume          = true
      + run_tools_scripts_before_guest_shutdown = true
      + run_tools_scripts_before_guest_standby  = true
      + sata_controller_count                   = 0
      + scsi_bus_sharing                        = "noSharing"
      + scsi_controller_count                   = 1
      + scsi_type                               = "lsilogic"
      + shutdown_wait_timeout                   = 3
      + storage_policy_id                       = (known after apply)
      + swap_placement_policy                   = "inherit"
      + tools_upgrade_policy                    = "manual"
      + uuid                                    = (known after apply)
      + vapp_transport                          = (known after apply)
      + vmware_tools_status                     = (known after apply)
      + vmx_path                                = (known after apply)
      + wait_for_guest_ip_timeout               = 0
      + wait_for_guest_net_routable             = true
      + wait_for_guest_net_timeout              = 5

      + clone {
          + template_uuid = "421c995f-8ed4-53b6-840c-3f0322469935"
          + timeout       = 30

          + customize {
              + ipv4_gateway = "192.168.34.1"
              + timeout      = 10

              + linux_options {
                  + domain       = "vcloud-lab.com"
                  + host_name    = "dev-os-lin1"
                  + hw_clock_utc = true
                }

              + network_interface {
                  + dns_server_list = [
                      + "192.168.34.11",
                      + "192.168.34.12",
                    ]
                  + ipv4_address    = "192.168.34.80"
                  + ipv4_netmask    = 24
                }
            }
        }

      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "Hard disk 1"
          + path              = (known after apply)
          + size              = 100
          + storage_policy_id = (known after apply)
          + thin_provisioned  = true
          + unit_number       = 0
          + uuid              = (known after apply)
          + write_through     = false
        }
      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "Hard disk 2"
          + path              = (known after apply)
          + size              = 16
          + storage_policy_id = (known after apply)
          + thin_provisioned  = true
          + unit_number       = 1
          + uuid              = (known after apply)
          + write_through     = false
        }
      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "Hard disk 3"
          + path              = (known after apply)
          + size              = 25
          + storage_policy_id = (known after apply)
          + thin_provisioned  = true
          + unit_number       = 2
          + uuid              = (known after apply)
          + write_through     = false
        }
      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "dev-os-lin1-4"
          + path              = (known after apply)
          + size              = 100
          + storage_policy_id = (known after apply)
          + thin_provisioned  = true
          + unit_number       = 4
          + uuid              = (known after apply)
          + write_through     = false
        }

      + network_interface {
          + adapter_type          = "e1000"
          + bandwidth_limit       = -1
          + bandwidth_reservation = 0
          + bandwidth_share_count = (known after apply)
          + bandwidth_share_level = "normal"
          + device_address        = (known after apply)
          + key                   = (known after apply)
          + mac_address           = (known after apply)
          + network_id            = "network-3007"
        }
    }

  # module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0] will be created
  + resource "vsphere_virtual_machine" "windowsvm" {
      + annotation                              = (known after apply)
      + boot_retry_delay                        = 10000
      + change_version                          = (known after apply)
      + cpu_limit                               = -1
      + cpu_share_count                         = (known after apply)
      + cpu_share_level                         = "normal"
      + datastore_id                            = "datastore-3006"
      + default_ip_address                      = (known after apply)
      + ept_rvi_mode                            = "automatic"
      + extra_config_reboot_required            = true
      + firmware                                = "efi"
      + folder                                  = "TempVMs"
      + force_power_off                         = true
      + guest_id                                = "windows2019srv_64Guest"
      + guest_ip_addresses                      = (known after apply)
      + hardware_version                        = (known after apply)
      + host_system_id                          = (known after apply)
      + hv_mode                                 = "hvAuto"
      + id                                      = (known after apply)
      + ide_controller_count                    = 2
      + imported                                = (known after apply)
      + latency_sensitivity                     = "normal"
      + memory                                  = 2048
      + memory_limit                            = -1
      + memory_share_count                      = (known after apply)
      + memory_share_level                      = "normal"
      + migrate_wait_timeout                    = 30
      + moid                                    = (known after apply)
      + name                                    = "dev-os-win1"
      + num_cores_per_socket                    = 1
      + num_cpus                                = 2
      + power_state                             = (known after apply)
      + poweron_timeout                         = 300
      + reboot_required                         = (known after apply)
      + resource_pool_id                        = "resgroup-10"
      + run_tools_scripts_after_power_on        = true
      + run_tools_scripts_after_resume          = true
      + run_tools_scripts_before_guest_shutdown = true
      + run_tools_scripts_before_guest_standby  = true
      + sata_controller_count                   = 0
      + scsi_bus_sharing                        = "noSharing"
      + scsi_controller_count                   = 1
      + scsi_type                               = "lsilogic-sas"
      + shutdown_wait_timeout                   = 3
      + storage_policy_id                       = (known after apply)
      + swap_placement_policy                   = "inherit"
      + tools_upgrade_policy                    = "manual"
      + uuid                                    = (known after apply)
      + vapp_transport                          = (known after apply)
      + vmware_tools_status                     = (known after apply)
      + vmx_path                                = (known after apply)
      + wait_for_guest_ip_timeout               = 0
      + wait_for_guest_net_routable             = true
      + wait_for_guest_net_timeout              = 5

      + clone {
          + template_uuid = "4202acf4-0d67-4bd5-3e78-112faf9b433a"
          + timeout       = 30

          + customize {
              + ipv4_gateway = "192.168.34.1"
              + timeout      = 10

              + network_interface {
                  + dns_server_list = [
                      + "192.168.34.11",
                      + "192.168.34.12",
                    ]
                  + ipv4_address    = "192.168.34.81"
                  + ipv4_netmask    = 24
                }

              + windows_options {
                  + auto_logon_count  = 1
                  + computer_name     = "dev-os-win1"
                  + full_name         = "Administrator"
                  + organization_name = "Managed by Terraform"
                  + time_zone         = 85
                  + workgroup         = "workgroup"
                }
            }
        }

      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "Hard disk 1"
          + path              = (known after apply)
          + size              = 90
          + storage_policy_id = (known after apply)
          + thin_provisioned  = false
          + unit_number       = 0
          + uuid              = (known after apply)
          + write_through     = false
        }
      + disk {
          + attach            = false
          + controller_type   = "scsi"
          + datastore_id      = "<computed>"
          + device_address    = (known after apply)
          + disk_mode         = "persistent"
          + disk_sharing      = "sharingNone"
          + eagerly_scrub     = false
          + io_limit          = -1
          + io_reservation    = 0
          + io_share_count    = 0
          + io_share_level    = "normal"
          + keep_on_remove    = false
          + key               = 0
          + label             = "dev-os-win1-2"
          + path              = (known after apply)
          + size              = 120
          + storage_policy_id = (known after apply)
          + thin_provisioned  = false
          + unit_number       = 2
          + uuid              = (known after apply)
          + write_through     = false
        }

      + network_interface {
          + adapter_type          = "e1000e"
          + bandwidth_limit       = -1
          + bandwidth_reservation = 0
          + bandwidth_share_count = (known after apply)
          + bandwidth_share_level = "normal"
          + device_address        = (known after apply)
          + key                   = (known after apply)
          + mac_address           = (known after apply)
          + network_id            = "network-3007"
        }
    }

Plan: 2 to add, 0 to change, 0 to destroy.
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Creating...
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Creating...
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [10s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [10s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [20s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [30s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [30s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [40s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [50s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [50s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [1m0s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [1m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [1m10s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [1m10s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [1m20s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [1m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [1m30s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [1m30s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [1m40s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [1m40s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [1m50s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [1m50s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [2m0s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [2m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [2m10s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [2m10s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [2m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [2m20s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [2m30s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [2m30s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [2m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [2m40s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [2m50s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [2m50s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [3m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [3m0s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [3m10s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [3m10s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [3m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [3m20s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [3m30s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [3m30s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [3m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [3m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [3m50s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [3m50s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [4m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [4m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [4m10s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [4m10s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [4m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [4m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [4m30s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [4m30s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [4m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [4m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [4m50s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [4m50s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [5m0s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [5m0s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [5m10s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [5m10s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [5m20s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [5m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [5m30s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [5m30s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [5m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [5m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [5m50s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [5m50s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [6m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [6m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [6m10s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [6m10s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [6m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [6m20s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Still creating... [6m30s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [6m30s elapsed]
module.virtual_machine["dev-os-lin1"].vsphere_virtual_machine.linuxvm[0]: Creation complete after 6m39s [id=421cb547-575f-9665-47e3-1e2d5d748825]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [6m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [6m50s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [7m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [7m10s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [7m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [7m30s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [7m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [7m50s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [8m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [8m10s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [8m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [8m30s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [8m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [8m50s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [9m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [9m10s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [9m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [9m30s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [9m40s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [9m50s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [10m0s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [10m10s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Still creating... [10m20s elapsed]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Provisioning with 'local-exec'...
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0] (local-exec): Executing: ["PowerShell" "-Command" "      Write-Host \"Test Message1\"\r\n      Write-Host \"Test Message2\"\r\n"]
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0] (local-exec): Test Message1
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0] (local-exec): Test Message2
module.virtual_machine["dev-os-win1"].vsphere_virtual_machine.windowsvm[0]: Creation complete after 10m29s [id=421c73f4-78d2-6cf5-65a6-43699b998199]

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
Join domain into system

Useful Articles
Using terraform to clone a virtual machine on VMware vSphere infrastructure
Terraform module clone VMware vSphere Linux and Windows virtual machine
Terraform VMware vSphere Virtual Machine customization clone failed on Windows
Terraform VMware vSphere Virtual Machine cloning Operating system not found
Terraform clone virtual machine template in VMware vSphere vCenter from CSV file
Terraform error retrieving storage account failure responding to request StatusCode 404 StorageAccountNotFound The storage account was not found
Terraform testing local variables and output csv file without resource Part 1
Terraform testing variable map object values without resource configuration part 2
Terraform deploy create A Private DNS Record in Microsoft Azure from list of objects

Go Back

Comment

Blog Search

Page Views

11588863

Follow me on Blogarama