From b51cd22b216c9ea05ce76e69a4aceb472d09d3db Mon Sep 17 00:00:00 2001 From: Jeffrey Martin Date: Mon, 25 Jun 2018 13:22:00 -0500 Subject: [PATCH] document ESXi disk compaction & use verbose option --- builder/vmware/iso/driver_esx5.go | 2 +- website/source/docs/builders/vmware-iso.html.md.erb | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/builder/vmware/iso/driver_esx5.go b/builder/vmware/iso/driver_esx5.go index 379f82092..2843ff41e 100644 --- a/builder/vmware/iso/driver_esx5.go +++ b/builder/vmware/iso/driver_esx5.go @@ -47,7 +47,7 @@ func (d *ESX5Driver) Clone(dst, src string, linked bool) error { func (d *ESX5Driver) CompactDisk(diskPathLocal string) error { diskPath := d.datastorePath(diskPathLocal) - return d.sh("vmkfstools", "-K", diskPath) + return d.sh("vmkfstools", "--punchzero", diskPath) } func (d *ESX5Driver) CreateDisk(diskPathLocal string, size string, adapter_type string, typeId string) error { diff --git a/website/source/docs/builders/vmware-iso.html.md.erb b/website/source/docs/builders/vmware-iso.html.md.erb index 2dcbd36cf..39bb42d28 100644 --- a/website/source/docs/builders/vmware-iso.html.md.erb +++ b/website/source/docs/builders/vmware-iso.html.md.erb @@ -147,7 +147,8 @@ builder. For ESXi, this defaults to `zeroedthick`. The available options for ESXi are: `zeroedthick`, `eagerzeroedthick`, `thin`, `rdm:dev`, `rdmp:dev`, - `2gbsparse`. + `2gbsparse`. Due to default disk compaction processing, when using `thick` + set `skip_compaction` to `true`. For more information, please consult the [Virtual Disk Manager User's Guide](https://www.vmware.com/pdf/VirtualDiskManager.pdf) for desktop @@ -326,10 +327,11 @@ builder. `5m` or five minutes. - `skip_compaction` (boolean) - VMware-created disks are defragmented and - compacted at the end of the build process using `vmware-vdiskmanager`. In - certain rare cases, this might actually end up making the resulting disks - slightly larger. If you find this to be the case, you can disable compaction - using this configuration value. Defaults to `false`. + compacted at the end of the build process using `vmware-vdiskmanager` or + `vmkfstools` in ESXi. In certain rare cases, this might actually end up + making the resulting disks slightly larger. If you find this to be the case, + you can disable compaction using this configuration value. Defaults to + `false`. - `skip_export` (boolean) - Defaults to `false`. When enabled, Packer will not export the VM. Useful if the build output is not the resultant