rakutentech / terraform-provider-vsphere

[DEPRECATED] Terraform Custom Provider for VMware vSphere
Mozilla Public License 2.0
82 stars 30 forks source link

get a error fault.customizationpending.summary #35

Closed guanglinlv closed 9 years ago

guanglinlv commented 9 years ago

Hi,

I delete network adapters from my template to fix NicSettingsMismatch issue according VM template specification. but i got a new error fault.customizationpending.summary.

@tkak

software version

Terraform v0.6.3 terraform-provider-vsphere_0.3.2 vmware vsphere 5.0

reproduce

1, download and install terraform and terraform-provider-vsphere. 2, touch a terraform config file

resource "vsphere_virtual_machine" "tf-instance" {
    datacenter = "${var.instance_datacenter}"
    cluster = "${var.instance_cluster}"
    name = "${var.instance_hostname}"
    vcpu = "${var.instance_vcpu}"
    memory = "${var.instance_memory}"
    domain = "${var.instance_domain}"
    dns_suffix = ["${var.instance_dns_search}"]
    dns_server = ["${var.instance_dns_server}"]
    time_zone = "${var.instance_timezone}"
    boot_delay = 30
    #resource_pool = "${var.instance_resource_pool}"
    disk {
        datastore  = "${var.instance_disk_datastore}"
        template = "${var.instance_disk_template}"
        size = "${var.instance_disk_size}"
        iops = 500
    }
    gateway = "${var.instance_network_gateway}"
    network_interface  {
        label = "${var.instance_network_label}"
        ip_address = "${var.instance_network_ip_address}"
        subnet_mask = "${var.instance_network_subnet_mask}"
    }
}

3, terraform apply

TF_LOG

module.tf-was-template-vsphere.vsphere_virtual_machine.tf-instance: Creating...
  boot_delay:                      "" => "30"
  cluster:                         "" => "DGGWPF_Cluster02"
  datacenter:                      "" => "WPFTest"
  disk.#:                          "" => "1"
  disk.0.datastore:                "" => "dggvmx131-ts_data"
  disk.0.iops:                     "" => "500"
  disk.0.size:                     "" => "50"
  disk.0.template:                 "" => "tf-template"
  dns_server.#:                    "" => "1"
  dns_server.0:                    "" => "10.72.255.100"
  dns_suffix.#:                    "" => "1"
  dns_suffix.0:                    "" => "test.com"
  domain:                          "" => "test.com"
  memory:                          "" => "8192"
  name:                            "" => "tf-was-template"
  network_interface.#:             "" => "1"
  network_interface.0.ip_address:  "" => "<computed>"
  network_interface.0.label:       "" => "ifbiz-58"
  network_interface.0.subnet_mask: "" => "<computed>"
  time_zone:                       "" => "Etc/UTC"
  vcpu:                            "" => "2"
