Parallels / vagrant-parallels

Vagrant Parallels Provider
https://parallels.github.io/vagrant-parallels
MIT License
996 stars 87 forks source link

Different disk size in Vagrant vs Parallels #417

Closed gadelkareem closed 2 years ago

gadelkareem commented 2 years ago

The box is Ubuntu 20 running on mac m1.

The mounted disk is different in vagrant than parallel or the original box.

Inside Vagrant I see:

> df -h
Filesystem                                                     Size  Used Avail Use% Mounted on
udev                                                           3.9G     0  3.9G   0% /dev
tmpfs                                                          794M 1000K  793M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv                               48G   13G   33G  29% /
tmpfs                                                          3.9G   16K  3.9G   1% /dev/shm
tmpfs                                                          5.0M     0  5.0M   0% /run/lock
tmpfs                                                          3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda2                                                      976M  110M  800M  12% /boot
/dev/loop0                                                      49M   49M     0 100% /snap/core18/2127
/dev/sda1                                                      511M  3.6M  508M   1% /boot/efi
/dev/loop1                                                      29M   29M     0 100% /snap/snapd/12707
/dev/loop2                                                      62M   62M     0 100% /snap/lxd/21032
> cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/ubuntu-vg/ubuntu-lv during curtin installation
/dev/disk/by-id/dm-uuid-LVM-yl2KaM6n4J0neFL6dXNPXeaaX4Mcin7GD20r1leWwQBb0qQE1Zthd9SHJ9pZ4OnG / ext4 defaults 0 1
# /boot was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/dcf4166f-a4d4-47f8-b918-1ba8d49f5320 /boot ext4 defaults 0 1
# /boot/efi was on /dev/sda1 during curtin installation
/dev/disk/by-uuid/CED6-3B79 /boot/efi vfat defaults 0 1
/swap.img   none    swap    sw  0   0
/swapfile   none    swap    sw    0   0
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
#VAGRANT-END

While Parallels shows the correct disk size:

Screenshot 2022-02-24 at 04 47 25

Edit: I built a new box with a 200GB disk and Vagrant now shows it as 95GB so it seems that Vagrant report half the actual size of the disk.

rcousens commented 2 years ago

It's the auto-install for ubuntu 20.04 that sets the default PV extents to half the available space. See: https://askubuntu.com/questions/1244293/how-to-autoinstall-config-fill-disk-option-on-ubuntu-20-04-automated-server-in

gadelkareem commented 2 years ago

Got it, thanks!