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



Sunday, October 6, 2013

Copy files between Windows and Linux.

This is how you do it-

File transfers can be done using PSCP (Putty Secure CoPy) or by using PSFTP (Putty Secure File Transfer Protocol).

The easiest way i find is via PSCP (Putty Secure CoPy)-

1.  Download Putty here- http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
2. PSCP must be launched from within a DOS box - Before running PSCP, you need to set the path variable.  At the DOS command prompt, type-

set PATH=C:\Program Files (x86)\PuTTY

(Change the path as per your directory structure.)

3. Type Path to check if it is been set correctly.
4.  To copy a Windows file to Linux system, at the DOS prompt, type-

pscp C:/ <full file name on windows>  root@<IP Address of Linux box>:/root

:/root will copy the files under root on linux box. Change as per your needs.

5. The reverse works as well (copy Linux file to Windows)

            pscp root@<IP Address of Linux box>:/root  c:/

Cheers!
Abhay

Handy Windows Screen Recorder

There are situations when you are required to document your steps. May be this tool from Windows is pretty useful. Windows call it "Windows Problem Steps Recorder".If you are using Windows 7 or 8, this is quite handy tool. This tool records each n every action on screen with screen shots.

Try out-

Go to Start Menu---> Run and type 'psr'.

You can Pause Start or Stop at any point of time. If you love batch programming you can call this program automatically as soon as your application under test starts.That's how i have configured it for my client. Check this for more info- http://windows.microsoft.com/en-nz/windows7/how-do-i-use-problem-steps-recorder

Enjoy!

Abhay