2015/09/24 06:20:12 terraform-provider-vsphere: 2015/09/24 06:20:12 [DEBUG] network_interface init: [{ ifbiz-58   }]
2015/09/24 06:20:12 terraform-provider-vsphere: 2015/09/24 06:20:12 [DEBUG] disk init: [{0 500}]
2015/09/24 06:20:13 terraform-provider-vsphere: 2015/09/24 06:20:13 [DEBUG] template: {"InventoryPath":"/WPFTest/vm/tf-template"}
2015/09/24 06:20:14 terraform-provider-vsphere: 2015/09/24 06:20:14 [DEBUG] resource pool: {"InventoryPath":"/WPFTest/host/DGGWPF_Cluster02/Resources"}
2015/09/24 06:20:14 terraform-provider-vsphere: 2015/09/24 06:20:14 [DEBUG] datastore: {"InventoryPath":"/WPFTest/datastore/dggvmx131-ts_data"}
2015/09/24 06:20:14 terraform-provider-vsphere: 2015/09/24 06:20:14 [DEBUG] relocate spec: {"Service":null,"Folder":null,"Datastore":{"Type":"Datastore","Value":"datastore-484"},"DiskMoveType":"","Pool":{"Type":"ResourcePool","Value":"resgroup-12"},"Host":null,"Disk":[{"DiskId":2000,"Datastore":{"Type":"Datastore","Value":"datastore-484"},"DiskMoveType":"","DiskBackingInfo":{"FileName":"","Datastore":null,"BackingObjectId":"","DiskMode":"persistent","Split":null,"WriteThrough":null,"ThinProvisioned":false,"EagerlyScrub":true,"Uuid":"","ContentId":"","ChangeId":"","Parent":null,"DeltaDiskFormat":"","DigestEnabled":null,"DeltaGrainSize":0,"DeltaDiskFormatVariant":"","Sharing":""},"Profile":null}],"Transform":"","DeviceChange":null,"Profile":null}
2015/09/24 06:20:15 terraform-provider-vsphere: 2015/09/24 06:20:15 [DEBUG] network configs: {"Ip":{},"SubnetMask":"","Gateway":null,"IpV6Spec":null,"DnsServerList":null,"DnsDomain":"","PrimaryWINS":"","SecondaryWINS":"","NetBIOS":""}
2015/09/24 06:20:15 terraform-provider-vsphere: 2015/09/24 06:20:15 [DEBUG] virtual machine config spec: {"ChangeVersion":"","Name":"","Version":"","Uuid":"","InstanceUuid":"","NpivNodeWorldWideName":null,"NpivPortWorldWideName":null,"NpivWorldWideNameType":"","NpivDesiredNodeWwns":0,"NpivDesiredPortWwns":0,"NpivTemporaryDisabled":null,"NpivOnNonRdmDisks":null,"NpivWorldWideNameOp":"","LocationId":"","GuestId":"","AlternateGuestName":"","Annotation":"","Files":null,"Tools":null,"Flags":null,"ConsolePreferences":null,"PowerOpInfo":null,"NumCPUs":2,"NumCoresPerSocket":1,"MemoryMB":8192,"MemoryHotAddEnabled":null,"CpuHotAddEnabled":null,"CpuHotRemoveEnabled":null,"VirtualICH7MPresent":null,"VirtualSMCPresent":null,"DeviceChange":[{"Operation":"add","FileOperation":"","Device":{"Key":-1,"DeviceInfo":null,"Backing":{"DeviceName":"ifbiz-58","UseAutoDetect":null,"Network":null,"InPassthroughMode":null},"Connectable":null,"SlotInfo":null,"ControllerKey":0,"UnitNumber":0,"AddressType":"generated","MacAddress":"","WakeOnLanEnabled":null,"ResourceAllocation":null,"ExternalId":"","UptCompatibilityEnabled":null},"Profile":null}],"CpuAllocation":null,"MemoryAllocation":null,"LatencySensitivity":null,"CpuAffinity":null,"MemoryAffinity":null,"NetworkShaper":null,"CpuFeatureMask":null,"ExtraConfig":null,"SwapPlacement":"","BootOptions":null,"VAppConfig":null,"FtInfo":null,"RepConfig":null,"VAppConfigRemoved":null,"VAssertsEnabled":null,"ChangeTrackingEnabled":null,"Firmware":"","MaxMksConnections":0,"GuestAutoLockEnabled":null,"ManagedBy":null,"MemoryReservationLockedToMax":null,"NestedHVEnabled":null,"VPMCEnabled":null,"ScheduledHardwareUpgradeInfo":null,"VmProfile":null,"MessageBusTunnelEnabled":null}
2015/09/24 06:20:15 terraform-provider-vsphere: 2015/09/24 06:20:15 [DEBUG] custom spec: {"Options":null,"Identity":{"HostName":{"Name":"tf-was-template"},"Domain":"test.com","TimeZone":"Etc/UTC","HwClockUTC":true},"GlobalIPSettings":{"DnsSuffixList":["test.com"],"DnsServerList":["10.72.255.100"]},"NicSettingMap":[{"MacAddress":"","Adapter":{"Ip":{},"SubnetMask":"","Gateway":null,"IpV6Spec":null,"DnsServerList":null,"DnsDomain":"","PrimaryWINS":"","SecondaryWINS":"","NetBIOS":""}}],"EncryptionKey":null}
2015/09/24 06:20:15 terraform-provider-vsphere: 2015/09/24 06:20:15 [DEBUG] clone spec: {"Location":{"Service":null,"Folder":null,"Datastore":{"Type":"Datastore","Value":"datastore-484"},"DiskMoveType":"","Pool":{"Type":"ResourcePool","Value":"resgroup-12"},"Host":null,"Disk":[{"DiskId":2000,"Datastore":{"Type":"Datastore","Value":"datastore-484"},"DiskMoveType":"","DiskBackingInfo":{"FileName":"","Datastore":null,"BackingObjectId":"","DiskMode":"persistent","Split":null,"WriteThrough":null,"ThinProvisioned":false,"EagerlyScrub":true,"Uuid":"","ContentId":"","ChangeId":"","Parent":null,"DeltaDiskFormat":"","DigestEnabled":null,"DeltaGrainSize":0,"DeltaDiskFormatVariant":"","Sharing":""},"Profile":null}],"Transform":"","DeviceChange":null,"Profile":null},"Template":false,"Config":{"ChangeVersion":"","Name":"","Version":"","Uuid":"","InstanceUuid":"","NpivNodeWorldWideName":null,"NpivPortWorldWideName":null,"NpivWorldWideNameType":"","NpivDesiredNodeWwns":0,"NpivDesiredPortWwns":0,"NpivTemporaryDisabled":null,"NpivOnNonRdmDisks":null,"NpivWorldWideNameOp":"","LocationId":"","GuestId":"","AlternateGuestName":"","Annotation":"","Files":null,"Tools":null,"Flags":null,"ConsolePreferences":null,"PowerOpInfo":null,"NumCPUs":2,"NumCoresPerSocket":1,"MemoryMB":8192,"MemoryHotAddEnabled":null,"CpuHotAddEnabled":null,"CpuHotRemoveEnabled":null,"VirtualICH7MPresent":null,"VirtualSMCPresent":null,"DeviceChange":[{"Operation":"add","FileOperation":"","Device":{"Key":-1,"DeviceInfo":null,"Backing":{"DeviceName":"ifbiz-58","UseAutoDetect":null,"Network":null,"InPassthroughMode":null},"Connectable":null,"SlotInfo":null,"ControllerKey":0,"UnitNumber":0,"AddressType":"generated","MacAddress":"","WakeOnLanEnabled":null,"ResourceAllocation":null,"ExternalId":"","UptCompatibilityEnabled":null},"Profile":null}],"CpuAllocation":null,"MemoryAllocation":null,"LatencySensitivity":null,"CpuAffinity":null,"MemoryAffinity":null,"NetworkShaper":null,"CpuFeatureMask":null,"ExtraConfig":null,"SwapPlacement":"","BootOptions":null,"VAppConfig":null,"FtInfo":null,"RepConfig":null,"VAppConfigRemoved":null,"VAssertsEnabled":null,"ChangeTrackingEnabled":null,"Firmware":"","MaxMksConnections":0,"GuestAutoLockEnabled":null,"ManagedBy":null,"MemoryReservationLockedToMax":null,"NestedHVEnabled":null,"VPMCEnabled":null,"ScheduledHardwareUpgradeInfo":null,"VmProfile":null,"MessageBusTunnelEnabled":null},"Customization":{"Options":null,"Identity":{"HostName":{"Name":"tf-was-template"},"Domain":"test.com","TimeZone":"Etc/UTC","HwClockUTC":true},"GlobalIPSettings":{"DnsSuffixList":["test.com"],"DnsServerList":["10.72.255.100"]},"NicSettingMap":[{"MacAddress":"","Adapter":{"Ip":{},"SubnetMask":"","Gateway":null,"IpV6Spec":null,"DnsServerList":null,"DnsDomain":"","PrimaryWINS":"","SecondaryWINS":"","NetBIOS":""}}],"EncryptionKey":null},"PowerOn":true,"Snapshot":null,"Memory":null}
2015/09/24 06:20:17 [DEBUG] vertex provider.module.tf-was-template-vsphere.vsphere (close), waiting for: module.tf-was-template-vsphere.vsphere_virtual_machine.tf-instance
2015/09/24 06:20:17 [DEBUG] vertex root, waiting for: provider.module.tf-was-template-vsphere.vsphere (close)
2015/09/24 06:20:22 [DEBUG] vertex provider.module.tf-was-template-vsphere.vsphere (close), waiting for: module.tf-was-template-vsphere.vsphere_virtual_machine.tf-instance
2015/09/24 06:20:47 [DEBUG] vertex provider.module.tf-was-template-vsphere.vsphere (close), waiting for: module.tf-was-template-vsphere.vsphere_virtual_machine.tf-instance
2015/09/24 06:20:47 [DEBUG] vertex root, waiting for: provider.module.tf-was-template-vsphere.vsphere (close)
2015/09/24 06:23:47 [DEBUG] vertex root, waiting for: provider.module.tf-was-template-vsphere.vsphere (close)
2015/09/24 06:23:51 [DEBUG] root.tf-was-template-vsphere: eval: *terraform.EvalWriteState
2015/09/24 06:23:51 [DEBUG] root.tf-was-template-vsphere: eval: *terraform.EvalApplyProvisioners
2015/09/24 06:23:51 [DEBUG] root.tf-was-template-vsphere: eval: *terraform.EvalIf
2015/09/24 06:23:51 [DEBUG] root.tf-was-template-vsphere: eval: *terraform.EvalWriteDiff
2015/09/24 06:23:51 [DEBUG] root.tf-was-template-vsphere: eval: *terraform.EvalIf
2015/09/24 06:23:51 [DEBUG] root.tf-was-template-vsphere: eval: *terraform.EvalWriteState
2015/09/24 06:23:51 [DEBUG] root.tf-was-template-vsphere: eval: *terraform.EvalApplyPost
2015/09/24 06:23:51 [ERROR] root.tf-was-template-vsphere: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* vsphere_virtual_machine.tf-instance: error: fault.CustomizationPending.summary
2015/09/24 06:23:51 [ERROR] root.tf-was-template-vsphere: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* vsphere_virtual_machine.tf-instance: error: fault.CustomizationPending.summary
2015/09/24 06:23:51 [ERROR] root.tf-was-template-vsphere: eval: *terraform.EvalOpFilter, err: 1 error(s) occurred:

