Few weeks back I installed Linux as a virtual machine on my Windows 7 system, but I didn't give much thought to (or miscalculated) the size of various partitions and even worse I'm not using lvm. Today I tried to installed Qt 5.0 SDK which required around 500 MB of space in /tmp which I didn't have, but other partitions had quite a bit of space. The partition scheme is:

primary partitions:

/boot 60M ext4

extended partitions:

/ 6.5G ext4

swap 512M ext4

/tmp 512M ext4

/var 1G ext4

/home 5G ext4

I booted from an Ubuntu live cd and used gparted to get resize the /tmp partition, problem solved! But here I can see the benefit of using 'lvm'.

I want to create a new system which uses lvm. But instead of making a fresh install I think we can transfer my current system to a new hard disk.

I added another 100 GB virtual hard disk to this virtual machine, created a 256 MB /boot primary partition and the rest of the space for a lvm partition. Now I have the various partitions (except /boot) on logical volumes (following UbuntuDesktopLVM). Now comes the hard part, how do I move the system to this new disk properly?

Current configuration: Linux Mint 13 32 bit on Windows 7 32 bit using VirtualBox 4.2.

  • use tar (as root) to pack the whole system into a .tar.gz file.
  • set up partitions for the new system, mount all disks where they belong
  • untar everything to the new system
  • check files like /etc/fstab to make sure everything is still valid.

tar is able to store permission, times and owners of all files. Therefore the new system should look exactly like the old one.


I would recommend using clonezilla. Here's a good tutorial that will walk you through most of how to clone you existing VMs partition to the new one you created on the 2nd virtual device.

  • clonezilla looks promising let me try it out thanks. – rsjethani Dec 25 '12 at 8:04

I would recommend using 'VboxManage' to expand your virtual drive. There is no need to do new installation with new enlarged virtual drive and transferring old system on it. I've already done this.

The steps ave very simple (example procedure):

  1. Stop the virtual machine.
  2. Expanding drive over 'VboxManage'.
  3. Loading existing virtual machine from some LiveCD like 'SystemRescueCD'.
  4. Mounting your virtual HDD and running resize2fs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.