Total Pageviews

Monday, October 7, 2013

Resizing a Linux VM (Virtual Machine)

I have been using a lot VM's (Virtual machines) at my work place and there been lot of need to re-size the VM partition. Due to ever expanding data you end up having less space in your VM machines. Below i have compiled few easy steps to achieve it- (this will keep you away from Linux-hard-to-understand-commands-for-vm-resizing!)

IMP Point- If you have been saving SNAPSHOTS , they will have to be deleted first. Use the Snapshot Manager to do this.(Ctrl+M from main menu) (can take a while).

1.Change the VM settings
  • Change VM size -go to Settings - Hard Disk / Utilities / expand
  • Put in the required value-





2. Parted Magic (Take the pain to write DVD--you will breathe easy rest of your life!)

  • Burn a copy of Parted Magic to CD/DVD
  • ISO can be found here- http://partedmagic.com/doku.php?id=downloads
  • (Its FREE)

3. Boot from CD/DVD
  • Start the VM and boot to BIOS. See the picture below on how you can do it OR click into window and hit F2 as soon as VMware logo appears (you have to be quick)

  • Change bios boot order to CD_ROM first (use + and - keys on numeric keypad to move cd-rom to top of list)
  • Save and Exit bios
  • Boot from CD/DVD (Should boot automatically) (Make sure you have checked "Connect at Power on")
  • I have used "Use ISO image file" and path to file in the Physical drive.Screen shit below is different. Both should work.

  • Start Parted Magic with default settings (This will copy Parted Magic files onto RAM. Accept all default)
  • Go to Partition Editor (Located on desktop) and double click. Below is what you will get to see.
 4. Re-Size
  • Firstly you have to re-size the extended partition before the logical drive. Select the extended partition (in this case sda4)-
  • Click on  Resize/Move button.... (Move the slider from extreme ends by mouse,black arrows don't work)-Select Resize/Move and it will put it in queue.

  •   Now do the same for the logical drive (sda5) 
You should now have 2 items in the queue. Select Apply at the top.

4. Clean up
  • Log out or click turn off machine in Parted magic (bottom left corner) 
  • Go back to bios and change back to Hard Drive.
There you go! Enjoy VM with more hard disk space.

Cheers!
Abhay



No comments:

Post a Comment