3

I'm trying to expand more space for my virtual server (Homestead) using Parallels provider on Macbook.

The default disk size is 18GB

vagrant@homestead:~$ df -h
Filesystem                               Size  Used Avail Use% Mounted on
udev                                     964M     0  964M   0% /dev
tmpfs                                    199M  7.7M  192M   4% /run
/dev/mapper/homestead--vg-root            18G   11G  5.9G  65% /
tmpfs                                    994M  8.0K  994M   1% /dev/shm
tmpfs                                    5.0M     0  5.0M   0% /run/lock
tmpfs                                    994M     0  994M   0% /sys/fs/cgroup
/dev/mapper/homestead--vg-mysql--master  9.8G  234M  9.1G   3% /homestead-vg/master
10.211.55.2:/Users/orange/code           234G  234G  165G  59% /home/vagrant/code
vagrant                                  234G   69G  165G  30% /vagrant
tmpfs                                    199M     0  199M   0% /run/user/1000

I don't know why the default space of VM is 64G but actually Homestead server is just 18GB

☁  homestead-7.pvm  prl_disk_tool resize --info --units G --hdd harddisk1.hdd
Operation progress 100 %
Disk information:
    SectorSize:                             512
    Size:                                    64G
    Minimum:                                 64G
    Minimum without resizing the last partition:                 64G
    Maximum:                               2047G

    Warning! The last partition cannot be resized because its file system is either not supported or damaged.
    Make sure that the virtual HDD is not used by another process.
    Warning! The disk image you specified has snapshots.
    You need to delete all snapshots using the prlctl command line utility before resizing the disk.

I've so many searched but it still not solve.

How can I solve it? (Sorry my bad English)

  • Did you find a solution, because I'm having the exact same problem – Ebski May 09 '19 at 07:51
  • 1
    not yet, but follow this https://askubuntu.com/questions/986609/resizing-partition-from-new-hard-drive/986615#986615?newreg=70ddd1dd999f43f585dd518157e0f6a0 and increase from 18GB to 23GB (use all free space left). Cannot resize parallels disk size – Hoàng Nguyễn May 10 '19 at 08:35
  • Thank you. At least it's something even though I think I will need more space than the extra 5gb – Ebski May 10 '19 at 09:21
  • ok, if you found the solution, please tell me, thanks – Hoàng Nguyễn May 12 '19 at 13:37
  • I managed by following this guide and some help from a dev ops friend of mine: https://laracasts.com/discuss/channels/guides/a-guide-to-extending-homestead-storage-capacity. Just note that you have to change the type of the virtual box disk to .vdi instead to increase the size and then change it back to .vmdk before attaching it to your virtual box. I can't really help you with partitioning it as that was where I was stuck myself and my friend did that – Ebski May 14 '19 at 13:28
  • I found that topic, virtualbox is easier than parallels, I think so. Before I always use virtualbox. but this time.... hahaa – Hoàng Nguyễn May 15 '19 at 06:47

1 Answers1

5

Based on the discussion in the reported issue on GitHub the following command will help:

lvextend -r -l +100%FREE /dev/mapper/homestead--vg-root

There's a commit that should handle the issue, but it wasn't released yet within tagged Vagrant version.

The reason for this whole dance is that Vagrant packages the VirtualBox disk as .vmdk which doesn't have the same resizability options as .vdi does.

rootpd
  • 317
  • 3
  • 9