Hey All.....
I create a Red Hat 7.2 image and publish it to vSphere via Packer. ( rhel-7.2-x86_64-automation-base/rhel-7.2-x86_64-automation-base.vmdk below)
Then I use that vmdk to deploy application specific vm's in a folder. But, the deployed VM's do not contain the dns_suffixes, dns_servers, and network_interface parameters.
Can anyone point me in the right direction as to why these arguments are not being configured?
# --- Configure the VMware vSphere Provider
provider "vsphere" {
user = "${var.vsphere_user}"
password = "${var.vsphere_password}"
vsphere_server = "${var.vsphere_server}"
allow_unverified_ssl = "true"
}
# --- Create the folder for the application vm's
resource "vsphere_folder" "application" {
datacenter = "${var.datacenter}"
path = "NON-Production/java-opc/spring-boot-jpetstore-test-app"
}
# --- create the vm's
resource "vsphere_virtual_machine" "appserver1" {
name = "spring-boot-jpetstore-app1"
folder = "${vsphere_folder.application.path}"
vcpu = 1
memory = 2048
datacenter = "${var.datacenter}"
cluster = "${var.cluster}"
dns_servers = ["10.50.1.250","172.22.4.55","172.22.4.56"]
custom_configuration_parameters{
"tools.syncTime" = "TRUE"
"virtualHW.version" = "10"
"virtualHW.productCompatibility" = "hosted"
"ethernet0.pcislotnumber" = "33"
}
network_interface {
label = "10_68_6_VMNet"
ipv4_address = "10.68.6.27"
ipv4_prefix_length = "24"
ipv4_gateway = "10.68.6.1"
}
disk {
datastore = "${var.datastore}"
vmdk = "rhel-7.2-x86_64-automation-base/rhel-7.2-x86_64-automation-base.vmdk"
bootable = "true"
}
}
open-vm-tools are installed on the red hat vmdk. But I don't understand why the network configs aren't applied.
Any help or direction would be greatly appreciated.