From 09c71f3810042cc4c8510a7a360b90985dbf44b0 Mon Sep 17 00:00:00 2001 From: Jeffrey Martin Date: Fri, 22 Jun 2018 12:27:17 -0500 Subject: [PATCH] add support for disk compaction to esx5 builder --- builder/vmware/iso/driver_esx5.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/vmware/iso/driver_esx5.go b/builder/vmware/iso/driver_esx5.go index 998e70550..379f82092 100644 --- a/builder/vmware/iso/driver_esx5.go +++ b/builder/vmware/iso/driver_esx5.go @@ -46,7 +46,8 @@ func (d *ESX5Driver) Clone(dst, src string, linked bool) error { } func (d *ESX5Driver) CompactDisk(diskPathLocal string) error { - return nil + diskPath := d.datastorePath(diskPathLocal) + return d.sh("vmkfstools", "-K", diskPath) } func (d *ESX5Driver) CreateDisk(diskPathLocal string, size string, adapter_type string, typeId string) error {