Hi,
Here are the plugin list
vagrant-share (1.1.9, system)
vagrant-vmware-esxi (1.1.7)
vagrant-vmware-workstation (5.0.4)
vagrant-vsphere (1.13.2)
Yes I have vmware_workstation on my build machine, but I want to deploy on a remote machine esxi and have a static IP assigned on eth1. To do that I need to specify a customization_spec_name,. This option seems to be supported for provider vsphere only. I tried esxi (the option is not available) and vmnware_workstation (does not seems to support remote deployment). Maybe I am wrong ?
I am building a box from scratch with a rhel 7.3 OS,
Here is the packer file:
{
"variables":
{
"iso_url": "/c:/Test/Linux/rhel/rhel-server-7.3-x86_64-dvd.iso",
"iso_checksum": "120acbca7b3d55465eb9f8ef53ad7365f2997d42d4f83d7cc285bf5c71e1131f",
"iso_checksum_type": "sha256",
"os_release": "7.3",
"disk_size": "50000",
"box_name": "xtract-vmware-rhel"
},
"builders":
[
{
"headless": true,
"type": "vmware-iso",
"vm_name": "{{user `box_name`}}-{{user `os_release`}}",
"boot_wait": "10s",
"disk_size": "{{user `disk_size`}}",
"guest_os_type": "rhel7-64",
"http_directory": "http",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"tools_upload_flavor": "linux",
"tools_upload_path": "/tmp/vmware_tools_{{.Flavor}}.iso",
"boot_command":
[
"<esc><wait>",
"vmlinuz initrd=initrd.img inst.geoloc=0 rd.driver.blacklist=dm-multipath net.ifnames=0 biosdevname=0 ",
"ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/vagrant-vmware.ks",
"<enter>"
],
"shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p",
"shutdown_timeout" : "300s",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "60m",
"output_directory": "builds",
"vmx_data": {
"numvcpus": 2,
"cpuid.coresPerSocket": 1,
"memsize": 4096,
"ethernet0.virtualDev": "vmxnet3",
"virtualHW.version": "11"
}
}
],
"provisioners":
[
{
"inline":
[
"sudo mkdir /home/vagrant/scripts",
"sudo chmod 777 /home/vagrant/scripts"
],
"type": "shell"
},
{
"source": "./scripts/",
"destination": "/home/vagrant/scripts",
"type": "file"
},
{
"type": "shell",
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"scripts":
[
"scripts/subscription.sh",
"scripts/base.sh",
"scripts/vagrant.sh",
"scripts/vmware.sh",
"scripts/sshd.sh",
"scripts/cleanup.sh",
"scripts/setup-java2.sh",
"scripts/install-xtract.sh",
"scripts/xtract-env.sh"
]
}
],
"post-processors": [{
"type": "vagrant",
"output": "{{user `box_name`}}-{{user `os_release`}}.box",
"keep_input_artifact": false
}]