0

I have Ubuntu-12.04 image on windows 7 host, I want to shrink the image size from 30 GB to 10 GB, It is dynamically allocated storage. I see many questions and related topics, But I don't understand it, I need a steps for a beginner Ubuntu user.

Thanks in advance

  • Did you see this: https://askubuntu.com/questions/444598/how-do-i-shrink-a-dynamically-growing-vdi-disk-from-virtualbox? – Takkat Aug 02 '15 at 19:32

1 Answers1

1

I believe there is currently no way to reduce the size seen by the guest OS, see

So what can you do? My best advice for a newbie would be to

  1. back-up the files you need
  2. create a new virtual machine with a smaller disk
  3. copy the files back
  4. once you are sure that you have all the files you need on the new machine, delete the old machine and and its disk image

Alternatively, you could mount the old drive in the new machine, and from there copy back the files you need.

However, I would not advise doing this if you don't understand what you are doing. There are files that depend on the disk configuration, which would make the machine unusable if overwritten with bad configuration.

For example, the file /etc/fstab uses so called UUIDs to identify disks, which will be different for your new drive.

vindvaki
  • 204