VMWare-iso provisioner - disk thin provisioning

153 views
Skip to first unread message

Pearl D'Silva

unread,
Aug 29, 2019, 5:33:02 AM8/29/19
to Packer
I am trying to enable thin provisioning for the disk by using the following: "disk_type_id": "thin", However, on vCenter, when the VM is being provisioned, I notice that the hard disk type is set to "Thick Provision Eager Zeroed". Any pointers on what could be causing this issue would be really helpful.

The partitioning recipe in the preseed file is as follows:
d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \
              1 1 1 free method{ biosgrub } .                 \
              250 250 250 ext2                                \
                      $primary{ } $bootable{ }                \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext2 }    \
                      mountpoint{ /boot }                     \
              .                                               \
              500 180000 180000 ext4                       \
                      lv_name{ root }                         \
                      method{ lvm } format{ }                 \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ / }                         \
                      $lvmok{ }                               \
              .                                               \
              500 500000 500000 xfs                            \
                      lv_name{ data }                         \
                      method{ lvm } format{ }                 \
                      use_filesystem{ } filesystem{ xfs }     \
                      mountpoint{ /data }                     \
                      $lvmok{ }                               \
              .
  

Rickard von Essen

unread,
Aug 29, 2019, 6:44:38 AM8/29/19
to packe...@googlegroups.com

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/0f5b9b82-4cba-4e8c-81c9-5bfa2e803119%40googlegroups.com.

Pearl Dsilva

unread,
Aug 29, 2019, 6:48:50 AM8/29/19
to packe...@googlegroups.com
Yes I did, setting disk_type_id to the numeric values causes the packer build to fail. However, setting it to "thin" lead to the build to proceed, however the disk is thick provisioned eager zeroed

Rickard von Essen

unread,
Aug 29, 2019, 6:59:02 AM8/29/19
to packe...@googlegroups.com
Post your template and a debug output from running Packer with PACKER_LOG=1.

Message has been deleted

Pearl D'Silva

unread,
Aug 29, 2019, 11:15:44 PM8/29/19
to Packer
Setting the "disk_type_id" to "5" leads the the following error:

packer_error.PNG


Following is the snippet of my packer configuration:

 "builders": [
    {
      "type": "vmware-iso",
      "format": "ovf",
  "skip_export": true,
      "iso_url": "{{user `url`}}",
      "iso_checksum": "{{user `checksum`}}",
      "iso_checksum_type": "sha256",
      "ssh_username": "{{user `ssh_username`}}",
      "ssh_password": "{{user `ssh_password`}}",
      "ssh_wait_timeout": "30m",
  "cpus": "4",
  "memory": "32000",
      "disk_size": "680000",
  "disk_type_id": "5",
      "headless": false,
 . . .
 . . .
} ],


    Any pointers as to where I am going wrong? 


On Thursday, August 29, 2019 at 4:29:02 PM UTC+5:30, Rickard von Essen wrote:
Post your template and a debug output from running Packer with PACKER_LOG=1.

On Thu, Aug 29, 2019, 12:48 Pearl Dsilva <pearl...@rubrik.com> wrote:
Yes I did, setting disk_type_id to the numeric values causes the packer build to fail. However, setting it to "thin" lead to the build to proceed, however the disk is thick provisioned eager zeroed

To unsubscribe from this group and stop receiving emails from it, send an email to packe...@googlegroups.com.

--
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 packe...@googlegroups.com.

--
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 packe...@googlegroups.com.

Rickard von Essen

unread,
Aug 30, 2019, 12:39:24 AM8/30/19
to packe...@googlegroups.com
I'm a bit confused here, do you use the vmware-iso builder on a remote host (ESXi)? 

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/4e4452dc-967a-4492-b866-581aae2fac41%40googlegroups.com.

Pearl D'Silva

unread,
Aug 30, 2019, 1:00:05 AM8/30/19
to Packer
Yes, I have used vmware-iso builder on a remote host.

Rickard von Essen

unread,
Aug 30, 2019, 1:10:11 AM8/30/19
to packe...@googlegroups.com
You are supposed to use the strings and not the numbers. See https://packer.io/docs/builders/vmware-iso.html#disk_type_id

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/3025da74-dfb7-4e5d-9dbc-99c91878d038%40googlegroups.com.

Pearl Dsilva

unread,
Aug 30, 2019, 1:39:03 AM8/30/19
to packe...@googlegroups.com
I am giving the disk_type_id as a string, but still am facing the issue.

Rickard von Essen

unread,
Aug 30, 2019, 2:20:28 AM8/30/19
to packe...@googlegroups.com
Provide your complete template, all scripts etc and the full output of a build with PACKER_LOG=1 set. Also what the output of whatever command you run to inspect the result and what exact version of ESXi you are using. 

Pearl D'Silva

unread,
Aug 30, 2019, 3:06:47 AM8/30/19
to Packer



Please find attached the scripts, template, preseed and packer logs for both the failing scenarios:
1. When disk_type_id is set to "4" // or any valid type id
2. When disk_type_id is set to "thin" (Following the given link: https://github.com/hashicorp/packer/issues/674)

disk_provisioning.PNG



As seen in the above image, despite setting disk_type_id to "thin" , I see the disk provisioning type to be "Thick Provision Eager Zero" on vcenter.

disk_provisioning.PNGdisk_provisioning.PNG

packer_with_disk_type_id_number.zip
packer_with_thin_option.zip

Pearl D'Silva

unread,
Aug 30, 2019, 5:55:12 AM8/30/19
to Packer
Hi,

The issue was not wrt to the configuration, but the backend storage type being used. Thanks a lot for the support.


On Friday, August 30, 2019 at 11:50:28 AM UTC+5:30, Rickard von Essen wrote:
Provide your complete template, all scripts etc and the full output of a build with PACKER_LOG=1 set. Also what the output of whatever command you run to inspect the result and what exact version of ESXi you are using. 

On Fri, Aug 30, 2019, 07:39 Pearl Dsilva <pearl...@rubrik.com> wrote:
I am giving the disk_type_id as a string, but still am facing the issue.

--
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 packe...@googlegroups.com.

--
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 packe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages