hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.06k stars 3.32k forks source link

Build 'vmware-iso' errored: Couldn't find VMware tools for 'linux'! #6182

Closed jayaramanit closed 6 years ago

jayaramanit commented 6 years ago

Getting this packer build issue in centos. I am trying to build ova file using vmware fusion in headless mode.

Packer v1.2.2

Exception :

mware-iso output will be in this color.

Build 'vmware-iso' errored: Couldn't find VMware tools for 'linux'! VMware often downloads these tools on-demand. However, to do this, you need to create a fake VM of the proper type then click the 'install tools' option in the VMware GUI.

==> Some builds didn't complete successfully and had errors: --> vmware-iso: Couldn't find VMware tools for 'linux'! VMware often downloads these tools on-demand. However, to do this, you need to create a fake VM of the proper type then click the 'install tools' option in the VMware GUI.

SwampDragons commented 6 years ago

Thanks for opening an issue; in order to look into this I need the simplest possible case to reproduce and the full error log with the environment variable PACKER_LOG=1 set.

panni1986 commented 6 years ago

any update on this issue?

rickard-von-essen commented 6 years ago

We haven't received anymore information. I you can provide the requested information it would make this go faster.

panni1986 commented 6 years ago

[root@DHCPPacker01 Ubuntu]# PACKER_LOG=1 packer build -debug -var-file=variable.json Ubuntu16.04.4_bkp.json 2018/05/14 15:21:03 [INFO] Packer version: 1.2.2 2018/05/14 15:21:03 Packer Target OS/Arch: linux amd64 2018/05/14 15:21:03 Built with Go Version: go1.10 2018/05/14 15:21:03 Detected home directory from env var: /root 2018/05/14 15:21:03 Using internal plugin for file 2018/05/14 15:21:03 Using internal plugin for hyperv-iso 2018/05/14 15:21:03 Using internal plugin for lxc 2018/05/14 15:21:03 Using internal plugin for profitbricks 2018/05/14 15:21:03 Using internal plugin for cloudstack 2018/05/14 15:21:03 Using internal plugin for docker 2018/05/14 15:21:03 Using internal plugin for amazon-ebs 2018/05/14 15:21:03 Using internal plugin for googlecompute 2018/05/14 15:21:03 Using internal plugin for lxd 2018/05/14 15:21:03 Using internal plugin for ncloud 2018/05/14 15:21:03 Using internal plugin for oneandone 2018/05/14 15:21:03 Using internal plugin for openstack 2018/05/14 15:21:03 Using internal plugin for amazon-chroot 2018/05/14 15:21:03 Using internal plugin for parallels-iso 2018/05/14 15:21:03 Using internal plugin for amazon-ebssurrogate 2018/05/14 15:21:03 Using internal plugin for null 2018/05/14 15:21:03 Using internal plugin for oracle-classic 2018/05/14 15:21:03 Using internal plugin for qemu 2018/05/14 15:21:03 Using internal plugin for amazon-ebsvolume 2018/05/14 15:21:03 Using internal plugin for oracle-oci 2018/05/14 15:21:03 Using internal plugin for parallels-pvm 2018/05/14 15:21:03 Using internal plugin for amazon-instance 2018/05/14 15:21:03 Using internal plugin for azure-arm 2018/05/14 15:21:03 Using internal plugin for digitalocean 2018/05/14 15:21:03 Using internal plugin for hyperv-vmcx 2018/05/14 15:21:03 Using internal plugin for scaleway 2018/05/14 15:21:03 Using internal plugin for virtualbox-iso 2018/05/14 15:21:03 Using internal plugin for vmware-iso 2018/05/14 15:21:03 Using internal plugin for vmware-vmx 2018/05/14 15:21:03 Using internal plugin for alicloud-ecs 2018/05/14 15:21:03 Using internal plugin for virtualbox-ovf 2018/05/14 15:21:03 Using internal plugin for triton 2018/05/14 15:21:03 Using internal plugin for file 2018/05/14 15:21:03 Using internal plugin for salt-masterless 2018/05/14 15:21:03 Using internal plugin for ansible 2018/05/14 15:21:03 Using internal plugin for chef-solo 2018/05/14 15:21:03 Using internal plugin for converge 2018/05/14 15:21:03 Using internal plugin for chef-client 2018/05/14 15:21:03 Using internal plugin for powershell 2018/05/14 15:21:03 Using internal plugin for windows-restart 2018/05/14 15:21:03 Using internal plugin for shell-local 2018/05/14 15:21:03 Using internal plugin for windows-shell 2018/05/14 15:21:03 Using internal plugin for ansible-local 2018/05/14 15:21:03 Using internal plugin for puppet-server 2018/05/14 15:21:03 Using internal plugin for shell 2018/05/14 15:21:03 Using internal plugin for puppet-masterless 2018/05/14 15:21:03 Using internal plugin for docker-push 2018/05/14 15:21:03 Using internal plugin for docker-tag 2018/05/14 15:21:03 Using internal plugin for vagrant 2018/05/14 15:21:03 Using internal plugin for vsphere-template 2018/05/14 15:21:03 Using internal plugin for amazon-import 2018/05/14 15:21:03 Using internal plugin for checksum 2018/05/14 15:21:03 Using internal plugin for shell-local 2018/05/14 15:21:03 Using internal plugin for docker-import 2018/05/14 15:21:03 Using internal plugin for docker-save 2018/05/14 15:21:03 Using internal plugin for vsphere 2018/05/14 15:21:03 Using internal plugin for compress 2018/05/14 15:21:03 Using internal plugin for googlecompute-export 2018/05/14 15:21:03 Using internal plugin for manifest 2018/05/14 15:21:03 Using internal plugin for vagrant-cloud 2018/05/14 15:21:03 Using internal plugin for alicloud-import 2018/05/14 15:21:03 Using internal plugin for artifice 2018/05/14 15:21:03 Using internal plugin for atlas 2018/05/14 15:21:03 Detected home directory from env var: /root 2018/05/14 15:21:03 Attempting to open config file: /root/.packerconfig 2018/05/14 15:21:03 [WARN] Config file doesn't exist: /root/.packerconfig 2018/05/14 15:21:03 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[file:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file null:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null amazon-instance:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance qemu:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu oracle-oci:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci vmware-iso:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso vmware-vmx:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx oneandone:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone digitalocean:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean docker:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker lxd:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd openstack:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack amazon-ebssurrogate:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate oracle-classic:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-classic amazon-ebsvolume:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume parallels-pvm:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm virtualbox-iso:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso virtualbox-ovf:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf profitbricks:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks googlecompute:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute ncloud:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud hyperv-vmcx:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx scaleway:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway alicloud-ecs:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs lxc:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxc cloudstack:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack amazon-ebs:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs amazon-chroot:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot triton:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton hyperv-iso:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso parallels-iso:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso azure-arm:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm] PostProcessors:map[docker-push:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push vsphere-template:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere-template amazon-import:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import alicloud-import:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import atlas:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-atlas docker-tag:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag docker-import:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import vsphere:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere manifest:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest vagrant-cloud:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud artifice:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice vagrant:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant googlecompute-export:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export checksum:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum shell-local:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local docker-save:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save compress:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress] Provisioners:map[salt-masterless:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless ansible-local:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local puppet-masterless:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless file:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file ansible:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible powershell:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell shell:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell chef-client:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client windows-restart:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart puppet-server:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server chef-solo:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo converge:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge shell-local:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local windows-shell:/usr/local/packer/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell]} 2018/05/14 15:21:03 Detected home directory from env var: /root 2018/05/14 15:21:03 Setting cache directory: /usr/local/packer/Ubuntu/packer_cache 2018/05/14 15:21:03 Loading builder: vmware-iso 2018/05/14 15:21:03 Plugin could not be found. Checking same directory as executable. 2018/05/14 15:21:03 Current exe path: /usr/local/packer/packer 2018/05/14 15:21:03 Creating plugin client for path: /usr/local/packer/packer 2018/05/14 15:21:03 Starting plugin: /usr/local/packer/packer []string{"/usr/local/packer/packer", "plugin", "packer-builder-vmware-iso"} 2018/05/14 15:21:03 Waiting for RPC address for: /usr/local/packer/packer 2018/05/14 15:21:03 Detected home directory from env var: /root 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [INFO] Packer version: 1.2.2 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Packer Target OS/Arch: linux amd64 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Built with Go Version: go1.10 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Detected home directory from env var: /root 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Attempting to open config file: /root/.packerconfig 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [WARN] Config file doesn't exist: /root/.packerconfig 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]} 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Detected home directory from env var: /root 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Setting cache directory: /usr/local/packer/Ubuntu/packer_cache 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 args: []string{"packer-builder-vmware-iso"} 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Plugin minimum port: 10000 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Plugin maximum port: 25000 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Plugin address: unix /tmp/packer-plugin995906354 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Waiting for connection... 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Serving a plugin connection... 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Detected home directory from env var: /root Debug mode enabled. Builds will not be parallelized. ubuntu-16044-base output will be in this color.

