I am building a VM, then attempting to upload that VM to vSphere and mark 
it as a template.

The VM builds fine, it uploads to vSphere fine. It's just not getting 
marked as a template.

I have read the section in the docs titled "Using the vSphere Template with 
local builders", and I thought I had it right, but it's not working. Here's 
my template, sanitized.

{
  "variables": {
    "name": "BaseImage",
    "platform": "rh72",
    "version": "1.3.0"
  },
  "builders": [
    {
      "type": "vmware-iso",
      "boot_command": [ "<up><tab> text biosdevname=0 net.ifnames=0 
ks=hd:fd0:/baseimage_130_72.cfg<enter><wait>" ],
      "boot_wait": "15s",
      "disk_size": "20480",
      "guest_os_type": "rhel7-64",
      "headless": true,
      "iso_urls": [ "rhel-server-7.2-x86_64-dvd.iso" ],
      "floppy_files": [ "http/baseimage_130_72.cfg" ],
      "iso_checksum_type": "sha256",
      "iso_checksum": 
"03f3a0291634335f6995534d829bd21ffaa0d000004dfeb1b2fb81052d64a4d5",
      "ssh_username": "vagrant",
      "ssh_password": "vagrant",
      "ssh_port": 22,
      "ssh_wait_timeout": "20000s",
      "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p",
      "tools_upload_flavor": "linux",
      "vm_name": "Base_Image",
      "vnc_port_min": "5902",
      "vnc_port_max": "5902",
      "vnc_disable_password": true,
      "network": "nat",
      "vmx_data": {
        "cpuid.coresPerSocket": "1",
        "memsize": "1024",
        "numvcpus": "1"
      }
    }
  ],
  "post-processors": [
    {
      "output": "builds/{{user `name`}}-{{user `platform`}}-{{user 
`version`}}-{{timestamp}}.box",
      "type": "vagrant",
      "keep_input_artifact": true
    },
    {
      "target": "{{user `name`}}-{{user `platform`}}-{{user 
`version`}}-{{timestamp}}.ova",
      "type": "ovftool",
      "only": [ "vmware-iso" ],
      "format": "ova"
    },
    {
      "type": "vsphere",
      "cluster": "mycluster",
      "datacenter": "mydatacenter",
      "datastore": "mydatastore",
      "host": "myvmhost.mycompany.com",
      "username": "myuser",
      "password": "mypass",
      "vm_name": "test-vm-rh72-130",
      "overwrite": true,
      "vm_network": "my_network"  
    },
    {
      "type": "vsphere-template",
      "host": "myvmhost.mycompany.com",
      "insecure": true,
      "username": "myuser",
      "password": "mypass",
      "datacenter": "mydatacenter"
   }
  ]
}

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/19a1f755-86ae-4dca-a878-33081dd1f192%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to