https://github.com/hashicorp/packer/pull/7221


On Thursday, November 5, 2020 at 8:56:12 PM UTC-6 dragon788 wrote:

> I believe someone had worked on a `vagrant-repack` type builder that let 
> you take an existing box and build on top of it. I'll see if I can find 
> where that has gotten to.
>
>
> On Friday, October 30, 2020 at 5:08:49 AM UTC-5 Sergio Alonso wrote:
>
>>
>> Hi,
>>
>> Is there any way to increase the disk size using vagrant builder?
>>
>> Sometimes the disk space is not enough to do whatever you want in the 
>> provision.
>>
>> For example: debian/buster64 is setting 20G while debian/jessie64 is 
>> setting only 10G.
>>
>> How could I get 20G also using the debian/jessie64 box?
>>
>> {
>>     "builders": [{
>>     "communicator": "ssh",
>>     "source_path": "debian/buster64",
>>     "type": "vagrant"
>>     }],
>>     "description": "Test  disk size",
>>     "min_packer_version": "1.6.5",
>>     "provisioners": [{
>>     "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash 
>> '{{.Path}}'",
>>     "inline": ["lsblk", "df -h"],
>>     "type": "shell"
>>     }]
>> }
>>
>> ==> vagrant: Creating a Vagrantfile in the build directory...
>> ==> vagrant: Adding box using vagrant box add ...
>>     vagrant: (this can take some time if we need to download the box)
>> ==> vagrant: Calling Vagrant Up (this can take some time)...
>> ==> vagrant: Using ssh communicator to connect: 192.168.121.73
>> ==> vagrant: Waiting for SSH to become available...
>> ==> vagrant: Connected to SSH!
>> ==> vagrant: Provisioning with shell script: /tmp/packer-shell476965872
>>     vagrant: NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
>> *    vagrant: vda    254:0    0   20G  0 disk*
>>     vagrant: `-vda1 254:1    0 18.6G  0 part /
>>     vagrant: Filesystem      Size  Used Avail Use% Mounted on
>>     vagrant: udev            228M     0  228M   0% /dev
>>     vagrant: tmpfs            49M  1.6M   47M   4% /run
>>     vagrant: /dev/vda1        19G  864M   17G   5% /
>>     vagrant: tmpfs           242M     0  242M   0% /dev/shm
>>     vagrant: tmpfs           5.0M     0  5.0M   0% /run/lock
>>     vagrant: tmpfs           242M     0  242M   0% /sys/fs/cgroup
>>     vagrant: tmpfs            49M     0   49M   0% /run/user/1000
>> ==> vagrant: Packaging box...
>> ==> vagrant: destroying Vagrant box...
>> Build 'vagrant' finished after 1 minute 12 seconds.
>>
>> {
>>     "builders": [{
>>     "communicator": "ssh",
>>     "source_path": "debian/jessie64",
>>     "type": "vagrant"
>>     }],
>>     "description": "Test  disk size",
>>     "min_packer_version": "1.6.5",
>>     "provisioners": [{
>>     "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash 
>> '{{.Path}}'",
>>     "inline": ["lsblk", "df -h"],
>>     "type": "shell"
>>     }]
>> }
>>
>> ==> vagrant: Deleting previous output directory...
>> ==> vagrant: Creating a Vagrantfile in the build directory...
>> ==> vagrant: Adding box using vagrant box add ...
>>     vagrant: (this can take some time if we need to download the box)
>> ==> vagrant: Calling Vagrant Up (this can take some time)...
>> ==> vagrant: Using ssh communicator to connect: 192.168.121.20
>> ==> vagrant: Waiting for SSH to become available...
>> ==> vagrant: Connected to SSH!
>> ==> vagrant: Provisioning with shell script: /tmp/packer-shell536004430
>>     vagrant: NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
>> *    vagrant: vda    254:0    0   10G  0 disk*
>>     vagrant: `-vda1 254:1    0  9.3G  0 part /
>>     vagrant: Filesystem      Size  Used Avail Use% Mounted on
>>     vagrant: /dev/vda1       9.2G  732M  8.0G   9% /
>>     vagrant: udev             10M     0   10M   0% /dev
>>     vagrant: tmpfs            99M  4.3M   95M   5% /run
>>     vagrant: tmpfs           248M     0  248M   0% /dev/shm
>>     vagrant: tmpfs           5.0M     0  5.0M   0% /run/lock
>>     vagrant: tmpfs           248M     0  248M   0% /sys/fs/cgroup
>> ==> vagrant: Packaging box...
>> ==> vagrant: destroying Vagrant box...
>> Build 'vagrant' finished after 1 minute 64 milliseconds.
>>
>> Thanks.
>>
>

-- 
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/hashicorp/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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/1e48807a-4790-41db-ba61-90f7fa89b8d4n%40googlegroups.com.

Reply via email to