2018/05/14 15:21:03 ui: Debug mode enabled. Builds will not be parallelized. 2018/05/14 15:21:03 ui: ubuntu-16044-base output will be in this color. 2018/05/14 15:21:03 ui: 2018/05/14 15:21:03 Build debug mode: true 2018/05/14 15:21:03 Force build: false 2018/05/14 15:21:03 On error: 2018/05/14 15:21:03 Preparing build: ubuntu-16044-base 2018/05/14 15:21:03 Debug enabled, so waiting for build to finish: ubuntu-16044-base 2018/05/14 15:21:03 Starting build run: ubuntu-16044-base 2018/05/14 15:21:03 Running builder: vmware-iso 2018/05/14 15:21:03 [INFO] (telemetry) Starting builder vmware-iso 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [DEBUG] reconnecting to TCP connection for SSH 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [DEBUG] handshaking with SSH 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Keyboard interactive challenge: 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 -- User: 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 -- Instructions: 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 -- Question 1: Password: 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Keyboard interactive challenge: 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 -- User: 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 -- Instructions: 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [DEBUG] handshake complete! 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [INFO] no local agent socket, will not connect agent 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [DEBUG] Opening new ssh session 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [DEBUG] starting remote command: esxcli --formatter csv system version get 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 Connected to VMware ESXi 6.5.0 Releasebuild-8294253 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [DEBUG] Opening new ssh session 2018/05/14 15:21:03 packer: 2018/05/14 15:21:03 [DEBUG] starting remote command: esxcli --formatter csv system settings advanced list -o /Net/GuestIPHack Build 'ubuntu-16044-base' errored: Couldn't find VMware tools for 'linux'! VMware often downloads these tools on-demand. However, to do this, you need to create a fake VM of the proper type then click the 'install tools' option in the VMware GUI.

