使用 Parallels 和 Vagrant 的 Laravel Homestead 无法扩展更多的磁盘大小



我正在尝试使用Macbook上的Parallels提供程序为我的虚拟服务器(Homestead(扩展更多空间。

默认磁盘大小为 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

我不知道为什么虚拟机的默认空间是64G,但实际上Homestead服务器只有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.

我已经搜索了很多,但仍然没有解决。

我该如何解决?(对不起,我的英语不好(

根据 GitHub 上报告的问题中的讨论,以下命令将有所帮助:

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

有一个提交应该可以处理这个问题,但它尚未在标记的 Vagrant 版本中发布。

这整个舞蹈的原因是Vagrant将VirtualBox磁盘打包为.vmdk,它没有与.vdi相同的可调整大小选项。

最新更新