Hi,
I’m using vspher_virtual_machine
and ova template to provision virtual machines on vSphere.
One issue that I have is that the CD-ROM devices do not get disconnected after the provisioning has finished.
Any ideas how I can do that through terraform, if it’s possible?
This is a snippet from the vsphere_virtual_machine
resource:
cdrom {
client_device = true
}
clone {
template_uuid = data.vsphere_virtual_machine.template.id
customize {
linux_options {
host_name = var.hostname
domain = "localhost"
}
network_interface {
ipv4_address = var.ip_address
ipv4_netmask = "24"
}
ipv4_gateway = var.gateway
dns_server_list = var.dns_server_list
}
}
vapp {
properties = {
user-data = base64encode(var.cloudinit_config)
"hostname" = var.hostname
}
}
I needed to set client_device
in order to pass the information (cloud-init) to the virtual machine.