==> Some builds didn't complete successfully and had errors: --> ubuntu-16044-base: Couldn't find VMware tools for 'linux'! VMware often downloads these tools on-demand. However, to do this, you need to create a fake VM of the proper type then click the 'install tools' option in the VMware GUI.

==> Builds finished but no artifacts were created. 2018/05/14 15:21:04 [INFO] (telemetry) ending vmware-iso 2018/05/14 15:21:04 ui error: Build 'ubuntu-16044-base' errored: Couldn't find VMware tools for 'linux'! VMware often downloads these tools on-demand. However, to do this, you need to create a fake VM of the proper type then click the 'install tools' option in the VMware GUI. 2018/05/14 15:21:04 Waiting on builds to complete... 2018/05/14 15:21:04 Builds completed. Waiting on interrupt barrier... 2018/05/14 15:21:04 machine readable: error-count []string{"1"} 2018/05/14 15:21:04 ui error: ==> Some builds didn't complete successfully and had errors: 2018/05/14 15:21:04 machine readable: ubuntu-16044-base,error []string{"Couldn't find VMware tools for 'linux'! VMware often downloads these\ntools on-demand. However, to do this, you need to create a fake VM\nof the proper type then click the 'install tools' option in the\nVMware GUI."} 2018/05/14 15:21:04 ui error: --> ubuntu-16044-base: Couldn't find VMware tools for 'linux'! VMware often downloads these tools on-demand. However, to do this, you need to create a fake VM of the proper type then click the 'install tools' option in the VMware GUI. 2018/05/14 15:21:04 ui: ==> Builds finished but no artifacts were created. 2018/05/14 15:21:04 [INFO] (telemetry) Finalizing. 2018/05/14 15:21:05 waiting for all plugin processes to complete... 2018/05/14 15:21:05 /usr/local/packer/packer: plugin process exited

rickard-von-essen commented 6 years ago

I think this is just a missing guard and documentation. The guard should enforce "" for tools_upload_flavor when using ESXi and the documentation should make it clear that that is the only available option (which can be understood from the note in tools_upload_path). https://www.packer.io/docs/builders/vmware-iso.html#tools_upload_flavor

markdrayton247 commented 6 years ago

i'm also having similar issues. I'm specifying this for the builder:

    "tools_upload_flavor": "linux",
    "tools_upload_path": "/tmp/{.Flavor}}.iso"

and during the build I see:

==> vmware-iso: Uploading the 'linux' VMware Tools

but when running my provisioner script I am getting the error:

mount: special device /tmp/linux.iso does not exist

where is my vmware_tools iso being uploaded, if not at /tmp/linux.iso ?

rickard-von-essen commented 6 years ago

@markdrayton247 you have a syntax error in your example. Missing one curly bracket.

markdrayton247 commented 6 years ago

thanks. unfortunately it does not help, the tools just don't seem to be there:

mount: /tmp/vmware-tools-distrib.iso: failed to setup loop device: No such file or directory

SwampDragons commented 6 years ago

I think it helped some... based on the filename, this looks like it's failing in a different place than it was previously. I think if you want more help you'll need to give us more of your config.

arizvisa commented 6 years ago

FTR: to troubleshoot this issue, all developers will need 2 things (and 1 more thing if you're using vmware).

1) the json template you're using (this is most important as it's the input to the program) 2) the log file from PACKER_LOG=1 (this is the output of the program) 3) if you're using vmware: the .vmx that's emitted. you can grab the path of this out of the log file that's produced from requirement 2.

nobody has posted requirement 1. so anybody in the community that wants to help is forced to take random guesses which result in this issue being forever unresolved.

rickard-von-essen commented 6 years ago

@arizvisa see my comment above for at least one small bug with ESXi.

SwampDragons commented 6 years ago

It's been a month since we requested more information; I'm going to close for now, and if we get the information we need to debug this, we can reopen.

cs-niraj-nandane commented 5 years ago

You can manually copy the linux.iso (Download the VMware tools and you will get the linux.iso) in for fusion at : /Applications/VMware Fusion.app/Contents/Library/isoimages for vmplayer at : /usr/lib/vmware/isoimages/

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.