vsphere post-process reports Insufficient disk space, yet datastore has plenty of disk space

231 views
Skip to first unread message

b...@tanners.org

unread,
Jan 25, 2018, 4:09:55 PM1/25/18
to Packer
During development things worked great. Turned on Window Updates, which expanded the image by about 2GB and now the vsphere post-process is throwing this error:


==> vmware-iso: Running post-processor: vsphere
    vmware-iso (vsphere): Uploading output-vmware-iso/WindowsServer2016.vmx to vSphere
Build 'vmware-iso' errored: 1 error(s) occurred:

* Post-processor failed: Failed: exit status 1
Opening VMX source: output-vmware-iso/WindowsServer2016.vmx
Error:
 - Insufficient disk space on datastore 'esx-3-local'.
Completed with errors

Host > Datastores shows esx-3-local; capacity 271.75 GB, free 270.8 GB, there's plenty of room.

Keeping artifacts the output of the build is

output-vmware-iso$ du -sh .
 15G .

So even uncompressed the image should fit on esx-3-local

The packer build host

Filesystem      Size   Used  Avail Capacity
/dev/disk0s2   465Gi  120Gi  344Gi    26%

Any ideas on how to troubleshoot this problem?

Alvaro Miranda Aguilera

unread,
Jan 25, 2018, 4:59:07 PM1/25/18
to packe...@googlegroups.com
whats the size of the guest disk ?

i am not sure if the upload will create thin or fat disk



On Thu, Jan 25, 2018 at 10:09 PM, <b...@tanners.org> wrote:
During development things worked great. Turned on Window Updates, which expanded the image by about 2GB and now the vsphere post-process is throwing this error:


==> vmware-iso: Running post-processor: vsphere
    vmware-iso (vsphere): Uploading output-vmware-iso/WindowsServer2016.vmx to vSphere
Build 'vmware-iso' errored: 1 error(s) occurred:

* Post-processor failed: Failed: exit status 1
Opening VMX source: output-vmware-iso/WindowsServer2016.vmx
Error:
 - Insufficient disk space on datastore 'esx-3-local'.
Completed with errors

Host > Datastores shows esx-3-local; capacity 271.75 GB, free 270.8 GB, there's plenty of room.

Keeping artifacts the output of the build is

output-vmware-iso$ du -sh .
 15G .

So even uncompressed the image should fit on esx-3-local

The packer build host

Filesystem      Size   Used  Avail Capacity
/dev/disk0s2   465Gi  120Gi  344Gi    26%

Any ideas on how to troubleshoot this problem?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/d660a085-6061-49f0-a6ee-4ad207ad5646%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

b...@tanners.org

unread,
Jan 25, 2018, 8:23:13 PM1/25/18
to Packer
whats the size of the guest disk ?

i am not sure if the upload will create thin or fat disk


768GB and good call, guess it's -not- thin, looking for how to tell packer to make the disk thin. 

b...@tanners.org

unread,
Jan 25, 2018, 8:30:08 PM1/25/18
to Packer
https://github.com/hashicorp/packer/issues/346

-t [0|1|2|3|4|5] Specifies the virtual disk type. This option is required when you create or convert
a virtual disk. Choose one of the following types:
0 – create a growable virtual disk contained in a single file (monolithic sparse).
1 – create a growable virtual disk split into 2GB files (split sparse).
2 – create a preallocated virtual disk contained in a single file (monolithic flat).
3 – create a preallocated virtual disk split into 2GB files (split flat).
4 – create a preallocated virtual disk compatible with ESX server (VMFS flat).
5 – create a compressed disk optimized for streaming

Gabo Kete

unread,
Jan 26, 2018, 5:33:16 PM1/26/18
to Packer
If you use ESXi 6.x, I used the following

  "disk_type_id":"thin",

So better check the documentation based on the ESXi version you are running on

Gabo Kete

unread,
Jan 26, 2018, 5:51:55 PM1/26/18
to Packer

I did a bit of digging and The Disk_type_Id value uses the numbers Only if you are using Desktop VmWare Clients, I used ESXi and the values are different; In the link below you can find the different Options


https://kb.vmware.com/s/article/1022242

b...@tanners.org

unread,
Jan 27, 2018, 12:26:38 PM1/27/18
to Packer
I'm using ESXi 6.5 and using "thin" throws an error.

==> vmware-iso: Creating virtual machine disk
==> vmware-iso: Error creating disk: VMware error: Invalid disk type 'thin'.
==> vmware-iso: Deleting output directory...
Build 'vmware-iso' errored: Error creating disk: VMware error: Invalid disk type 'thin'.

==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Error creating disk: VMware error: Invalid disk type 'thin'.

I used -var 'disk_type_id=1' and that worked for me
Reply all
Reply to author
Forward
0 new messages