Laravel Homestead使用Parallels和Vagrant无法扩展更多磁盘空间

3

我正在尝试使用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.

我已经搜索了很多次,但还是没有解决。

我该怎么办呢? (抱歉我的英语不好)


你找到解决方案了吗?因为我也遇到了完全相同的问题。 - Ebski
1
现在还没有,但请按照以下链接操作:https://askubuntu.com/questions/986609/resizing-partition-from-new-hard-drive/986615#986615?newreg=70ddd1dd999f43f585dd518157e0f6a0 ,将硬盘分区从18GB增加到23GB(使用剩余的所有可用空间)。不过,无法调整Parallels虚拟磁盘大小。 - Hoàng Nguyễn
谢谢。虽然我认为我需要比额外的5GB更多的空间,但至少有了一些东西。 - Ebski
好的,如果你找到了解决方案,请告诉我,谢谢。 - Hoàng Nguyễn
我是通过遵循这个指南并得到我的一位 DevOps 朋友的帮助来完成的:https://laracasts.com/discuss/channels/guides/a-guide-to-extending-homestead-storage-capacity。只需注意,您必须将虚拟盒子磁盘的类型更改为 .vdi,然后再将其更改回 .vmdk,然后再将其附加到您的虚拟盒子中以增加大小。我无法真正帮助您进行分区,因为那就是我自己卡住的地方,而我的朋友则处理了这个问题。 - Ebski
我发现在虚拟机方面,VirtualBox比Parallels更容易使用,我是这么认为的。之前我一直使用VirtualBox,但这次……哈哈 - Hoàng Nguyễn
1个回答

5

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接