Pages

Thursday, March 6, 2014

Resize an existing virtualbox hard drive in guest windows xp using host windows 7


  1. Create a new hard disk 
    1. Click on Settings in virtualbox 
    2. Select Storage tab 
    3. Click on Add Hard Disk icon
    4. Set a sufficient amount of dynamically expanding disk space
  2. Clone your old hard disk
    1. Check the location of VBoxManage and your old hard disk .vdi file [ex: in my computer i have VBoxManage at G: and old_hard_disk.vdi at C:\Users\acer\VirtualBox VMs\old_hard_disk_dir\old_hard_disk.vdi]
    2. Open up cmd in windows 7, go to the location of VBoxManage and type as below:
    3. 
      C:\Users\acer>G:
      G:\>VBoxManage clonehd "C:\Users\acer\VirtualBox VMs\old_hard_disk_dir\old_hard_disk.vdi" "C:\Users\acer\VirtualBox VMs\old_hard_disk_dir\new_hard_disk.vdi" --existing
      
    4. You see something like this:
    5. 
      Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
      (C) 2005-2010 Oracle Corporation All rights reserved.
      0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
      Clone hard disk created in format 'VDI'. UUID: ee28ab8b-8232-4c76-8c1b-184afdd1dd27
      
  3. Replace the old guest hard disk with your new hard disk (i.e. new_hard_disk.vdi)
    1. Go to the settings for the guest VM and choose the “Storage” options
    2. Select the new disk created and make it IDE Primary Slave under the Attributes column
    3. Select the old disk and remove it by clicking on - icon at the bottom
  4. Start the guest os i.e windows xp
  5. Resize the Guest File System
    1. Install partition manager tool in windows xp
    2. Select the newly created drive. Right click on it and select Resize Partition
    3. Follow on screen instructions to finish the partitioning
  6. Restart the guest os if required

No comments: