I installed Ubuntu with VMware and chose 20 GB space during installation. During usage, I found that 20 GB space is far from enough. The best way is to reinstall it, however, since the Android source code already exists, it is more troublesome to download it again, so I decided to resize the virtual machine.
1. Change the Virtual Disk size
First, shut down the ubuntu of the VM, and then use vmware's hard disk adjustment tool vmware-vdiskmanager.exe to change the size of the virtual disk. This tool is under the installation directory of vmware.
In the dos environment, enter the following command:
Vmware-vdiskmanager-x 80 Gb "E: \ androidVirtualMachines \ myandroid \ Ubuntu2.vmdk"
The-x parameter increases the storage space for the virtual machine, and the number following it indicates the size of the storage space.
The quotation marks should be in the installation directory of the virtual machine. The file type is vmdk.
2. view disk usage
Restart the VM. At the ubuntu prompt, enter the df command to view the disk usage and the location where the file system is mounted.
$ Df-h
File System capacity used available % mount point
// Dev/sda1 19G 3.6G 15G 20%/
None 1.5G 252 K 1.5G 1%/dev
None 1.5G 252 K 1.5G 1%/dev/shm
None, 1.5G, 88 K, 1.5G, 1%/var/run
None 1.5G 0 1.5G 0%/var/lock
None 1.5G 0 1.5G 0%/lib/init/rw
3. view the disk device name
$ Sudo fdisk-l
Disk/dev/sda: 25.9 GB, 25899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x0001be23
Device Boot Start End Blocks Id System
/Dev/sda1*1 2497 20051968 83 Linux
/Dev/sda2 2497 2611 916481 5 Extended
/Dev/sda5 2497 2611 916480 82 Linux swap/Solaris
Hard Disk device name:/dev/sda, size: 26 GB divided into three Ubuntu Hard Disk Partitions