VirtualBox Ubuntu扩展磁盘空间

1.If you work os is windows you need to Set your VirtualBox install path to PATH envirment viriable.
2.Poweroff your virtual machine will to extend the disk.
3.Find your original machine *.vdi,execute “VBoxManage modifymedium “E:\virtual-box\cross_build_server\cross_build_server.vdi” --resize 81920”.
4.heyongxin@heyongxin-VirtualBox:~$ sudo apt-get install gparted
5.enter UI interface and login system and find gparted app do the follow steps and apply all modify.

  1. close and delete swapoff
  2. delete extend2 area.
  3. resize the used space and applay all modify.
  4. gpart apply all modify like below:
    VirtualBox Ubuntu扩展磁盘空间_第1张图片
    extend before:
heyongxin@heyongxin-VirtualBox:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            475M     0  475M   0% /dev
tmpfs           100M  4.9M   95M   5% /run
/dev/sda1        19G   16G  2.3G  88% /
tmpfs           496M  216K  496M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           496M     0  496M   0% /sys/fs/cgroup
tmpfs           100M   60K  100M   1% /run/user/1000

extend after

Filesystem      Size  Used Avail Use% Mounted on
udev            475M     0  475M   0% /dev
tmpfs           100M  4.9M   95M   5% /run
/dev/sda1        79G   16G   60G  21% /
tmpfs           496M  216K  496M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           496M     0  496M   0% /sys/fs/cgroup
tmpfs           100M   60K  100M   1% /run/user/1000

你可能感兴趣的:(VirtualBox Ubuntu扩展磁盘空间)