1. Install the graphical interface tool gparted
sudo apt-get install gparted
2. Shutdown
Edit virtual machine settings --------> select "HDD (SCSI)" --------------> select "Extended" button
3. boot, start gparted
sudo gparted
If there is shown in FIG, sda1, sda2, sda5 are locked, i.e., have the following key icon, then right click sda5, lift select Swap off, then right click and select the Delete; Similarly, sda2 same operation
Finally become as shown below
4. Adjust the / dev / sda1 partition
Right-click the / dev / sda1, select Resize / Move, select 95% of the total amount of space
5. reconstruction swap partition
6. Modify / etc / fstab
See UUID sudo blkid swap, replacing this with a number UUID / etc / fstab swap partition number in