sassoftware / viya4-iac-k8s

This project contains Terraform scripts to provision cloud infrastructure resources, when using vSphere, and Ansible to apply the needed elements of a Kubernetes cluster that are required to deploy SAS Viya platform product offerings.
Apache License 2.0
23 stars 15 forks source link

Problem: unable to create vms in vsphere/vcenter environment #115

Closed deda-smartini closed 3 months ago

deda-smartini commented 4 months ago

Terraform Version Details

{ "terraform_version": "\"1.7.4\"", "terraform_revision": "null", "terraform_outdated": "true", "provider_selections": "{}" }

Terraform Variable File Details

vSphere

vsphere_server = "vcenter.mydomain.com" # Name of the vSphere server vsphere_datacenter = "vSAN Datacenter" # Name of the vSphere data center vsphere_datastore = "vsanDatastore" # Name of the vSphere data store to use for the VMs vsphere_resource_pool = "default-rp" # Name of the vSphere resource pool to use for the VMs vsphere_folder = "/SAS-Viya-4" # Name of the vSphere folder to store the vms vsphere_template = "mytemplate" # Name of the VM template to clone to create VMs for the cluster vsphere_network = "VM Network" # Name of the network to to use for the VMs

Ansible Variable File Details

No response

Steps to Reproduce

docker run --rm -it  --group-add root   --user $(id -u):$(id -g)   --env-file $HOME/.vsphere_creds.env --volume $(pwd):/workspace   viya4-iac-k8s apply setup

Expected Behavior

VMs created successfully

Actual Behavior

Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.postgresql["default"].vsphere_virtual_machine.server, │ on modules/server/main.tf line 19, in resource "vsphere_virtual_machine" "server": │ 19: resource "vsphere_virtual_machine" "server" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.nfs.vsphere_virtual_machine.static[0], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.system["system"].vsphere_virtual_machine.static[0], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.system["system"].vsphere_virtual_machine.static[1], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.node["cas"].vsphere_virtual_machine.static[1], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.node["cas"].vsphere_virtual_machine.static[0], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.node["cas"].vsphere_virtual_machine.static[2], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.node["compute"].vsphere_virtual_machine.static[0], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.node["stateless"].vsphere_virtual_machine.static[1], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.node["stateful"].vsphere_virtual_machine.static[0], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.node["stateless"].vsphere_virtual_machine.static[0], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.jump.vsphere_virtual_machine.static[0], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.control_plane["control_plane"].vsphere_virtual_machine.static[0], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.control_plane["control_plane"].vsphere_virtual_machine.static[1], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵ ╷ │ Error: this virtual machine requires a client CDROM device to deliver vApp properties │ │ with module.control_plane["control_plane"].vsphere_virtual_machine.static[2], │ on modules/vm/main.tf line 24, in resource "vsphere_virtual_machine" "static": │ 24: resource "vsphere_virtual_machine" "static" { │ ╵

Additional Context

No response

References

No response

Code of Conduct

jarpat commented 3 months ago

Hey @deda-smartini,

I see this thread from the vSphere provider https://github.com/hashicorp/terraform-provider-vsphere/issues/489

Could you try and disable the "vApp Options" for the template and rerun apply?

deda-smartini commented 3 months ago

Hi @jarpat, thank you the reply. I disabled the vapp options and now the vms provisioning works.

Thank you