document ESXi disk compaction & use verbose option

This commit is contained in:
Jeffrey Martin 2018-06-25 13:22:00 -05:00
parent 09c71f3810
commit b51cd22b21
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
2 changed files with 8 additions and 6 deletions

View File

@ -47,7 +47,7 @@ func (d *ESX5Driver) Clone(dst, src string, linked bool) error {
func (d *ESX5Driver) CompactDisk(diskPathLocal string) error { func (d *ESX5Driver) CompactDisk(diskPathLocal string) error {
diskPath := d.datastorePath(diskPathLocal) 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 { func (d *ESX5Driver) CreateDisk(diskPathLocal string, size string, adapter_type string, typeId string) error {

View File

@ -147,7 +147,8 @@ builder.
For ESXi, this defaults to `zeroedthick`. The available options for ESXi For ESXi, this defaults to `zeroedthick`. The available options for ESXi
are: `zeroedthick`, `eagerzeroedthick`, `thin`, `rdm:dev`, `rdmp:dev`, 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 For more information, please consult the [Virtual Disk Manager User's
Guide](https://www.vmware.com/pdf/VirtualDiskManager.pdf) for desktop Guide](https://www.vmware.com/pdf/VirtualDiskManager.pdf) for desktop
@ -326,10 +327,11 @@ builder.
`5m` or five minutes. `5m` or five minutes.
- `skip_compaction` (boolean) - VMware-created disks are defragmented and - `skip_compaction` (boolean) - VMware-created disks are defragmented and
compacted at the end of the build process using `vmware-vdiskmanager`. In compacted at the end of the build process using `vmware-vdiskmanager` or
certain rare cases, this might actually end up making the resulting disks `vmkfstools` in ESXi. In certain rare cases, this might actually end up
slightly larger. If you find this to be the case, you can disable compaction making the resulting disks slightly larger. If you find this to be the case,
using this configuration value. Defaults to `false`. you can disable compaction using this configuration value. Defaults to
`false`.
- `skip_export` (boolean) - Defaults to `false`. When enabled, Packer will - `skip_export` (boolean) - Defaults to `false`. When enabled, Packer will
not export the VM. Useful if the build output is not the resultant not export the VM. Useful if the build output is not the resultant