* vsphere_virtual_machine.tf-instance: error: fault.CustomizationPending.summary
2015/09/24 06:23:51 [ERROR] root.tf-was-template-vsphere: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* vsphere_virtual_machine.tf-instance: error: fault.CustomizationPending.summary
2015/09/24 06:23:51 [DEBUG] vertex provider.module.tf-was-template-vsphere.vsphere (close), got dep: module.tf-was-template-vsphere.vsphere_virtual_machine.tf-instance
2015/09/24 06:23:51 [DEBUG] vertex root, got dep: provider.module.tf-was-template-vsphere.vsphere (close)
2015/09/24 06:23:51 [DEBUG] vertex root, got dep: module.tf-was-template-vsphere.plan-destroy
2015/09/24 06:23:51 [DEBUG] vertex root, got dep: provisioner.remote-exec
2015/09/24 06:23:51 [DEBUG] vertex root, got dep: provisioner.file
2015/09/24 06:23:51 [DEBUG] vertex root, got dep: module.tf-was-template-vsphere.provisioner.chef
2015/09/24 06:23:51 [DEBUG] vertex root, got dep: provisioner.chef
2015/09/24 06:23:51 [DEBUG] vertex root, got dep: provisioner.local-exec
2015/09/24 06:23:51 [DEBUG] vertex root, got dep: module.tf-was-template-vsphere.provisioner.file
2015/09/24 06:23:51 waiting for all plugin processes to complete...
Error applying plan:

1 error(s) occurred:

2015/09/24 06:23:51 [DEBUG] /opt/mwc-terraform/bin/terraform-provisioner-file: plugin process exited
2015/09/24 06:23:51 [DEBUG] /opt/mwc-terraform/bin/terraform-provisioner-local-exec: plugin process exited
2015/09/24 06:23:51 [DEBUG] /opt/mwc-terraform/bin/terraform-provisioner-chef: plugin process exited
2015/09/24 06:23:51 [DEBUG] /opt/mwc-terraform/bin/terraform-provisioner-remote-exec: plugin process exited
* vsphere_virtual_machine.tf-instance: error: fault.CustomizationPending.summary

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
2015/09/24 06:23:51 [DEBUG] /opt/mwc-terraform/bin/terraform-provider-vsphere: plugin process exited

thanks.

tkak commented 9 years ago

@guanglinlv I'm sorry for the late response. Could you try to this?

you may want to try converting the template back to a VM, logging into it, then doing another shutdown. Once shutdown convert it back to a template and try to deploy again.

Ref:

guanglinlv commented 9 years ago

@tkak thanks for your response. my template is cloned from a VM not converting. but it seem works for me. thank you very much. It really help me much.