how to change the size of disk with Packer chroot builder?

17 views
Skip to first unread message

Rodrigue Chakode

unread,
Jan 19, 2020, 4:15:19 AM1/19/20
to Packer
Hello,
Is it possible to change the default size of the device setup by Packer to build an image using chroot?
Indeed, it seems that the size is fixed to 2Gb and in my case the provisionning script installs tools that make the disk full (causing the failing of the build).

==> azure-chroot: No apport report written because the error message indicates a disk full error



Here is an extract of df -h

/dev/sdd1       2.0G  1.7G  320M  84% /mnt/packer-azure-chroot-disks/sdd

Thanks,

Rodrigue

Rickard von Essen

unread,
Jan 19, 2020, 4:59:41 AM1/19/20
to packe...@googlegroups.com
I have never used Azure but maybe this is the option you are looking for?


--
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/8ed1bd67-8840-45f1-92b4-df3966d8c647%40googlegroups.com.

Rodrigue Chakode

unread,
Jan 19, 2020, 5:26:49 AM1/19/20
to packe...@googlegroups.com
Hi Richard,
Thanks for your help.

I tried that option (os_disk_size_gb), which shall be used with the option 'from_scratch' (I failed to understand values to provide for 'pre_mount_commands', also required in that case) :(

For amazon-chroot builder, there is an option ('root_volume_size' [1]) which seems close to what I'm expecting,  but it's not supported by azure-chroot builder


Rodrigue


Rodrigue Chakode

unread,
Jan 19, 2020, 9:13:26 AM1/19/20
to packe...@googlegroups.com
By the way, I gave up and switched towards azure-arm builder - - even if it's a a bit slower than azure-chroot. 
Reply all
Reply to author
Forward
0 new messages