Packer: [vmware] Unable to cleanup

Created on 9 Feb 2016  ·  12Comments  ·  Source: hashicorp/packer

try with packer 0.9 snapshot, at the end Packer fails the following message

2016/02/08 17:08:19 packer: 2016/02/08 17:08:19 starting remote command: vim-cmd vmsvc/unregister 47
2016/02/08 17:08:19 packer: 2016/02/08 17:08:19 remote command exited with '0': vim-cmd vmsvc/unregister 47
2016/02/08 17:08:19 ui error: Build 'vmware-iso' errored: lstat myvm-name: no such file or directory

Looks like packer needs to use the full path /vmfs/volumes/storage-folder/myvm-name

bug buildevmware-esxi

Most helpful comment

Please close this issue. I don’t see this issue any more

All 12 comments

Thanks for the report!

@cbednarski please you advice which part of the code I need to look for? I would like to get this fixed by providing PR

@dantran I would start with reviewing the code from step_shutdown and all following steps, and the clean of the step_run. Try to build a hypothesis of what's causing this.

Another hint can be to use the current master which includes timestamps in the debug logging (PACKER_LOG=1 packer build ...) and find if there is some timing difference between a run where the VM is properly cleaned up and one where it is not.

Is this related to #3050 .. Does applying the changes to when to stat the local filesystem cause this error to disappear? Are you using format: "ova" in your template?

I dont set any format in my template. my packer build just build VM image from ISO file

Does it not error out if you provide a format? Just trying to work out if the PR I linked above is the bug you are tripping over.

Yes, it looks very close to the error I am seeing, let me try your provided fix at my 0.9 local build

@dave2 I applied your change locally, but the build fails due to test failure

Ah, sadly that's not my PR. I will look at reworking it for current tree in the next few days.

Is this still an issue? We've made a _lot_ of changes to the vmware builder since v 0.9.

Please close this issue. I don’t see this issue any more

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.

Was this page helpful?
0 / 5 - 0 ratings