You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see this was tested with ovf template i am using VM templates
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
resource "vsphere_virtual_machine"
resource"vsphere_virtual_machine""vm" {
name=length(var.ip-addresses) >1?"${var.name}-${count.index+1}": var.nameresource_pool_id=data.vsphere_compute_cluster.cluster.resource_pool_iddatastore_cluster_id=data.vsphere_datastore_cluster.datastore_cluster.idhost_system_id=data.vsphere_host.host.idsata_controller_count=1scsi_controller_count=1count=length(var.ip-addresses) >0?length(var.ip-addresses) :1# only if you DO NOT want to wait for an IP addresswait_for_guest_net_routable=falsenum_cpus=var.num_cpusmemory=var.memoryguest_id="ubuntu64Guest"network_interface {
network_id=data.vsphere_network.network.id
}
disk {
label="disk0"size=var.disk_sizeunit_number=0thin_provisioned=false
}
clone {
template_uuid=data.vsphere_content_library_item.item.idcustomize {
linux_options {
host_name="${count.index}">1?"${var.name}-${count.index}": var.namedomain="${count.index}">1?"${var.name}-${count.index}": var.name
}
network_interface {
ipv4_address=length(var.ip-addresses) >0?element(var.ip-addresses, count.index) : var.ip-addressipv4_netmask=24
}
ipv4_gateway="10.10.10.1"
}
}
}
╷
│ Error: 400 BadRequest: {"type":"com.vmware.vapi.std.errors.invalid_argument","value":{"error_type":"INVALID_ARGUMENT","messages":[{"args":["group-p105:2e683356-6528-4429-b53e-78ab46e2136b"],"default_message":"The provided datastore ID group-p105:2e683356-6528-4429-b53e-78ab46e2136b is invalid.","id":"com.vmware.vdcs.vmtx-main.invalid_datastore_id_format"}]}}
│
│ with module.virtual_machine.vsphere_virtual_machine.vm[1],
│ on modules/virtual-machine/vm_machine.tf line 2, in resource "vsphere_virtual_machine""vm":
│ 2: resource"vsphere_virtual_machine""vm" {
╵
Steps to Reproduce
Storing vm template to content library from using packer and with this configuration which getting the datastore cluster data has been validated but while creating the vm i am getting this error.
Community Guidelines
Terraform
OpenTofu v1.8.2
Terraform Provider
v2.9.2
VMware vSphere
ESXI 7.0 U2
Description
Referencing from this https://knowledge.broadcom.com/external/article/312205/vm-template-cannot-be-deployed-to-datast.html and PR that seemed to fix this issue
I see this was tested with ovf template i am using VM templates
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
resource "vsphere_virtual_machine"
Data file
Debug Output
None
Panic Output
No response
Expected Behavior
Creating vm with datastore cluster
Actual Behavior
I got this error
Steps to Reproduce
Storing vm template to content library from using packer and with this configuration which getting the datastore cluster data has been validated but while creating the vm i am getting this error.
Environment Details
No response
Screenshots
No response
References
#2061
The text was updated successfully, but these errors were encountered: