Deny the copying of .vmxf from the source VM to the target VM. If this file gets copied over to the new VM once the VM gets deleted the .vmxf and the folder for the VM stay on the datastore. This causes Packer to hang because the folder on the datastore does not go away during the cleanup process.

This commit is contained in:
Eric Mowry 2019-02-28 16:47:46 -05:00
parent 1127096beb
commit e74a81e27b
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ func (d *ESX5Driver) Clone(dst, src string, linked bool) error {
return fmt.Errorf("Failed to copy the vmx file %s: %s", srcVmx, err)
}
filesToClone, err := d.run(nil, "find", strconv.Quote(srcDir), "! -name '*.vmdk' ! -name '*.vmx' -type f ! -size 0")
filesToClone, err := d.run(nil, "find", strconv.Quote(srcDir), "! -name '*.vmdk' ! -name '*.vmx' ! -name '*.vmxf' -type f ! -size 0")
if err != nil {
return fmt.Errorf("Failed to get the file list to copy: %s", err)
}