Migrating to a larger hardisk with CloneZilla and VirtualBox
I run Arch Linux as my primary operating system but use VirtualBox to run various Windows systems for developing software and accessing Windows only programs. I recently started running out of space on the hard disk for one of my virtual machines. I was quickly able to use one of my favourite Linux Boot Disks CloneZilla to copy my existing virtual hard disk to a new, larger virtual hard disk. This process was done using virtual disks, but the steps are exactly the same when using physical disks.
Steps to migrate to new hard disk
Note: It is possible to permanently lose your data from running the commands below, be careful!
- Download the CloneZilla live CD
- In most cases you want to download the i486 infrastructure in the .iso format
- Ensure the virtual machine is shut off
- Add a new virtual hard disk to your virtual machine
- Click on the machine in the VirtualBox Manager
- Click on the Settings button at the top (Yellow Gear Icon)
- Click on the Storage label
- Click on the far right disk label that is in the row beside "Controller: SATA"
- Create a new disk of whatever size you want., It must be bigger or at least the same size as your current disk
- Mount the CloneZilla iso
- Click the CD/DVD drive in your Storage settings and at the far right click on the small CD image.
- Click Choose a virtual CD/DVD image file from the dropdown menu
- Navigate and click on the CloneZilla iso file you downloaded
- Start the virtual machine
- Select first option in the Grub boot menu (Default settings)
- Select your language
- Select Don't touch keymap
- Select Start_Clonezilla
- Select device-device
- Select Beginner
- Select disktolocal_disk
- Select the original disk
- Select the new disk
- Select Skip checking/repairing source file system
- Press 'Enter' and press y to go through the confirmation messages
- When CloneZilla is finished copying it will display a message prompting you to press "Enter"
- Press Enter
- Select Poweroff
- Press Enter again when prompted
- The CloneZilla disk should have automatically been dismounted but if not umount it from the Storage section in Settings
- Remove the original disk from the Storage section in Settings
- Set the new disk to use the same SATA Port number that the original disk was using under the attributes section on the right.
- You will have to format the new storage space for Windows or any other operating system to actually use the new space
- Optionally once you have tested that the new drive is working, delete the old drive from your system.
This is just one of the many uses of Clonezilla. It is an amazingly powerful tool for dealing with disks, partitions, and images.
Post how you use Clonezilla in the comments!