Expanding Guest OS VmWare Disk Size

The following steps are for VmWare Player and guest OS as Ubuntu 10.04 (Lucid Lynx).


Expanding the Guest OS hard disk size in Vmware Player consistes of two steps:

A]  Expanding the actual disk size allocated to the guest operating system from VmWare:-

  1. Select the "Edit Virtual Machine Settings" option below the Play Virtual Machine option before starting the VmWare.
  2. Under the tab "Harware" select Hard Disk. Click on "Utilities" and select the Expand option from the drop down list.
  3. Specify the new disk size in the combo box and click on Expand.
This will take some time.

B]   Making the Guest Operating system aware of the increased disk size:- 
       
      Now you have two options: either you can repartition the whole partition table to include the newly allocated chunk of data in the main Linux space or create a new partition in the unallocates space; create a new directory and mount that on startup. Here we take up the second approach:

  1. Start the VmWare Player and the play the Guest OS.
  2. Install gparted if not there by following command:
            # sudo apt-get install gparted
  3. Now open gparted from System -> Administration -> GParted
  4. Now you can select the required device from the right hand corner drop down list.
  5. It will display the device partion information. You will be able to see the unallocated space in grey. Right click on it and select "New" form the context menu.
  6. Keep the space related default data as it is if you want to craete a single partition only. Select the File System type form the drop down list. Fill the label name if required but that field is optional. Click on Add. Notice the partition name as you will require this to mount the partition later.
  7. This just changed the partion table temporarily. To permanatly write the partition table click on the Green tick on the top panel. This will perform operation and write the partition table on the disk.
  8. Now create a directory to any preferable location.
  9. Mount the device using the following command:
            # mount -t <file_system_type> <partition name> <path_to_the_newly_created_directory>
  10. If you want the space to be automatically mounted at boot time follow these steps:
  • Install PySDM using the following command:

            $ sudo apt-get install pysdm
           
        PySDM is a GUI to manager fstab (/etc/fstab) and allows customizing hard disk mountpoints, creating dynamic udev rules, etc.
  • Now open System->Administration->Storage Device manager. Click on the partition you want to auto-mount at startup. 
  • Click on Assistant tab. Select the check box, the file system is mounted at boot time. Select whatever other options are desireable to you. Click Ok.
  • CLick on the Mountpoint Browse icon and browse the directory where you want to mount the partition at startup.
  • After this click on Apply and Close the window.
  • Reboot and see the directory. you get the extra space partition mounted at the location. :)

No comments:

Post a Comment