Hello. Timeout occurs when distributing vms, but I don’t know which part to modify.
The timeout problem was solved by giving 60 in clone. However, it takes more than 40 minutes to distribute the phrases below. Would it be possible to get some help?
resource "vsphere_virtual_machine" "vm" {
count = var.vm-count
name = "${var.vm-name}-${format("%02d",count.index + 1)}"
resource_pool_id = data.vsphere_resource_pool.pool.id
datastore_id = data.vsphere_datastore.datastore.id
num_cpus = var.vm-cpu
memory = var.vm-ram
guest_id = var.vm-guest-id
wait_for_guest_net_routable = false
wait_for_guest_net_timeout = 0
wait_for_guest_ip_timeout = 0
network_interface {
network_id = data.vsphere_network.public-network.id
}
network_interface {
network_id = data.vsphere_network.private-network.id
}
disk {
label = "${var.vm-name}-disk-${format("%02d",count.index + 1)}"
size = var.vm-disk
}
clone {
timeout = 60
template_uuid = data.vsphere_virtual_machine.template.id
customize {
timeout = 0
linux_options {
host_name = "${var.vm-name}-${format("%02d",count.index + 1)}"
domain = ""
}
network_interface {
ipv4_address="${cidrhost(var.public-ip,var.last-octet+count.index)}"
ipv4_netmask=var.subnet-mask
}
network_interface {
ipv4_address="${cidrhost(var.private-ip,var.last-octet+count.index)}"
ipv4_netmask=var.subnet-mask
}
ipv4_gateway = var.default-gateway
dns_server_list=["8.8.8.8"]
}
}
connection {
host ="${self.default_ip_address}"
type ="ssh"
user ="root"
password="xxxx"
}
}
public-network - ext net
private-network - int net