It should be possible to resize you VMware disks
, instead of adding an extra one, with the installed tools from VMware.
To expand a existing disk use the command:
vmware-vdiskmanager -x 1000GB myDisk.vmdk
where 100GB
is the new disk size and myDisk.vmdk
is the disk file for your Ubuntu server installation.
Next time you boot your vm the partition size will still be the same, you need to expand it to the new available space.
To check where your / is mounted use the command mount
, it will return a line similar to:
dev/sda7 on / type ext3 (rw,noatime,nodiratime)
once you know where your / is mount you can use the command resize2fs as such:
resize2fs /dev/sda7
After the resize is finished you should to a file system check (not recommended while the device is mounted). Of course with any disk operations a disk backup is recommended.
By the way, you should be able to download the Ubuntu LiveCD for desktops and use it in your VM by booting the iso, that does not destroy your current setup and might make you life easier while repartitioning.
OK, here we go...
FIRST, do a backup of sda5!
Boot to the Ubuntu Live DVD and start gparted.
- right-click on sda9 and issue a swapoff
- right-click on sda10 and delete it
- right-click on sda9 and issue a move/resize
- place the pointer in the center of the partition, it'll change to a hand icon, and MOVE the partition all the way left
- click the APPLY icon
- right-click on sda9 and issue a swapon
- right-click on sda5 and issue a move/resize
- MOVE the partition all the way left, the same way as you did before
- RESIZE sda5 by dragging the RIGHT-SIDE-HANDLE all the way to the right
- click the APPLY icon
- reboot the computer
Best Answer
Note: Make sure that the drive is empty; otherwise make sure that you have a complete backup of its content, because creating a partition will erase all data on the drive.
Open Dash, and search for Gparted, and click on it. If its not installed, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:
Once installed open the application, and enter your password. Once it open, follow the step below:
If the drive is new, Click on Device, and choose Create Partition Table; otherwise skip to the step in the third image.
Keep the Default, and click Apply
Right click on the Unallocated space, and choose New
Create a 60GB partition. Once you enter all the info, click Add
Then Right click on the Unallocated space, and choose New
Create a 20GB partition. Once you enter all the info, click Add
Click on the Green check mark to Apply pending operations
And just click Apply to start.
Once done, just click Close, and that's it.