josenk / terraform-provider-esxi

Terraform-provider-esxi plugin
GNU General Public License v3.0
538 stars 154 forks source link

Allow guest Vm to run in ESXi nested host #210

Open narenas opened 10 months ago

narenas commented 10 months ago

This comes from our use case, where we have an ESXi nested host and we have to set manually the proerty monitor.allowLegacyCPU to TRUE.

It works both, cloning the guest or creating it from and exixting template.

resource "esxi_guest" "vmtest-tf" {
  guest_name              = "test"
  disk_store                 = "test"
  #guest_startup_timeout  = 600
  #boot_disk_size         = 1
  #memsize        = 1024
  power                   = "on"
  #numvcpus               = 1

  #
  #  Specify an existing guest to clone, an ovf source, or neither to build a bare-metal guest vm.
  #
  clone_from_vm      = "/source_machine"
  nested_esxi        = "y"

}

Please, feel free to let me know if there is something i should correct/improve as it is the first time i´m doing a PR and i would be happy to revise.

Regards and thanks in advance.